public virtual void Visit(Symbol symbol) { if ((object)symbol != null) { symbol.Accept(this); } }
/// <summary> /// Call the correct VisitXXX method in this class based on the particular type of symbol that is passed in. /// Return default(TResult) if symbol is null /// </summary> public virtual TResult Visit(Symbol symbol, TArgument argument = default(TArgument)) { if ((object)symbol == null) { return(default(TResult)); } return(symbol.Accept(this, argument)); }
public virtual TResult Visit(Symbol symbol) { return((object)symbol == null ? default(TResult) : symbol.Accept(this)); }