@Override public WhileStmt clone() { return new WhileStmt(getCondition().clone(), getBody().clone()); }
@Override public void visitWhileStmt(WhileStmt whileStmt) { visitChildFromParent(whileStmt.getCondition(), whileStmt); visitChildFromParent(whileStmt.getBody(), whileStmt); }
private WhileStmt fuzzWhileStmt() { final Expr condition = fuzzExpr(BasicType.BOOL, false, false, 0); final Stmt body = fuzzBlockStmt(true); return new WhileStmt(condition, body); }
@Override public void visitWhileStmt(WhileStmt whileStmt) { if (!(whileStmt.getBody() instanceof BlockStmt)) { maybeAddInjectionPoint(new LoopInjectionPoint(whileStmt, currentFunction, currentScope)); } loopNestingDepth++; super.visitWhileStmt(whileStmt); loopNestingDepth--; }
@Override public void visitWhileStmt(WhileStmt whileStmt) { out.append(indent() + "while("); visit(whileStmt.getCondition()); out.append(")" + newLine()); increaseIndent(); visit(whileStmt.getBody()); decreaseIndent(); }
@Override public Stmt visitIteration_statement(Iteration_statementContext ctx) { if (ctx.DO() != null) { return new DoStmt(visitStatement(ctx.statement()), visitExpression(ctx.expression())); } if (ctx.WHILE() != null) { return new WhileStmt(visitCondition(ctx.condition()), visitStatement_no_new_scope(ctx.statement_no_new_scope())); } assert ctx.FOR() != null; return new ForStmt(visitFor_init_statement(ctx.for_init_statement()), ctx.for_rest_statement().conditionopt().condition() == null ? null : visitCondition(ctx.for_rest_statement().conditionopt().condition()), ctx.for_rest_statement().expression() == null ? null : visitExpression(ctx.for_rest_statement().expression()), visitStatement_no_new_scope(ctx.statement_no_new_scope())); }