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.
3 lines
34 B
Plaintext
3 lines
34 B
Plaintext
// expect error line 2
|
|
"\U01F603"
|