ArraySpecification class

Represents an array size specification in Balbismo.

Array specifications can be either:

  • A constant integer literal for fixed-size arrays
  • An expression that evaluates to an integer at runtime for dynamic arrays
  • Null for arrays with unspecified size (not currently supported)

Example Balbismo code:

int[5] arr1;      // Constant size specification
int[size] arr2;   // Expression size specification
Inheritance

Constructors

ArraySpecification.new(Node<dynamic, LangVal<LangType>>? expr)
Constructs an array size specification with an optional size expression.

Properties

childExpr Node<dynamic, LangVal<LangType>>?
Gets the size expression from the children, or null if no expression provided.
no setter
children List<Node>
Child nodes that form the structure of this node.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
id int
Unique identifier for this node, used for LLVM register naming.
getter/setter pairinherited
nodeValue → void
The primary value associated with this node (varies by node type).
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

evaluate(SymbolTable table) LangVal<LangType>?
Evaluates the array size expression if present.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited