Class RedimBoundsNode
- Namespace
- RDCore.SDK.Model.AST.Declarations
- Assembly
- RDCore.SDK.dll
The (…) dimension clause of a ReDim statement — MS-VBAL §5.4.3.3's
dynamic-bounds-list.
public record RedimBoundsNode : SyntaxNode, IEquatable<SyntaxNode>, IEquatable<RedimBoundsNode>
- Inheritance
-
RedimBoundsNode
- Implements
- Inherited Members
Remarks
Not an ArrayBoundsNode, though the two look alike in source. A Dim's bounds are
<constant-expression>s that a later pass folds, so that node keeps them as verbatim text; a
ReDim's are ordinary run-time expressions — ReDim Grid(1 To n * 2) is legal and
n is not knowable until the statement runs. Text cannot be evaluated without parsing it again, so
these are real expression nodes.
Constructors
RedimBoundsNode(SyntaxNodeId, SourceLocation, ImmutableArray<RedimDimensionNode>)
The (…) dimension clause of a ReDim statement — MS-VBAL §5.4.3.3's
dynamic-bounds-list.
public RedimBoundsNode(SyntaxNodeId Identity, SourceLocation Location, ImmutableArray<RedimDimensionNode> Dimensions)
Parameters
IdentitySyntaxNodeIdA unique identifier for this specific syntax node.
LocationSourceLocationThe source location of the dimension clause.
DimensionsImmutableArray<RedimDimensionNode>One entry per dimension, outermost first.
Remarks
Not an ArrayBoundsNode, though the two look alike in source. A Dim's bounds are
<constant-expression>s that a later pass folds, so that node keeps them as verbatim text; a
ReDim's are ordinary run-time expressions — ReDim Grid(1 To n * 2) is legal and
n is not knowable until the statement runs. Text cannot be evaluated without parsing it again, so
these are real expression nodes.
Properties
Dimensions
One entry per dimension, outermost first.
public ImmutableArray<RedimDimensionNode> Dimensions { get; init; }
Property Value
Location
The source location of the dimension clause.
public SourceLocation Location { get; init; }
Property Value
Rank
The number of dimensions the statement gives the array (MS-VBAL array rank).
public int Rank { get; }