Expand description
Typed AST for the IntentLang specification language.
Every node carries a Span with byte offsets into the source text,
supporting Phase 3 (Audit Bridge) source-location tracing.
Structs§
- Action
Call - A function-call-style action on the RHS of an edge rule.
- Action
Decl action ActionName { ... }- DocBlock
- A sequence of
---documentation lines. - Edge
Cases Decl edge_cases { rule* }- Edge
Rule when condition => action(args)- Ensures
Block ensures { item* }- Entity
Decl entity EntityName { field* }- Expr
- An expression node with its source span.
- Field
Decl name: Type— a field or parameter declaration.- File
- A complete
.intentfile. - Invariant
Decl invariant InvariantName { doc? expr }- Module
Decl module ModuleName- Prop
Entry key: valueinside a properties block.- Properties
Block properties { entry* }- Requires
Block requires { expr* }- Span
- Byte-offset span in the source text:
[start, end). - Type
Expr - A full type expression: a union type optionally marked optional with
?. - Type
Param name: valueinside a parameterized type likeDecimal(precision: 2).- When
Clause when condition => consequence
Enums§
- ArithOp
- Arithmetic operators.
- CallArg
- A call argument — either named (
key: value) or positional. - CmpOp
- Comparison operators.
- Ensures
Item - A postcondition — either a bare expression or a
whenclause. - Expr
Kind - Expression variants.
- Literal
- Literal values.
- Prop
Value - The right-hand side of a property entry.
- Quantifier
Kind - Quantifier kind.
- TopLevel
Item - Any top-level declaration.
- Type
Kind - The shape of a type.