Skip to main content

Module ast

Module ast 

Source
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§

ActionCall
A function-call-style action on the RHS of an edge rule.
ActionDecl
action ActionName { ... }
DocBlock
A sequence of --- documentation lines.
EdgeCasesDecl
edge_cases { rule* }
EdgeRule
when condition => action(args)
EnsuresBlock
ensures { item* }
EntityDecl
entity EntityName { field* }
Expr
An expression node with its source span.
FieldDecl
name: Type — a field or parameter declaration.
File
A complete .intent file.
InvariantDecl
invariant InvariantName { doc? expr }
ModuleDecl
module ModuleName
PropEntry
key: value inside a properties block.
PropertiesBlock
properties { entry* }
RequiresBlock
requires { expr* }
Span
Byte-offset span in the source text: [start, end).
TypeExpr
A full type expression: a union type optionally marked optional with ?.
TypeParam
name: value inside a parameterized type like Decimal(precision: 2).
WhenClause
when condition => consequence

Enums§

ArithOp
Arithmetic operators.
CallArg
A call argument — either named (key: value) or positional.
CmpOp
Comparison operators.
EnsuresItem
A postcondition — either a bare expression or a when clause.
ExprKind
Expression variants.
Literal
Literal values.
PropValue
The right-hand side of a property entry.
QuantifierKind
Quantifier kind.
TopLevelItem
Any top-level declaration.
TypeKind
The shape of a type.