l0_types namespace

Classes

class BuiltinType
A built-in primitive type.
class EnumType
A user-defined enum type.
class FuncType
A function signature type.
class NullableType
A nullable (optional) wrapper for another type (T?).
class NullType
The type of the 'null' literal.
class PointerType
A pointer to another type (T*).
class StructType
A user-defined struct type.
class Type
Base class for all semantic types.

Functions

auto get_builtin_type(str name) -> BuiltinType
Get or create a canonical BuiltinType for a given name.
auto get_null_type() -> NullType
Get the canonical NullType instance.
auto format_type(Optional t[Type]) -> str
Format a type into a human-readable string.

Variables

tuple L0_PRIMITIVE_TYPES
_NULL_TYPE

Function documentation

BuiltinType l0_types::get_builtin_type(str name)

Get or create a canonical BuiltinType for a given name.

Parameters
name The primitive type name.
Returns The cached or new BuiltinType instance.

NullType l0_types::get_null_type()

Get the canonical NullType instance.

Returns The singleton NullType instance.

str l0_types::format_type(Optional t[Type])

Format a type into a human-readable string.

Parameters
t The Type to format, or None.
Returns A string representation of the type (e.g., "int*", "std::Point?").

Variable documentation