Skip to main content

Module ast

Module ast 

Source
Expand description

Source-preserving syntax nodes used by the parser and interpreter.

Structs§

Class
A nominal value type. Constructing it does not implicitly create an ECS entity.
Diagnostic
A portable diagnostic. The source is retained by crate::Program.
Enum
A nominal algebraic data type and its constructor cases.
EnumCase
One constructor case of an algebraic data type.
Expr
An expression and its original UTF-8 source location.
Field
A typed class field with an optional constant default expression.
Function
A function body or trait method signature. Empty trait bodies specify required operations.
Implementation
Methods attached to a class, optionally checked against a trait contract.
MatchArm
A match arm retaining both its structural pattern and source expression.
Parameter
An explicitly typed function argument. Method self is implicit and absent here.
Span
Byte offsets in a named UTF-8 source module. End is exclusive.
Stmt
A statement and the source range used for execution tracing.
System
A persistent typed component query with explicit lifecycle callbacks.
Trait
A named set of method signatures implemented explicitly by classes.

Enums§

ExprKind
Expression syntax before runtime value and effect checks.
IndexExpr
One selector in a collection or tensor indexing expression.
Item
A module declaration or one-time initializer, retained in source order.
Pattern
Structural pattern syntax. Resolution and exhaustiveness are checker concerns.
StmtKind
Executable statement syntax with lexical binding and explicit control flow.
Type
Types have nominal class names and an explicit homogeneous list form.