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
IsCompiled
Indicates whether the grammar and its elements are compiled, via a call to its Compile() method.
public bool IsCompiled { get; }
Property Value
- bool:
trueif 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
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
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
- object.GetType()
- object.MemberwiseClone()
- object.ToString()
- object.Equals(object)
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
- object.GetHashCode()