static void Main(string[] args) { var e = new MultiplicationExpression( new Value(12), new AdditionExpression( new Value(3), new MultiplicationExpression( new Value(4), new Value(9) ) ) ); var ep = new ExpressionPrinter(); ep.Visit(e); Console.WriteLine(ep.ToString()); }
public override void Visit(MultiplicationExpression me) { me.LHS.Accept(this); sb.Append("*"); me.RHS.Accept(this); }
public virtual void Visit(MultiplicationExpression me) { }