Skip to main content

Module ast

Module ast 

Source
Expand description

AST shapes that travel over the wire.

This is the SDK-facing slice of akribes_core::ast: just the types that consumers need to interpret engine events (Span, TypeRef, TypeField, ActorHint, FieldConstraint and the associated sentinel constants). The full akribes_core::ast module also defines Stmt, Expr, Program, and the rest of the language AST, which stays in core because the parser/analyzer/compiler own those shapes.

Structs§

Span
TypeField
TypeRef

Enums§

ActorHint
FieldConstraint
A single field-level validation constraint attached to a type field. Parsed from the Constraint Mini-Language (see docs/superpowers/specs/2026-04-18-epa-constraint-language-design.md).

Constants§

MAX_UNION_ARMS
Upper cap on discriminated-union arms. 8 is the tightest reliable value across Anthropic tool-use + Gemini responseSchema under preliminary testing. The analyzer raises AKRIBES-E-UNION-009 when an arm list exceeds this.
OPTIONAL_SENTINEL
Sentinel TypeRef.name for an optional type (T?). The inner field holds the wrapped T. none is assignable to any optional type; T? is NOT assignable to T without an explicit ?? default unwrap or a pattern-match on none. (D2)
VARIANT_UNION_SENTINEL
Sentinel TypeRef.name for a discriminated union (A | B | ...).