public void write(SourceWriter w) { w.indent(); expr.write(w); w.append(";"); w.newLine(); }
public void write(SourceWriter w) { w.indent(); expr.write(w); w.append(";"); w.newLine(); }
public void write(SourceWriter w) { w.indent().append("if (_FN.isTrue("); condition.write(w); w.append(")) break;").newLine(); }
public void write(SourceWriter w) { w.indent().append("if (_FN.isTrue("); condition.write(w); w.append(")) break;").newLine(); }
public void writeDefaultValue(SourceWriter w) { if (!(left instanceof Variable)) { throw new IllegalStateException("Cannot write default value unless this is a declaration"); } w.indent().append("if (Double.isNaN(").append(left).append(")) {").newLine(); w.inc(); w.indent().append(this).append(";").newLine(); w.dec(); w.line("}"); }
public void writeDefaultValue(SourceWriter w) { if (!(left instanceof Variable)) { throw new IllegalStateException("Cannot write default value unless this is a declaration"); } w.indent().append("if (Double.isNaN(").append(left).append(")) {").newLine(); w.inc(); w.indent().append(this).append(";").newLine(); w.dec(); w.line("}"); }
@Override public void write(SourceWriter w) { w.indent().append(var).append(".add(").append(expression).append(");").newLine(); }
@Override public void write(SourceWriter w) { w.indent().append(var).append(".add(").append(expression).append(");").newLine(); }
public void write(SourceWriter w) { w.indent().append("while (!_FN.isTrue("); condition.write(w); w.append(")) {\n"); w.inc(); statement.write(w); w.dec(); w.line("}"); }
public void write(SourceWriter w) { w.indent().append("while (_FN.isTrue("); condition.write(w); w.append(")) {\n"); w.inc(); statement.write(w); w.dec(); w.line("}"); }
public void write(SourceWriter w) { w.indent().append("while (!_FN.isTrue("); condition.write(w); w.append(")) {\n"); w.inc(); statement.write(w); w.dec(); w.line("}"); }
public void write(SourceWriter w) { w.indent().append("while (_FN.isTrue("); condition.write(w); w.append(")) {\n"); w.inc(); statement.write(w); w.dec(); w.line("}"); }
public void writeDeclaration(SourceWriter w) { if (left instanceof Variable) { String type = getJavaType(); String initialValue = getInitialValue(); w.indent() .append(type) .append(" ") .append(left) .append(" = ") .append(initialValue) .append(";") .newLine(); } }
public void writeDeclaration(SourceWriter w) { if (left instanceof Variable) { String type = getJavaType(); String initialValue = getInitialValue(); w.indent() .append(type) .append(" ") .append(left) .append(" = ") .append(initialValue) .append(";") .newLine(); } }
@Override public void write(SourceWriter w) { w.indent().append("for(Double ").append(loopVariable).append(" : ").append(listVariable); w.append(") {").newLine(); w.inc(); statement.write(w); w.dec(); w.line("}"); }
@Override public void write(SourceWriter w) { w.indent().append("for(Double ").append(loopVariable).append(" : ").append(listLiteral); w.append(") {").newLine(); w.inc(); statement.write(w); w.dec(); w.line("}"); }
@Override public void write(SourceWriter w) { String lowVariable = "_lo" + loopVariable; String highVariable = "_hi" + lowVariable; w.indent().append("final int ").append(lowVariable).append(" = (int) (").append(low).append(");").newLine(); w.indent().append("final int ").append(highVariable).append(" = (int) (").append(high).append(");").newLine(); w.indent().append("for(int ").append(loopVariable).append(" = ").append(lowVariable); w.append("; ").append(loopVariable).append(" <= ").append(highVariable); w.append("; ").append(loopVariable).append("++) {").newLine(); w.inc(); statement.write(w); w.dec(); w.line("}"); }
@Override public void write(SourceWriter w) { w.indent().append("for(Double ").append(loopVariable).append(" : ").append(listVariable); w.append(") {").newLine(); w.inc(); statement.write(w); w.dec(); w.line("}"); }
@Override public void write(SourceWriter w) { w.indent().append("for(Double ").append(loopVariable).append(" : ").append(listLiteral); w.append(") {").newLine(); w.inc(); statement.write(w); w.dec(); w.line("}"); }
@Override public void write(SourceWriter w) { w.indent().append("if (_FN.isTrue(").append(condition).append(")) {").newLine(); w.inc(); ifStatement.write(w); w.dec(); if (elseStatement != null) { w.line("} else {"); w.inc(); elseStatement.write(w); w.dec(); } w.line("}"); }