IntVal class

Represents an integer literal value in Balbismo.

An integer value node represents a constant integer literal in the source code. When evaluated, it generates LLVM IR to create the integer value using an add instruction with 0 (a common LLVM idiom for creating constants).

Example Balbismo code:

int x = 42;       // '42' is an IntVal node
int y = x + 10;   // '10' is an IntVal node

This generates LLVM IR like:

%val0 = add i64 0, 42
Inheritance

Constructors

IntVal.new(String value)
Constructs an integer value node by parsing the string representation.

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
nodeValue → int
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 integer literal by generating LLVM IR to create the constant 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