ICompositeVisitorBuilder<TBaseNode, TResult> Interface ​
Definition ​
Fluent interface to build a CompositeVisitor<TBaseNode, TResult>.
c#
public abstract interface ICompositeVisitorBuilder<TBaseNode, TResult>
where TBaseNode : Node<TBaseNode>Type Parameters ​
| Name | Description |
|---|---|
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<TBaseNode, TResult>. |
With(Visitor<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<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. |