Expand description
A span-carrying CEL expression AST, built by AstContext as an
alternative to DynSegmentContext’s direct
execution. Consumed as-is by adam-lang (method bodies/initializers), the language server, the
formatter, and the future macro-compilation backend. Carries no resolved types or operator
overloads: resolution and type/range validation are deferred to a later, separate phase.
Array nodes preserve optional recursive type ascriptions exactly as written — for example
[0, 1]: [i32], []: [[i32]], or []: [Custom] — using unresolved TypeExpr leaves so a
later checker can resolve names through built-in CEL types or a host registry. Recursive
tuple, array, and callable types compose without per-shape host registrations.
Structs§
- AstContext
ParserContextimplementation that builds a span-carryingExprtree instead of executing. Consults noOpLookup, inspects no runtime types, and never fails on semantic grounds — resolution and type/range checking are deferred to a later, separate type-checking phase (see the module doc comment).- Closure
Param - One
closure_param = identifier ":" type_expression— a closure literal’s declared parameter. - Expr
Span - Source range of an AST node: start of its first token to end of its last.
- Record
Init - One required record field initializer, retaining its written name, span, and value.
Enums§
- Expr
- A parsed CEL expression with source spans on every node.
- Literal
- A CEL literal, one variant per concrete Rust type
crate::ParserContext::push_literalcan receive frompush_literal_tokeninlib.rs. - Logical
Op - The two short-circuiting logical operators.