@Override public void visitForOfStatement(ForOfStatementTree tree) { nestedLevel++; checkNestedLevel(tree); super.visitForOfStatement(tree); nestedLevel--; }
@Override public void visitAssignmentExpression(AssignmentExpressionTree tree) { if (tree.is(Kind.ASSIGNMENT) && isUndefined(tree.expression())) { reportIssue(tree); } super.visitAssignmentExpression(tree); }
@Override public void visitInitializedBindingElement(InitializedBindingElementTree tree) { if (isUndefined(tree.right())) { reportIssue(tree); } super.visitInitializedBindingElement(tree); }
@Override public void visitAssignmentExpression(AssignmentExpressionTree tree) { if (inUpdate) { addCurrentLoopCounter(tree.variable()); } super.visitAssignmentExpression(tree); }
@Override public void visitUnaryExpression(UnaryExpressionTree tree) { if (inUpdate && tree.is(INC_DEC_OPERATIONS)) { addCurrentLoopCounter(tree.expression()); } super.visitUnaryExpression(tree); }
@Override public void scanFile(TreeVisitorContext context) { super.scanFile(context); nestedLevel = 0; }