public override TResult Accept <TResult>(IParseTreeVisitor <TResult> visitor) { IExprVisitor <TResult> typedVisitor = visitor as IExprVisitor <TResult>; if (typedVisitor != null) { return(typedVisitor.VisitAddSub(this)); } else { return(visitor.VisitChildren(this)); } }