Skip to main content

Module statements

Module statements 

Source
Expand description

Statement AST nodes, type annotations, and parameter definitions.

A Statement is any construct that does not directly produce a value (declarations, control flow, imports). Every node carries the source Span it was parsed from.

§Resolved variants

The Resolver pass rewrites name-based declaration and loop variants into their Resolved* counterparts, adding a slot: usize field that gives the variable’s index in its environment frame. This eliminates all runtime HashMap lookups in the evaluator.

§Type annotations

TypeAnnotation distinguishes mutable (dec) and constant (const) bindings at the type level via separate variants (Int vs CInt, etc.).

Structs§

Param
A single function or lambda parameter: a name and its type annotation.
Statement
A statement paired with its source span.

Enums§

FunctionAttribute
MatchPattern
StatementKind
TypeAnnotation
The type of a variable, constant, or parameter binding.