feat: add \U style 8-hex-digit unicode escape support in string literals
Extend the compiler's string parser to handle `\U` escapes with 8 hex digits for codepoints above U+FFFF, replacing the previous TODO comment. The `readUnicodeEscape` helper now accepts a variable digit count (4 or 8) and the `readString` function dispatches `\u` with length 4 and `\U` with length 8. New test cases verify correct encoding of emoji and ancient scripts, plus error handling for incomplete long escapes and values that fit in 4 digits.
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
// expect error line 2
|
||||
"\U01F603"
|
||||
Reference in New Issue
Block a user