Expand description
Abstract Syntax Tree (AST) definitions for Joule
This module defines the AST structures that represent parsed Joule code. The AST is an untyped, structural representation of the source code.
Re-exports§
Modules§
Structs§
- Block
- Block expression
- Closure
Param - Closure parameter (type is optional — can be inferred)
- Const
- Const declaration
- Effect
Decl - Algebraic effect declaration:
effect IO { fn read() -> String; fn write(s: String); } - Effect
Handler - An effect handler clause in a
handle ... with { ... }expression - Effect
Operation - A single operation within an effect declaration
- Enum
- Enum definition
- Extend
- Extension methods:
extend Type { fn method(&self) -> T { ... } } - Field
- Struct field
- Field
Init - Struct field initialization
- Field
Pattern - File
- A complete Joule source file
- Function
- Function definition
- Ident
- Identifier
- Impl
- Impl block
- Match
Arm - Match arm
- Module
Decl - Module declaration:
mod name;ormod name { ... } - Opaque
Type - Opaque type definition:
opaque type UserId = i64; - Param
- Function parameter
- Path
- Path (e.g.,
std::io::File) - Select
Arm - Select arm for channel selection
- Static
- Static declaration
- Struct
- Struct definition
- Supervisor
Child - A child process specification in a supervisor tree
- Supervisor
Decl - Supervisor tree declaration:
supervisor MySup { strategy: one_for_one, ... } - Thermal
Arm - Thermal adaptation arm
- Trait
- Trait definition
- Trait
Function - Type
Alias - Type alias definition:
type Name = Type; - Use
- Use statement
- Variant
- Enum variant
Enums§
- BinOp
- Binary operators
- Child
Restart - Restart policy for a supervised child
- Expr
- Expression
- Impl
Item - Index
Component - A single component of a multi-dimensional index expression.
- Item
- Top-level items (functions, structs, etc.)
- Literal
- Literal values
- Pattern
- Pattern (for destructuring)
- Proc
Macro Kind - Procedural macro kind
- Select
Operation - Channel operation in a select arm
- Statement
- Statement
- Supervisor
Strategy - Restart strategy for supervisor trees
- Trait
Item - Type
- Type annotations
- UnOp
- Unary operators
- UseTree
- Use tree for imports
- Variant
Fields - Visibility
- Visibility of an item