is_block_scope return true when current node is an instance of AST_IterationStatement. then the scope of let variable can be figured out accurately (#1561)

This commit is contained in:
qinayi
2017-03-07 23:50:58 +08:00
committed by Alex Lam S.L
parent 3c2b3aeddb
commit 240383a314
2 changed files with 289 additions and 0 deletions

View File

@@ -331,6 +331,10 @@ AST_Block.DEFMETHOD("is_block_scope", function(){
);
});
AST_IterationStatement.DEFMETHOD("is_block_scope", function(){
return true;
});
AST_Lambda.DEFMETHOD("init_scope_vars", function(){
AST_Scope.prototype.init_scope_vars.apply(this, arguments);
this.uses_arguments = false;