Shell: Parse '\t' in doublequoted strings as a tab character
This not being recognised is surprising.
This commit is contained in:
parent
417910fd28
commit
b1fe5d5517
Notes:
sideshowbarker
2024-07-18 18:23:29 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/b1fe5d55172 Pull-request: https://github.com/SerenityOS/serenity/pull/7002 Issue: https://github.com/SerenityOS/serenity/issues/6986
3 changed files with 5 additions and 2 deletions
|
@ -479,7 +479,7 @@ dquoted_string_inner :: '\' . dquoted_string_inner? {concat}
|
|||
| . dquoted_string_inner?
|
||||
| '\' 'x' xdigit*2 dquoted_string_inner?
|
||||
| '\' 'u' xdigit*8 dquoted_string_inner?
|
||||
| '\' [abefrn] dquoted_string_inner?
|
||||
| '\' [abefrnt] dquoted_string_inner?
|
||||
|
||||
variable :: variable_ref slice?
|
||||
|
||||
|
|
|
@ -1345,6 +1345,9 @@ RefPtr<AST::Node> Parser::parse_doublequoted_string_inner()
|
|||
case 'n':
|
||||
builder.append('\n');
|
||||
break;
|
||||
case 't':
|
||||
builder.append('\t');
|
||||
break;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -267,7 +267,7 @@ dquoted_string_inner :: '\' . dquoted_string_inner? {concat}
|
|||
| . dquoted_string_inner?
|
||||
| '\' 'x' xdigit*2 dquoted_string_inner?
|
||||
| '\' 'u' xdigit*8 dquoted_string_inner?
|
||||
| '\' [abefrn] dquoted_string_inner?
|
||||
| '\' [abefrnt] dquoted_string_inner?
|
||||
|
||||
variable :: variable_ref slice?
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue