* Walk for in statement. * @param {ForInStatement} statement for statement
(statement)
| 2715 | * @param {ForInStatement} statement for statement |
| 2716 | */ |
| 2717 | walkForInStatement(statement) { |
| 2718 | this.inBlockScope(() => { |
| 2719 | if (statement.left.type === "VariableDeclaration") { |
| 2720 | this.blockPreWalkVariableDeclaration(statement.left); |
| 2721 | this.walkVariableDeclaration(statement.left); |
| 2722 | } else { |
| 2723 | this.walkPattern(statement.left); |
| 2724 | } |
| 2725 | |
| 2726 | this.walkExpression(statement.right); |
| 2727 | |
| 2728 | const body = statement.body; |
| 2729 | |
| 2730 | if (body.type === "BlockStatement") { |
| 2731 | // no need to add additional scope |
| 2732 | const prev = this.prevStatement; |
| 2733 | this.blockPreWalkStatements(body.body); |
| 2734 | this.prevStatement = prev; |
| 2735 | this.walkStatements(body.body); |
| 2736 | } else { |
| 2737 | this.walkNestedStatement(body); |
| 2738 | } |
| 2739 | }); |
| 2740 | } |
| 2741 | |
| 2742 | /** |
| 2743 | * Pre walk for of statement. |
no test coverage detected