ScanfNode class
Represents a scanf statement for input in Balbismo.
A scanf node handles formatted input using scanf-style format strings. It takes a format string and a list of variables to read values into. The format string uses standard C-style format specifiers like %d, %f.
Example Balbismo code:
int x;
float y;
scanf("%d %f", x, y); // This is a ScanfNode
This generates LLVM IR like:
call i32 (i8*, ...) @scanf(i8* @str.0, i64* %ptr.x.0, double* %ptr.y.0)
Constructors
-
ScanfNode.new(StringLiteral literal, List<
IdentifierNode> children) - Constructs a scanf statement with format string and target variables.
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
-
identifiers
→ List<
IdentifierNode> -
no setter
- literal → StringLiteral
-
no setter
- 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) → void -
Evaluates this AST node and generates corresponding LLVM IR code.
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