MrKWatkins.Ast Help

ICompositeListenerBuilder<TContext, TBaseNode> Interface

Definition

Fluent interface to build a CompositeListener<TContext, TBaseNode>.

public abstract interface ICompositeListenerBuilder<TContext, TBaseNode> 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.

Methods

Name

Description

ToListener()

Builds the CompositeListener<TContext, TBaseNode>.

With(Listener<TContext, TBaseNode>)

Add a listener for the base node type. Useful to provide a fallback listener when there is no listener for the specific node type registered.

With<TNode>(Listener<TContext, TBaseNode, TNode>)

Add a listener for the specific node type TNode. This can be a base node type which will be used if there is no listener for the specific node type registered.

Last modified: 09 September 2024