Skip to content

Commit 6a641b9

Browse files
committed
added walkForOfStatement
1 parent 592ee90 commit 6a641b9

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

‎lib/Parser.js‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,15 @@ Parser.prototype.walkForInStatement = function walkForInStatement(statement) {
437437
this.walkStatement(statement.body);
438438
};
439439

440+
Parser.prototype.walkForOfStatement = function walkForOfStatement(statement) {
441+
if(statement.left.type === "VariableDeclaration")
442+
this.walkStatement(statement.left);
443+
else
444+
this.walkExpression(statement.left);
445+
this.walkExpression(statement.right);
446+
this.walkStatement(statement.body);
447+
};
448+
440449
// Declarations
441450
Parser.prototype.walkFunctionDeclaration = function walkFunctionDeclaration(statement) {
442451
this.scope.renames["$"+statement.id.name] = undefined;

0 commit comments

Comments
 (0)