@Override protected void asString(final StringBuilder sb, final int i) { getBranch(0).toString(sb, i); sb.append('\n'); indent(sb, i); sb.append(op.toString()); sb.append('\n'); getBranch(1).toString(sb, i); }
@Override public void eval(final ExecutionContext context) { projectAndEval(context); setAnnotation(op.run(getBranch(0).getAnnotation(), getBranch(1).getAnnotation())); }
/** * @param name operation name * @param branch1 left operand * @param branch2 right operand */ public BinaryOp( final String name, final AnnotatedTree<?> branch1, final AnnotatedTree<?> branch2) { this(Op2.getOp(name), branch1, branch2); }