Table of Contents

Class ErrorNode

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

A synthetic node inserted when parsing fails at a given position. An error node is never thrown as an exception; it is always embedded in the tree so that partial results remain accessible. Rule holds the rule that was being attempted when the failure occurred.

public record ErrorNode : ParseNode, IEquatable<ParseNode>, IEquatable<ErrorNode>
Inheritance
ErrorNode
Implements
Inherited Members
Extension Methods

Constructors

ErrorNode(SourceSpan, string, string, Rule?)

A synthetic node inserted when parsing fails at a given position. An error node is never thrown as an exception; it is always embedded in the tree so that partial results remain accessible. Rule holds the rule that was being attempted when the failure occurred.

public ErrorNode(SourceSpan Span, string ModeName, string Message, Rule? AttemptedRule = null)

Parameters

Span SourceSpan
ModeName string
Message string
AttemptedRule Rule

Properties

AttemptedRule

public Rule? AttemptedRule { get; init; }

Property Value

Rule

Message

public string Message { get; init; }

Property Value

string