In This Article

TreeConstructionNodeBase Class

Represents an abstract base class a tree construction node, used to output an IAstNode for an EbnfProduction.

public abstract class TreeConstructionNodeBase : ITreeConstructionNode
Inheritance:
object object
Derived:
ParentTreeConstructionNodeBase
Implements:
ITreeConstructionNode

Constructors

TreeConstructionNodeBase()

Initializes an instance of the class.

protected TreeConstructionNodeBase()

Properties

Children

The collection of child ITreeConstructionNode that are accessible from this node.

public virtual IEnumerable<ITreeConstructionNode>? Children { get; }

Property Value

IEnumerable<ITreeConstructionNode>

IsCompiled

Indicates whether the grammar and its elements are compiled, via a call to its Compile() method.

public bool IsCompiled { get; }

Property Value

bool:

true if the grammar and its elements are compiled; otherwise, false.

IsList

Indicates whether this tree construction node returns a placeholder node that contains a list of IAstNode results.

public virtual bool IsList { get; }

Property Value

bool:

true if this node creates a list of IAstNode results.

Methods

CreateNode(IAstNodeMatchCollection)

The IAstNode that is created for this tree construction node.

public abstract IAstNode? CreateNode(IAstNodeMatchCollection matches)
Parameter Type Description
matches IAstNodeMatchCollection

The collection of matched IAstNode objects within the current IAstNodeBuilder scope.

Returns

IAstNode

ToEbnfString()

Outputs the contents of the production rule in EBNF form.

public virtual string? ToEbnfString()

Returns

string:

A string containing the EBNF form of the production rule.

Inherited Members

Extension Methods