Ejemplo n.º 1
0
 public virtual void Visit(Symbol symbol)
 {
     if ((object)symbol != null)
     {
         symbol.Accept(this);
     }
 }
Ejemplo n.º 2
0
        /// <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));
        }
Ejemplo n.º 3
0
 public virtual TResult Visit(Symbol symbol)
 {
     return((object)symbol == null
         ? default(TResult)
         : symbol.Accept(this));
 }