Skip to content

Commit

Permalink
fix: use VariableDecList in ForOf and ForIn (#30)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: initializer field in ForOfStmt and ForInStmt is now a VariableDeclList
  • Loading branch information
sam authored Sep 12, 2022
1 parent f366d51 commit f9e0681
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ impl<'a> ClosureDecorator<'a> {
// ^
self.vm.bind_var_decl(var_decl);

self.parse_var_declarator(var_decl.decls.first().unwrap())
self.parse_var_decl(var_decl)
}
// for (i in items)
// ^ not a new name, so no binding created
Expand Down Expand Up @@ -583,7 +583,7 @@ impl<'a> ClosureDecorator<'a> {
// ^
self.vm.bind_var_decl(var_decl);

self.parse_var_declarator(var_decl.decls.first().unwrap())
self.parse_var_decl(var_decl)
}
// for (i of items)
// ^ not a new name, so no binding created
Expand Down

0 comments on commit f9e0681

Please sign in to comment.