Class ParserNode
An interior node produced by a parser rule, containing zero or more child nodes.
public record ParserNode : ParseNode, IEquatable<ParseNode>, IEquatable<ParserNode>
- Inheritance
-
ParserNode
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
ParserNode(SourceSpan, string, Rule, IReadOnlyList<ParseNode>)
An interior node produced by a parser rule, containing zero or more child nodes.
public ParserNode(SourceSpan Span, string ModeName, Rule Rule, IReadOnlyList<ParseNode> Children)
Parameters
SpanSourceSpanModeNamestringRuleRuleChildrenIReadOnlyList<ParseNode>
Properties
Children
Gets the immutable ordered snapshot of child nodes.
public virtual IReadOnlyList<ParseNode> Children { get; init; }
Property Value
Methods
Equals(ParserNode?)
Determines whether another parser node has the same value and ordered children.
public virtual bool Equals(ParserNode? other)
Parameters
otherParserNodeThe parser node to compare with this instance.
Returns
GetHashCode()
Returns a hash code based on the node value and its ordered children.
public override int GetHashCode()
Returns
- int
A hash code for this parser node.