Table of Contents

Class InlineIfStatementNode

Namespace
RDCore.SDK.Model.AST.Statements
Assembly
RDCore.SDK.dll

Represents a single-line If statement (MS-VBAL §5.4.2.9) — same condition shape as IfBlockStatementNode, but both branches sit on one source line and may hold several colon-separated statements instead of a full block.

public record InlineIfStatementNode : StatementNode, IEquatable<SyntaxNode>, IExecutableNode, IEquatable<StatementNode>, IEquatable<InlineIfStatementNode>
Inheritance
InlineIfStatementNode
Implements
Inherited Members

Constructors

InlineIfStatementNode(SyntaxNodeId, SourceLocation, ExpressionNode, StatementBlock, StatementBlock?)

Represents a single-line If statement (MS-VBAL §5.4.2.9) — same condition shape as IfBlockStatementNode, but both branches sit on one source line and may hold several colon-separated statements instead of a full block.

public InlineIfStatementNode(SyntaxNodeId Identity, SourceLocation SourceLocation, ExpressionNode ConditionExpression, StatementBlock ThenBody, StatementBlock? ElseBody)

Parameters

Identity SyntaxNodeId

A unique identifier for this specific syntax node.

SourceLocation SourceLocation

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

ConditionExpression ExpressionNode

The condition; coerced to Boolean to select the Then branch.

ThenBody StatementBlock

The statements on the Then side. A bare line-number target (If x Then 100) is represented as its MS-VBAL-specified equivalent — a synthesized GoToStatementNode — as the first (and typically only) statement, rather than as a distinct label-reference shape.

ElseBody StatementBlock

The statements on the Else side, or null when the statement declares none.

Properties

ConditionExpression

The condition; coerced to Boolean to select the Then branch.

public ExpressionNode ConditionExpression { get; init; }

Property Value

ExpressionNode

ElseBody

The statements on the Else side, or null when the statement declares none.

public StatementBlock? ElseBody { get; init; }

Property Value

StatementBlock

ThenBody

The statements on the Then side. A bare line-number target (If x Then 100) is represented as its MS-VBAL-specified equivalent — a synthesized GoToStatementNode — as the first (and typically only) statement, rather than as a distinct label-reference shape.

public StatementBlock ThenBody { get; init; }

Property Value

StatementBlock