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 { ... }
ConstructorField
name: expr inside an entity constructor or when block.
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.
GivenBinding
name = TypeName { ... } or name = expr — a concrete binding in a test.
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).
TestDecl
test "name" { given { ... } when Action { ... } then { ... } }
TypeExpr
A full type expression: a union type optionally marked optional with ?.
TypeParam
name: value inside a parameterized type like Decimal(precision: 2).
UseDecl
use ModuleName or use ModuleName.ItemName
WhenAction
when ActionName { param: value, ... } — the action invocation in a test.
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.
GivenValue
The right-hand side of a given binding.
Literal
Literal values.
PropValue
The right-hand side of a property entry.
QuantifierKind
Quantifier kind.
ThenClause
The expected outcome of a test.
TopLevelItem
Any top-level declaration.
TypeKind
The shape of a type.