@Override public String toSource(int depth) { StringBuilder sb = new StringBuilder(); sb.append(makeIndent(depth)); sb.append("for ("); sb.append(initializer.toSource(0)); sb.append("; "); sb.append(condition.toSource(0)); sb.append("; "); sb.append(increment.toSource(0)); sb.append(") "); if (body.getType() == Token.BLOCK) { sb.append(body.toSource(depth).trim()).append("\n"); } else { sb.append("\n").append(body.toSource(depth+1)); } return sb.toString(); }
@Override public String toSource(int depth) { StringBuilder sb = new StringBuilder(); sb.append(makeIndent(depth)); sb.append("for ("); sb.append(initializer.toSource(0)); sb.append("; "); sb.append(condition.toSource(0)); sb.append("; "); sb.append(increment.toSource(0)); sb.append(") "); if (body.getType() == Token.BLOCK) { sb.append(body.toSource(depth).trim()).append("\n"); } else { sb.append("\n").append(body.toSource(depth+1)); } return sb.toString(); }
@Override public String toSource(int depth) { StringBuilder sb = new StringBuilder(); sb.append(makeIndent(depth)); sb.append("for ("); sb.append(initializer.toSource(0)); sb.append("; "); sb.append(condition.toSource(0)); sb.append("; "); sb.append(increment.toSource(0)); sb.append(") "); if (body.getType() == Token.BLOCK) { sb.append(body.toSource(depth).trim()).append("\n"); } else { sb.append("\n").append(body.toSource(depth+1)); } return sb.toString(); }
@Override public String toSource(int depth) { StringBuilder sb = new StringBuilder(); sb.append(makeIndent(depth)); sb.append("for ("); sb.append(initializer.toSource(0)); sb.append("; "); sb.append(condition.toSource(0)); sb.append("; "); sb.append(increment.toSource(0)); sb.append(") "); if (body.getType() == Token.BLOCK) { sb.append(body.toSource(depth).trim()).append("\n"); } else { sb.append("\n").append(body.toSource(depth+1)); } return sb.toString(); }