public override void Visit(AdditionExpression ae)
 {
     sb.Append("(");
     ae.LHS.Accept(this);
     sb.Append("+");
     ae.RHS.Accept(this);
     sb.Append(")");
 }
        static void Main(string[] args)
        {
            var e = new AdditionExpression(
                new Value(1),
                new AdditionExpression(
                    new MultiplicationExpression(
                        new Value(2),
                        new Value(3)),
                    new Value(4)));

            var ep = new ExpressionPrinter();

            ep.Visit(e);
            Console.WriteLine(ep);
        }
 public abstract void Visit(AdditionExpression ex);