IndexedIdentifierNode class
Represents an array element access using indexing in Balbismo.
An indexed identifier represents accessing a specific element of an array using square bracket notation. It combines an array identifier with an index expression to generate the appropriate LLVM IR for array element access.
Example Balbismo code:
int[10] arr;
arr[5] = 42; // 'arr[5]' is an IndexedIdentifierNode
int x = arr[i]; // 'arr[i]' is an IndexedIdentifierNode
This generates LLVM IR like:
%arrayPtr.0 = getelementptr i64, i64* %ptr.arr.0, i64 %index
%var0 = load i64, ptr %arrayPtr.0
Constructors
-
IndexedIdentifierNode.new(String value, Node<
dynamic, LangVal< index)LangType> > - Constructs an indexed identifier with an array name and index expression.
Properties
-
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
-
index
→ Node<
dynamic, LangVal< LangType> > -
Gets the index expression used to access the array element.
no setter
- nodeValue → String
-
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 element access by computing the element address and loading its value.
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