Table of Contents

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

Identity SyntaxNodeId

A unique identifier for this specific syntax node.

SourceLocation SourceLocation

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

ConditionExpression ExpressionNode

The If branch's condition; coerced to Boolean to select this branch.

Body StatementBlock

The executable statements in the If branch's body.

ElseIfBlocks ImmutableArray<ElseIfBlockStatementNode>

The ElseIf branches, in source order.

ElseBlock ElseBlockStatementNode

The Else branch, or null when the block declares none.

Properties

Body

The executable statements in the If branch's body.

public StatementBlock Body { get; init; }

Property Value

StatementBlock

ConditionExpression

The If branch's condition; coerced to Boolean to select this branch.

public ExpressionNode ConditionExpression { get; init; }

Property Value

ExpressionNode

ElseBlock

The Else branch, or null when the block declares none.

public ElseBlockStatementNode? ElseBlock { get; init; }

Property Value

ElseBlockStatementNode

ElseIfBlocks

The ElseIf branches, in source order.

public ImmutableArray<ElseIfBlockStatementNode> ElseIfBlocks { get; init; }

Property Value

ImmutableArray<ElseIfBlockStatementNode>