Class ErrorNode
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
SpanSourceSpanModeNamestringMessagestringAttemptedRuleRule
Properties
AttemptedRule
public Rule? AttemptedRule { get; init; }
Property Value
Message
public string Message { get; init; }