Class OnErrorGoToStatementNode
- Namespace
- RDCore.SDK.Model.AST.Statements
- Assembly
- RDCore.SDK.dll
Represents a statement that defines a locally-scoped error handler label (MS-VBAL §5.4.4.1).
public record OnErrorGoToStatementNode : StatementNode, IEquatable<SyntaxNode>, IExecutableNode, IEquatable<StatementNode>, IEquatable<OnErrorGoToStatementNode>
- Inheritance
-
OnErrorGoToStatementNode
- Implements
- Inherited Members
Constructors
OnErrorGoToStatementNode(SyntaxNodeId, SourceLocation, ExpressionNode)
Represents a statement that defines a locally-scoped error handler label (MS-VBAL §5.4.4.1).
public OnErrorGoToStatementNode(SyntaxNodeId Identity, SourceLocation SourceLocation, ExpressionNode LabelExpression)
Parameters
IdentitySyntaxNodeIdA unique identifier for this specific syntax node.
SourceLocationSourceLocationThe document location (
Uri+Range) of the bound expression.LabelExpressionExpressionNodeWhatever expression followed
GoTo— usually a real label, but not always: MS-VBAL §5.4.4.1 carves out the line-number-label0as a sentinel meaning "error handling disabled", not a label to resolve. Real-world VBA also treats-1as a sentinel ("clear the current error, so a laterOn Errorcan re-arm"), though MS-VBAL does not document that form. A future consumer resolving this against the module's labels must special-case both before treating it as a real label reference.
Properties
LabelExpression
Whatever expression followed GoTo — usually a real label, but not always: MS-VBAL §5.4.4.1
carves out the line-number-label 0 as a sentinel meaning "error handling disabled", not a
label to resolve. Real-world VBA also treats -1 as a sentinel ("clear the current error, so a
later On Error can re-arm"), though MS-VBAL does not document that form. A future consumer
resolving this against the module's labels must special-case both before treating it as a real
label reference.
public ExpressionNode LabelExpression { get; init; }