10$: JS string decoding routine
strager opened this issue · 0 comments
strager commented
Write a routine which decodes escape sequences in string literal tokens.
Caveats:
- String span might not start or end with
'
or"
(due to error recovery) - Escape sequences might be invalid
No diagnostics should be reported by the routine. (Diagnostics should have been reported already when lexing the string literal.)
Memory should be allocated in a user-provided Memory_Resource, probably using Vector.
Decoded string should be (possibly-invalid) UTF-8.