ICompositeVisitorBuilder<TContext, TBaseNode, TResult> Interface
Definition
Fluent interface to build a CompositeVisitor<TContext, TBaseNode, TResult>.
public abstract interface ICompositeVisitorBuilder<TContext, TBaseNode, TResult>
where TBaseNode : Node<TBaseNode>
Type Parameters
| Name | Description |
|---|---|
TContext |
The type of the context object. |
TBaseNode |
The base type of all nodes in the tree. |
TResult |
The type of the result of visiting a node. |
Methods
| Name | Description |
|---|---|
ToVisitor() |
Builds the CompositeVisitor<TContext, TBaseNode, TResult>. |
With(Visitor<TContext, TBaseNode, TResult>) |
Add a visitor for the base node type. Useful to provide a fallback visitor when there is no visitor for the specific node type registered. |
With<TNode>(NodeVisitor<TContext, TBaseNode, TNode, TResult>) |
Add a visitor for the specific node type TNode. This can be a base node type which will be used if there is no visitor for the specific node type registered. |