예제 #1
0
 public override void Visit(AdditionExpression ae)
 {
     _sb.Append("(");
     ae.LHS.Accept(this);
     _sb.Append("+");
     ae.RHS.Accept(this);
     _sb.Append(")");
 }
예제 #2
0
        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)"));
        }
예제 #3
0
 public abstract void Visit(AdditionExpression e);