quick-lint / quick-lint-js

quick-lint-js finds bugs in JavaScript programs
https://quick-lint-js.com
GNU General Public License v3.0
1.54k stars 192 forks source link

10$: JS string decoding routine #1159

Open strager opened 9 months ago

strager commented 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.