aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Dylan Conway <35280289+dylan-conway@users.noreply.github.com> 2022-11-10 13:08:32 -0800
committerGravatar GitHub <noreply@github.com> 2022-11-10 13:08:32 -0800
commit7ce8328d28f415fd89cc025121b774d7a6e4661e (patch)
tree2374e3e332cd31390640b15a06235f0c6cc45c9b
parentb62c45fea3c21138e7c61ad51c740c5c008ba4c4 (diff)
downloadbun-7ce8328d28f415fd89cc025121b774d7a6e4661e.tar.gz
bun-7ce8328d28f415fd89cc025121b774d7a6e4661e.tar.zst
bun-7ce8328d28f415fd89cc025121b774d7a6e4661e.zip
add ... switch case (#1482)
-rw-r--r--src/js_parser.zig12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/js_parser.zig b/src/js_parser.zig
index ce5ca997b..d88a9cc1a 100644
--- a/src/js_parser.zig
+++ b/src/js_parser.zig
@@ -5851,6 +5851,18 @@ fn NewParser_(
try p.lexer.next();
},
+ // "{...x}"
+ .t_dot_dot_dot => {
+ try p.lexer.next();
+
+ if (p.lexer.token != .t_identifier) {
+ try p.lexer.unexpected();
+ }
+
+ found_identifier = true;
+ try p.lexer.next();
+ },
+
// "{1: y}"
// "{'x': y}"
.t_string_literal, .t_numeric_literal => {