Table of Contents

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

Identity SyntaxNodeId

A unique identifier for this specific syntax node.

Location SourceLocation

The source location of the dimension clause.

Dimensions ImmutableArray<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

ImmutableArray<RedimDimensionNode>

Location

The source location of the dimension clause.

public SourceLocation Location { get; init; }

Property Value

SourceLocation

Rank

The number of dimensions the statement gives the array (MS-VBAL array rank).

public int Rank { get; }

Property Value

int