PrimitiveType class

Represents a primitive language type in Balbismo.

This class wraps primitive types (PrimitiveTypes.int and PrimitiveTypes.float) providing a consistent interface that integrates with the broader type system. Primitive types are the fundamental building blocks of more complex types like arrays.

Example usage:

final intType = PrimitiveType(PrimitiveTypes.int); // represents 'int' in Balbismo
final floatType = PrimitiveType(PrimitiveTypes.float); // represents 'float' in Balbismo
Inheritance

Constructors

PrimitiveType.new(PrimitiveTypes primitiveType)
Constructs a primitive type from a PrimitiveTypes enum value.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
irType String
Returns the LLVM IR type representation for this language type.
no setterinherited
primitiveType PrimitiveTypes
The underlying primitive type that forms the basis of this language type.
finalinherited
props List<Object>
Equatable implementation for proper type comparison.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
Returns the LLVM IR type string representation of this language type.
inherited

Operators

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