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
Gets the collection of child ITreeConstructionNode objects.
public virtual IEnumerable<ITreeConstructionNode> Children { get; }
Property Value
- IEnumerable<ITreeConstructionNode>:
The collection of child ITreeConstructionNode objects.
IsCompiled
Gets 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
Gets 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)
Returns 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 rewrite node in EBNF form.
public virtual string ToEbnfString()
Returns
- string:
A string containing the EBNF form of the rewrite node.