Table of Contents

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

Identity SyntaxNodeId

A unique identifier for this specific syntax node.

SourceLocation SourceLocation

The document location (Uri+Range) of the bound expression.

LabelExpression ExpressionNode

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.

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; }

Property Value

ExpressionNode