MrKWatkins.Ast Help

CompositeListener<TContext, TBaseNode> Class

Definition

A Listener<TContext, TNode> built from multiple other listeners that listen to specific node types. When a node is reached the listener with the most specific type for the node will be used. Only a single listener will ever listen to a node. If no suitable listener is found the node will be ignored but it's descendents will still be listened to.

public sealed class CompositeListener<TContext, TBaseNode> : Listener<TContext, TBaseNode>, 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

AfterListenToNode(TContext, TBaseNode)

BeforeListenToNode(TContext, TBaseNode)

Build()

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

ListenToNode(TContext, TBaseNode)

Last modified: 09 September 2024