Class UnbuiltStatementTriviaNode
Preserves the raw source text of a required statement-level construct that ANTLR's own recovery left incomplete (a mandatory sub-expression/identifier missing) — the statement-position counterpart of UnbuiltExpressionTriviaNode.
public sealed record UnbuiltStatementTriviaNode : StatementNode, IEquatable<SyntaxNode>, IExecutableNode, IEquatable<StatementNode>, IEquatable<UnbuiltStatementTriviaNode>
- Inheritance
-
UnbuiltStatementTriviaNode
- Implements
- Inherited Members
Remarks
Applies only where the grammar guarantees the missing piece is mandatory (a bare
RaiseEvent with no event name, a GoTo with no label, an On Error Resume missing
its Next) — never where a piece is legitimately optional and its absence is valid, unrecovered
input (e.g. an omitted optional argument). See UnbuiltExpressionTriviaNode's remarks for
why silently building nothing there would still lose reconstructable source text.
Constructors
UnbuiltStatementTriviaNode(SyntaxNodeId, SourceLocation, string, ImmutableArray<SyntaxNode>)
Preserves the raw source text of a required statement-level construct that ANTLR's own recovery left incomplete (a mandatory sub-expression/identifier missing) — the statement-position counterpart of UnbuiltExpressionTriviaNode.
public UnbuiltStatementTriviaNode(SyntaxNodeId Identity, SourceLocation SourceLocation, string Source, ImmutableArray<SyntaxNode> Inputs)
Parameters
IdentitySyntaxNodeIdA unique identifier for this specific syntax node.
SourceLocationSourceLocationThe document location (
Uri+Range) of the unbuilt statement.SourcestringThe exact original source text of the unbuilt statement.
InputsImmutableArray<SyntaxNode>Whatever sub-expression(s) the grammar's own walk already built underneath it.
Remarks
Applies only where the grammar guarantees the missing piece is mandatory (a bare
RaiseEvent with no event name, a GoTo with no label, an On Error Resume missing
its Next) — never where a piece is legitimately optional and its absence is valid, unrecovered
input (e.g. an omitted optional argument). See UnbuiltExpressionTriviaNode's remarks for
why silently building nothing there would still lose reconstructable source text.
Properties
Source
The exact original source text of the unbuilt statement.
public string Source { get; init; }