Class IfBlockStatementNode
- Namespace
- RDCore.SDK.Model.AST.Statements
- Assembly
- RDCore.SDK.dll
An executable statement node that represents an If...Then...ElseIf...Else...End If block.
public record IfBlockStatementNode : StatementNode, IEquatable<SyntaxNode>, IExecutableNode, IEquatable<StatementNode>, IEquatable<IfBlockStatementNode>
- Inheritance
-
IfBlockStatementNode
- Implements
- Inherited Members
Constructors
IfBlockStatementNode(SyntaxNodeId, SourceLocation, ExpressionNode, StatementBlock, ImmutableArray<ElseIfBlockStatementNode>, ElseBlockStatementNode?)
An executable statement node that represents an If...Then...ElseIf...Else...End If block.
public IfBlockStatementNode(SyntaxNodeId Identity, SourceLocation SourceLocation, ExpressionNode ConditionExpression, StatementBlock Body, ImmutableArray<ElseIfBlockStatementNode> ElseIfBlocks, ElseBlockStatementNode? ElseBlock)
Parameters
IdentitySyntaxNodeIdA unique identifier for this specific syntax node.
SourceLocationSourceLocationThe document location (
Uri+Range) of the bound expression.ConditionExpressionExpressionNodeThe
Ifbranch's condition; coerced toBooleanto select this branch.BodyStatementBlockThe executable statements in the
Ifbranch's body.ElseIfBlocksImmutableArray<ElseIfBlockStatementNode>The
ElseIfbranches, in source order.ElseBlockElseBlockStatementNodeThe
Elsebranch, ornullwhen the block declares none.
Properties
Body
The executable statements in the If branch's body.
public StatementBlock Body { get; init; }
Property Value
ConditionExpression
The If branch's condition; coerced to Boolean to select this branch.
public ExpressionNode ConditionExpression { get; init; }
Property Value
ElseBlock
The Else branch, or null when the block declares none.
public ElseBlockStatementNode? ElseBlock { get; init; }
Property Value
ElseIfBlocks
The ElseIf branches, in source order.
public ImmutableArray<ElseIfBlockStatementNode> ElseIfBlocks { get; init; }