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 is_builtin_type_name(str name) -> bool
Return whether name is in the canonical L0 primitive inventory.
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(Type|None t) -> str
Format a type into a human-readable string.

Variables

tuple L0_PRIMITIVE_TYPES
_NULL_TYPE

Function documentation

bool l0_types::is_builtin_type_name(str name)

Return whether name is in the canonical L0 primitive inventory.

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.
Exceptions
ValueError If name is not in the canonical primitive inventory.

NullType l0_types::get_null_type()

Get the canonical NullType instance.

Returns The singleton NullType instance.

str l0_types::format_type(Type|None t)

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