@Test public void shouldSupportAdditiveOperators() { assertThat(engine.evaluate(number(2), ADD, number(1)), is(3.0)); assertThat(engine.evaluate(number(2), SUB, number(1)), is(1.0)); }
public double evaluate(Token... tokens) { this.pos = -1; this.stream = tokens; return expression().getValue(); }
Engine { public double evaluate(Token... tokens) { this.pos = -1; this.stream = tokens; return expression().getValue(); } }
Engine { public double evaluate(Token... tokens) { this.pos = -1; this.stream = tokens; return expression().getValue(); } Engine(); }
Engine { public double evaluate(Token... tokens) { this.pos = -1; this.stream = tokens; return expression().getValue(); } Engine(); void setVariable(String name, double value); double evaluate(Token... tokens); }
Engine { public double evaluate(Token... tokens) { this.pos = -1; this.stream = tokens; return expression().getValue(); } Engine(); void setVariable(String name, double value); double evaluate(Token... tokens);  }