1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 14:47:34 +00:00

Shell: Parse '\t' in doublequoted strings as a tab character

This not being recognised is surprising.
This commit is contained in:
Ali Mohammad Pur 2021-05-10 11:46:21 +04:30 committed by Andreas Kling
parent 417910fd28
commit b1fe5d5517
3 changed files with 5 additions and 2 deletions

View file

@ -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;
}

View file

@ -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?