PrintNode class

Represents a printf statement for output in Balbismo.

A print node handles formatted output using printf-style format strings. It takes a format string and a list of values to be formatted and printed. The format string uses standard C-style format specifiers like %d, %f, %s.

Example Balbismo code:

int x = 42;
float y = 3.14;
printf("Integer: %d, Float: %f\n", x, y);  // This is a PrintNode

This generates LLVM IR like:

call i32 (i8*, ...) @printf(i8* @str.0, i64 %x, double %y)
Inheritance

Constructors

PrintNode.new(StringLiteral literal, List<Node<dynamic, LangVal<LangType>>> children)
Constructs a print statement with format string and values.

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
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
values List<Node<dynamic, LangVal<LangType>>>
no setter

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