Class ForEachStatementNode
- Namespace
- RDCore.SDK.Model.AST.Statements
- Assembly
- RDCore.SDK.dll
Represents a For Each...Next loop construct.
public record ForEachStatementNode : StatementNode, IEquatable<SyntaxNode>, IExecutableNode, IEquatable<StatementNode>, IEquatable<ForEachStatementNode>
- Inheritance
-
ForEachStatementNode
- Implements
- Inherited Members
- Extension Methods
Constructors
ForEachStatementNode(SyntaxNodeId, SourceLocation, ExpressionNode, ExpressionNode, StatementBlock)
Represents a For Each...Next loop construct.
public ForEachStatementNode(SyntaxNodeId Identity, SourceLocation SourceLocation, ExpressionNode ControlExpression, ExpressionNode CollectionExpression, StatementBlock Body)
Parameters
IdentitySyntaxNodeIdA unique identifier for this specific syntax node.
SourceLocationSourceLocationThe document location (
Uri+Range) of the bound expression.ControlExpressionExpressionNodeAn object or variant expression that resolves to the loop control variable.
CollectionExpressionExpressionNodeAn object expression that resolves to an enumerable object (or array).
BodyStatementBlockThe executable statements in the body of the loop.
Properties
Body
The executable statements in the body of the loop.
public StatementBlock Body { get; init; }
Property Value
CollectionExpression
An object expression that resolves to an enumerable object (or array).
public ExpressionNode CollectionExpression { get; init; }
Property Value
ControlExpression
An object or variant expression that resolves to the loop control variable.
public ExpressionNode ControlExpression { get; init; }
Property Value
NextExpression
The variable named by the Next statement that ends the loop - Next i, or the name after a comma of the Next of a loop nested in
it (Next j, i) - or null when it names none. It is the loop's control variable (MS-VBA: "Invalid Next control variable
reference" when it is not).
public ExpressionNode? NextExpression { get; init; }