Table of Contents

Class ParserNode

Namespace
Utils.Parser.Runtime
Assembly
Utils.Parser.dll

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

Span SourceSpan
ModeName string
Rule Rule
Children IReadOnlyList<ParseNode>

Properties

Children

Gets the immutable ordered snapshot of child nodes.

public virtual IReadOnlyList<ParseNode> Children { get; init; }

Property Value

IReadOnlyList<ParseNode>

Methods

Equals(ParserNode?)

Determines whether another parser node has the same value and ordered children.

public virtual bool Equals(ParserNode? other)

Parameters

other ParserNode

The parser node to compare with this instance.

Returns

bool

true when the node values and ordered children are equal; otherwise, false.

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.