Expand description
A span-carrying adam-lang structural AST, built by crate::AdamAstParser as an alternative to
crate::AdamParser’s direct adam_rs::Sheet construction. Method bodies and cell
initializers reference [cel_parser::Expr]/[cel_parser::lex_lexer::Literal] directly.
Carries no resolved types, no TypeRegistry lookups, and never fails on semantic grounds
(unknown type name, literal/type mismatch, undeclared cell, arity mismatch) — those checks
are deferred to a later, separate compile-to-Sheet phase, mirroring
[cel_parser::AstContext]’s design.
Structs§
- Binding
Decl binding = binding_target ":=" expression ";".binding_target = identifier | "(" identifier { "," identifier } [ "," ] ")".- Cell
Decl cell_decl = "cell" identifier cell_type_init [ cell_filter ] [ "require" "{" { requirement } "}" ] ";".- Cell
Filter cell_filter = "filter" expression.- Conditional
Branch conditional_branch = literal_pattern "=>" "{" { relationship_decl } "}" [ "," ].literal_pattern = ["-"] literal.- Conditional
Decl conditional_decl = "conditional" expression "{" { conditional_branch } "}".- Default
Branch - The
_ => { ... }default branch of aconditional_decl, mirroringConditionalBranch’s shape (it has no match literal of its own). - Expr
Span - Source range of an AST node: start of its first token to end of its last.
- OutDecl
out_decl = "out" identifier [ ":" type_expr ] ":=" expression [ cell_filter ] [ "require" "{" { requirement } "}" ] ";".- Relationship
Decl relationship_decl = "relationship" "{" { binding } "}".- Require
Block - The optional
require { ... }block trailing anoutdeclaration’s initializer. - Requirement
Decl requirement = [ "@" identifier ] expression ";".- Sheet
- A parsed adam-lang sheet declaration, with source spans on every node.
- Source
Decl source_decl = "source" identifier cell_type_init [ cell_filter ] [ "require" "{" { requirement } "}" ] ";".
Enums§
- Comment
- A recovered
////* */comment, remembering which delimiter style the source used so a formatter can reproduce it instead of normalizing every comment to one style. - Sheet
Item - One top-level item inside a
sheet { ... }body. - Type
Expr type_expr = identifier | "(" [ type_expr ["," [ type_expr { "," type_expr } ]] ] ")".