1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:57:44 +00:00

Shell: Add support for \uhhhhhhhh escapes in strings

This will be replaced with the unicode character whose codepoint is
given by the unsigned 32-bit number 'hhhhhhhh' (hex).
This commit is contained in:
Ali Mohammad Pur 2021-05-10 11:30:42 +04:30 committed by Andreas Kling
parent 0f03960c1b
commit 22b244df45
3 changed files with 16 additions and 2 deletions

View file

@ -477,7 +477,8 @@ string :: '"' dquoted_string_inner '"'
dquoted_string_inner :: '\' . dquoted_string_inner? {concat}
| variable dquoted_string_inner? {compose}
| . dquoted_string_inner?
| '\' 'x' digit digit dquoted_string_inner?
| '\' 'x' xdigit*2 dquoted_string_inner?
| '\' 'u' xdigit*8 dquoted_string_inner?
| '\' [abefrn] dquoted_string_inner?
variable :: variable_ref slice?