Table of Contents

Class ArrayBoundsNode

Namespace
RDCore.SDK.Model.AST.Declarations
Assembly
RDCore.SDK.dll

The (…) array-dimension clause of a variable declaration (MS-VBAL §5.2.3.1.3, Array Dim). An empty clause (Dim x()) declares a dynamic array (see IsResizable); one or more Bounds declare a fixed-size array.

public record ArrayBoundsNode : SyntaxNode, IEquatable<SyntaxNode>, IEquatable<ArrayBoundsNode>
Inheritance
ArrayBoundsNode
Implements
Inherited Members

Remarks

The declaration pass keeps each bound as verbatim expression text and does not evaluate it: a bound is a <constant-expression> that may reference module or local Consts, and an omitted lower bound resolves against Option Base — both are a later semantic pass's concern.

Constructors

ArrayBoundsNode(SyntaxNodeId, SourceLocation, ImmutableArray<ArrayDimensionBound>)

The (…) array-dimension clause of a variable declaration (MS-VBAL §5.2.3.1.3, Array Dim). An empty clause (Dim x()) declares a dynamic array (see IsResizable); one or more Bounds declare a fixed-size array.

public ArrayBoundsNode(SyntaxNodeId Identity, SourceLocation Location, ImmutableArray<ArrayDimensionBound> Bounds)

Parameters

Identity SyntaxNodeId

A unique identifier for this specific syntax node.

Location SourceLocation

The source location of the array-dimension clause.

Bounds ImmutableArray<ArrayDimensionBound>

One entry per declared dimension, outermost first; empty for a dynamic array.

Remarks

The declaration pass keeps each bound as verbatim expression text and does not evaluate it: a bound is a <constant-expression> that may reference module or local Consts, and an omitted lower bound resolves against Option Base — both are a later semantic pass's concern.

Properties

Bounds

One entry per declared dimension, outermost first; empty for a dynamic array.

public ImmutableArray<ArrayDimensionBound> Bounds { get; init; }

Property Value

ImmutableArray<ArrayDimensionBound>

IsResizable

true when the clause declares a dynamic array — an empty () with no bounds, which must be given dimensions by a ReDim statement before use.

public bool IsResizable { get; }

Property Value

bool

Location

The source location of the array-dimension clause.

public SourceLocation Location { get; init; }

Property Value

SourceLocation

Rank

The number of declared dimensions (MS-VBAL array rank); 0 for a dynamic array.

public int Rank { get; }

Property Value

int