NodeVisitor<TBaseNode, TNode, TResult> Class
Definition
A Visitor<TNode, TResult> that only visits nodes of a specific type and does not take a context object. Visiting a node of any other type calls VisitUnhandledNode(TBaseNode), which throws by default. Typed visitors are usually combined in a CompositeVisitor<TBaseNode, TResult>, which dispatches each node to the visitor for its type.
public abstract class NodeVisitor<TBaseNode, TNode, TResult> : Visitor<TBaseNode, TResult>
where TBaseNode : Node<TBaseNode>
where TNode : TBaseNode
View source
Type Parameters
| Name |
Description |
TBaseNode |
The base type of all nodes in the tree. |
TNode |
The type of the nodes to visit. |
TResult |
The type of the result of visiting a node. |
Constructors
Methods