public override void Visit(AdditionExpression ae) { _sb.Append("("); ae.LHS.Accept(this); _sb.Append("+"); ae.RHS.Accept(this); _sb.Append(")"); }
public void Test_simple_addition() { var simple = new AdditionExpression(new Value(2), new Value(3)); var ep = new ExpressionPrinter(); ep.Visit(simple); Assert.That(ep.ToString(), Is.EqualTo("(2+3)")); }
public abstract void Visit(AdditionExpression e);