diff options
author | 2022-03-09 02:36:20 -0800 | |
---|---|---|
committer | 2022-03-09 02:36:20 -0800 | |
commit | 43622a8eb79163ac60eb34544e71e56e703199cf (patch) | |
tree | 40b9d9242608c522e46d8d8af8536b7b35a87fb6 | |
parent | eeff004ec2d616691430a494a5d3a3b35500c2b0 (diff) | |
download | bun-43622a8eb79163ac60eb34544e71e56e703199cf.tar.gz bun-43622a8eb79163ac60eb34544e71e56e703199cf.tar.zst bun-43622a8eb79163ac60eb34544e71e56e703199cf.zip |
fix bug with UTF-16 template literal escape codes
-rw-r--r-- | src/js_lexer.zig | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/js_lexer.zig b/src/js_lexer.zig index e3dc22bff..ca97c05a7 100644 --- a/src/js_lexer.zig +++ b/src/js_lexer.zig @@ -297,15 +297,15 @@ fn NewLexer_( switch (c2) { // https://mathiasbynens.be/notes/javascript-escapes#single 'b' => { - buf.append(8) catch unreachable; + buf.append(0x08) catch unreachable; continue; }, 'f' => { - buf.append(9) catch unreachable; + buf.append(0x0C) catch unreachable; continue; }, 'n' => { - buf.append(10) catch unreachable; + buf.append(0x0A) catch unreachable; continue; }, 'v' => { @@ -315,15 +315,15 @@ fn NewLexer_( // lexer.end = start + iter.i - width2; // try lexer.syntaxError(); // } - buf.append(11) catch unreachable; + buf.append(0x0B) catch unreachable; continue; }, 't' => { - buf.append(12) catch unreachable; + buf.append(0x09) catch unreachable; continue; }, 'r' => { - buf.append(13) catch unreachable; + buf.append(0x0D) catch unreachable; continue; }, |