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
IdentitySyntaxNodeIdA unique identifier for this specific syntax node.
SourceLocationSourceLocationThe document location (
Uri+Range) of the bound expression.ConditionExpressionExpressionNodeThe condition; coerced to
Booleanto select theThenbranch.ThenBodyStatementBlockThe statements on the
Thenside. 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.ElseBodyStatementBlockThe statements on the
Elseside, ornullwhen the statement declares none.
Properties
ConditionExpression
The condition; coerced to Boolean to select the Then branch.
public ExpressionNode ConditionExpression { get; init; }
Property Value
ElseBody
The statements on the Else side, or null when the statement declares none.
public StatementBlock? ElseBody { get; init; }
Property Value
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; }