public override void Accept(IAstNodeVisitor visitor) { visitor.Visit(this); }
public void Accept(IAstNodeVisitor visitor) { visitor.Visit(this); }
public override T Accept <T>(IAstNodeVisitor <T> visitor) { return(visitor.Visit(this)); }
/// <summary> /// Accept a visitor object. The visitor must be of type IAstNodeVisitor, however /// if the visitor also implements the most type-specific IAstLiteralNodeVisitor, /// or the next most type-specific IAstValueNodeVisitor interface, it uses the /// interface for the visit callback. Note that it uses the most type-specific /// interface as per its own inheritence tree. ie. /// <p/> /// AstLiteralNode -> AstValueNode -> SimpleNode <br/> /// IAstLiteralNodeVisitor -> IAstValueNodeVisitor -> IAstNodeVisitor /// <p/> /// This is an implementation of the AcyclicVisitor pattern by Robert C. Martin. /// Details of the pattern and its usage can be found at ObjectMentor.com.<br/> /// URL: http://www.objectmentor.com/resources/articles/acv.pdf /// </summary> /// <param name="visitor"> The object visiting this node. </param> /// <param name="sessionData"> Misc sessionData to use during this visit. </param> /// <returns> The session data object. </returns> internal override object Accept( IAstNodeVisitor visitor, object sessionData ) { if ( visitor is IAstLiteralNodeVisitor ) return ( (IAstLiteralNodeVisitor)visitor ).Visit( this, sessionData ); if ( visitor is IAstValueNodeVisitor ) return ( (IAstValueNodeVisitor)visitor ).Visit( this, sessionData ); return visitor.Visit( this, sessionData ); }
public void Accept(IAstNodeVisitor visitor) { visitor.Visit(this); }
/// <inheritdoc /> public override TOut Accept <TState, TOut>(IAstNodeVisitor <TInstruction, TState, TOut> visitor, TState state) => visitor.Visit(this, state);
/// <inheritdoc /> public override void Accept <TState>(IAstNodeVisitor <TInstruction, TState> visitor, TState state) => visitor.Visit(this, state);
public override TResult Accept <TResult, T>(IAstNodeVisitor <TResult, T> visitor, T value) { return(visitor.Visit(this, value)); }
public override TResult Accept <TResult>(IAstNodeVisitor <TResult> visitor) { return(visitor.Visit(this)); }
/// <summary> /// Accept a visitor object. The visitor must be of type IAstNodeVisitor, however /// if the visitor also implements the more type-specific IAstFunctionNodeVisitor, /// it uses its interface for the visit callback. /// <p/> /// This is an implementation of the AcyclicVisitor pattern by Robert C. Martin. /// Details of the pattern and its usage can be found at ObjectMentor.com.<br/> /// URL: http://www.objectmentor.com/resources/articles/acv.pdf /// </summary> /// <param name="visitor"> /// The object visiting this node. /// </param> /// <param name="sessionData"> /// Misc data to use during this visit. /// </param> /// <returns> /// The session data object. /// </returns> internal override object Accept( IAstNodeVisitor visitor, object sessionData ) { if ( visitor is IAstFunctionNodeVisitor ) return ( (IAstFunctionNodeVisitor)visitor ).Visit( this, sessionData ); return visitor.Visit( this, sessionData ); }