diff options
author | 2021-09-03 13:01:36 -0700 | |
---|---|---|
committer | 2021-09-03 13:01:36 -0700 | |
commit | a90760b597b5fa8eff001e82dfa9d80a4af00581 (patch) | |
tree | f692b0a72bc17dfe5d1ae10e6f87b747d02780ff /src/js_parser/js_parser.zig | |
parent | 3fc0c899c97977cc7843bf809c36dcdafb369144 (diff) | |
download | bun-a90760b597b5fa8eff001e82dfa9d80a4af00581.tar.gz bun-a90760b597b5fa8eff001e82dfa9d80a4af00581.tar.zst bun-a90760b597b5fa8eff001e82dfa9d80a4af00581.zip |
Fix logging in bun bun + bump
Former-commit-id: 19275a07342879d9b02b9d9527b762c8bfadb9e6
Diffstat (limited to 'src/js_parser/js_parser.zig')
-rw-r--r-- | src/js_parser/js_parser.zig | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/js_parser/js_parser.zig b/src/js_parser/js_parser.zig index 957da2857..ca6e38edb 100644 --- a/src/js_parser/js_parser.zig +++ b/src/js_parser/js_parser.zig @@ -3698,7 +3698,7 @@ pub fn NewParser( .is_computed = item.flags.is_computed, }, .key = (if (is_spread) item.value orelse item.key else item.key) orelse p.panic("Internal error: Expected {s} to have a key.", .{item}), - .value = tup.binding orelse p.panic("Internal error: Expected {s} to have a binding.", .{tup}), + .value = tup.binding orelse p.b(B.Missing{}, expr.loc), .default_value = initializer, }); } @@ -8498,9 +8498,11 @@ pub fn NewParser( } } - // Stop now if this token is forbidden to follow a TypeScript "as" cast - if (p.forbid_suffix_after_as_loc.start > -1 and p.lexer.loc().start == p.forbid_suffix_after_as_loc.start) { - return left; + if (comptime is_typescript_enabled) { + // Stop now if this token is forbidden to follow a TypeScript "as" cast + if (p.forbid_suffix_after_as_loc.start > -1 and p.lexer.loc().start == p.forbid_suffix_after_as_loc.start) { + return left; + } } // Reset the optional chain flag by default. That way we won't accidentally |