We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3ef2bd1 commit d1770acCopy full SHA for d1770ac
crates/swc_ecma_parser/src/parser/stmt.rs
@@ -870,12 +870,7 @@ impl<'a, I: Tokens> Parser<I> {
870
}
871
872
let mut decls = Vec::with_capacity(4);
873
- let mut first = true;
874
- while first || eat!(self, ',') {
875
- if first {
876
- first = false;
877
- }
878
-
+ loop {
879
let ctx = if should_include_in {
880
self.ctx() | Context::IncludeInExpr
881
} else {
@@ -898,6 +893,10 @@ impl<'a, I: Tokens> Parser<I> {
898
893
899
894
900
895
decls.push(self.with_ctx(ctx).parse_var_declarator(for_loop, kind)?);
896
+
897
+ if !eat!(self, ',') {
+ break;
+ }
901
902
903
if !for_loop && !eat!(self, ';') {
0 commit comments