@Override public void visit(WhileStatement statement) { if (!tryCatchFound) { visitSequence(statement.getBody()); } }
@Override public void visit(WhileStatement statement) { outerStatements.add(statement); processSequence(statement.getBody()); outerStatements.remove(statement); }
@Override public void visit(WhileStatement statement) { IdentifiedStatement currentBlockBackup = currentBlock; currentBlock = statement; visit(statement.getBody()); if (!hasRefs.contains(currentBlock)) { currentBlock.setId(null); } currentBlock = currentBlockBackup; }
@Override public void visit(WhileStatement statement) { IdentifiedStatement oldCurrentBlock = currentBlock; currentBlock = statement; visit(statement.getBody()); currentBlock = oldCurrentBlock; if (last && (statement.getCondition() != null || blocksCount.containsKey(statement))) { incrementCurrentBlock(); } }
@Override public void visit(WhileStatement statement) { if (blockCountVisitor.getCount(statement) > 0) { escaping = true; return; } if (statement.getCondition() != null && check(statement.getBody())) { escaping = true; } }
@Override public void visit(WhileStatement statement) { if (statement.getBody().size() == 1 && statement.getBody().get(0) instanceof WhileStatement) { WhileStatement innerLoop = (WhileStatement) statement.getBody().get(0); BreakToContinueReplacer replacer = new BreakToContinueReplacer(innerLoop, statement); replacer.visit(innerLoop.getBody()); statement.getBody().clear(); statement.getBody().addAll(innerLoop.getBody()); List<Statement> statements = processSequence(statement.getBody()); for (int i = 0; i < statements.size(); ++i) { if (statements.get(i) instanceof ContinueStatement) { statement.getBody().clear(); statement.getBody().addAll(statements); if (statement.getCondition() != null) { List<Statement> sequenceBackup = resultSequence; if (!statement.getBody().isEmpty() && statement.getBody().get(0) instanceof ConditionalStatement) { ConditionalStatement cond = (ConditionalStatement) statement.getBody().get(0); if (cond.getConsequent().size() == 1 && cond.getConsequent().get(0) instanceof BreakStatement) { BreakStatement breakStmt = (BreakStatement) cond.getConsequent().get(0); if (breakStmt.getTarget() == statement) { statement.getBody().remove(0); if (statement.getCondition() != null) { Expr newCondition = Expr.binary(BinaryOperation.AND, null, statement.getCondition(),
@Override public void visit(WhileStatement statement) { if (statement.getCondition() != null) { statement.getCondition().acceptVisitor(this); } visit(statement.getBody()); }
for (Statement part : statement.getBody()) { accept(part); if (result != null) {
@Override public void visit(WhileStatement statement) { try { output.writeByte(statement.getCondition() != null ? 5 : 6); writeNullableString(statement.getId()); if (statement.getCondition() != null) { writeExpr(statement.getCondition()); } writeSequence(statement.getBody()); } catch (IOException e) { throw new IOExceptionWrapper(e); } }
} else if (stmt instanceof WhileStatement) { WhileStatement whileStmt = (WhileStatement) stmt; eliminateRedundantBreaks(whileStmt.getBody(), null); } else if (stmt instanceof SwitchStatement) { SwitchStatement switchStmt = (SwitchStatement) stmt;
WhileStatement whileStatement = new WhileStatement(); statement = whileStatement; block = new Block(statement, whileStatement.getBody(), start, currentNode.getEnd()); loop = true; } else {
@Override public void visit(WhileStatement statement) { writer.print("while ("); if (statement.getCondition() != null) { statement.getCondition().acceptVisitor(this); } else { writer.print("1"); } writer.println(") {").indent(); visitMany(statement.getBody()); if (statement.getId() != null) { writer.outdent().println("cnt_" + statement.getId() + ":;").indent(); } writer.outdent().println("}"); if (statement.getId() != null) { writer.outdent().println("label_" + statement.getId() + ":;").indent(); } }
for (Statement part : statement.getBody()) { end = false; part.acceptVisitor(this);
@Override public void visit(WhileStatement statement) { outerStatements.add(statement); processSequence(statement.getBody()); outerStatements.remove(statement); }
@Override public void visit(WhileStatement statement) { if (!tryCatchFound) { visitSequence(statement.getBody()); } }
@Override public void visit(WhileStatement statement) { IdentifiedStatement currentBlockBackup = currentBlock; currentBlock = statement; visit(statement.getBody()); if (!hasRefs.contains(currentBlock)) { currentBlock.setId(null); } currentBlock = currentBlockBackup; }
@Override public void visit(WhileStatement statement) { IdentifiedStatement oldCurrentBlock = currentBlock; currentBlock = statement; visit(statement.getBody()); currentBlock = oldCurrentBlock; if (last && (statement.getCondition() != null || blocksCount.containsKey(statement))) { incrementCurrentBlock(); } }
@Override public void visit(WhileStatement statement) { if (blockCountVisitor.getCount(statement) > 0) { escaping = true; return; } if (statement.getCondition() != null && check(statement.getBody())) { escaping = true; } }
@Override public void visit(WhileStatement statement) { if (statement.getCondition() != null) { statement.getCondition().acceptVisitor(this); } visit(statement.getBody()); }