/* * @see ASTVisitor#visit(ForStatement) */ public boolean visit(ForStatement node) { this.fBuffer.append("for ("); // $NON-NLS-1$ for (Iterator it = node.initializers().iterator(); it.hasNext(); ) { Expression e = (Expression) it.next(); e.accept(this); } this.fBuffer.append("; "); // $NON-NLS-1$ if (node.getExpression() != null) { node.getExpression().accept(this); } this.fBuffer.append("; "); // $NON-NLS-1$ for (Iterator it = node.updaters().iterator(); it.hasNext(); ) { Expression e = (Expression) it.next(); e.accept(this); } this.fBuffer.append(") "); // $NON-NLS-1$ node.getBody().accept(this); return false; }
public boolean visit(ForStatement node) { fScopes.add(fScope); fScope = new Scope(fScope, node.getStartPosition(), node.getLength()); return true; }