Open strager opened 9 months ago
Write a routine which decodes escape sequences in string literal tokens.
Caveats:
'
"
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.
Write a routine which decodes escape sequences in string literal tokens.
Caveats:
'
or"
(due to error recovery)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.