Skip to main content

Module ir

Module ir 

Source
Expand description

Core IR types for surface syntax translation.

This IR is deliberately minimal and opcode-agnostic. It represents common programming constructs without domain-specific knowledge.

Domain operations like lotus.spawn_entity(x) are just function calls - the runtime (spore) provides the actual implementations.

Structs§

ExportName
A single name in an export specifier list.
Function
A function definition.
ImportName
A single name in an import or export specifier list.
Method
A method in a class definition.
Param
A function parameter.
PatField
A field in an object destructuring pattern.
Program
A complete program/module.
Span
Source location span (1-based lines, 0-based columns).

Enums§

BinaryOp
Binary operators.
Expr
An expression that produces a value.
Literal
Literal values.
Pat
A binding pattern.
Stmt
A statement (doesn’t produce a value directly).
TemplatePart
A part of a template literal.
UnaryOp
Unary operators.

Traits§

StructureEq
Trait for structural equality comparison.