TreeConstructionNodeBase Class
Represents an abstract base class a tree construction node, used to output an IAstNode for an EbnfProduction.
public abstract class TreeConstructionNodeBase : IGrammarNode, ITreeConstructionNode
- Inheritance:
- System.Object Object
- Derived:
- ParentTreeConstructionNodeBase
- Implements:
- ITreeConstructionNode
Constructors
TreeConstructionNodeBase()
protected TreeConstructionNodeBase()
Properties
Children
Gets the collection of child ITreeConstructionNode objects.
public virtual IEnumerable<ITreeConstructionNode> Children { get; }
Property Value
- System.Collections.Generic.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
- System.Boolean:
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
- System.Boolean:
true
if this node creates a list of IAstNode results.
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
- System.String:
A string containing the EBNF form of the rewrite node.
Inherited Members
- System.Object.ToString()
- System.Object.Equals(System.Object)
- System.Object.Equals(System.Object, System.Object)
- System.Object.ReferenceEquals(System.Object, System.Object)
- System.Object.GetHashCode()
- System.Object.GetType()
- System.Object.MemberwiseClone()