Skip to main content

Crate fable

Crate fable 

Source
Expand description

Lossless concrete syntax for Fable.

Fable is the tiny typed language intended to inspect and mutate Facet-reflected Rust values, then lower toward canonical Weavy IR. This crate owns the lossless lexer/parser plus the first typed lowering and interpreter surfaces for in-place scripts and in to out transforms.

Modules§

ast
Typed views over the Fable CST.

Structs§

FableField
Read-only handle passed to field-aware Fable host intrinsics.
FableFieldMut
Mutable handle passed to field-aware Fable host intrinsics.
FableIntrinsics
Host-call registry used while lowering Fable calls.
FablePlan
A reusable lowered Fable program for T.
FablePredicatePlan
A reusable lowered Fable predicate for T.
FableQueryPlan
A reusable lowered Fable query for T.
FableRootPlan
A reusable lowered Fable program over explicitly named roots.
FableRootPredicatePlan
A reusable lowered Fable predicate over explicitly named roots.
FableRootQueryPlan
A reusable lowered Fable query over explicitly named roots.
FableRootSpec
Compile-time description of a named Fable root.
FableRootValue
Runtime value bound to a named Fable root.
FableTransformPlan
A reusable lowered Fable transform from Input to Output.
Lexeme
A single token with the exact source slice it covers.
Parse
A parsed source file.
ParseError
A parse error with the byte offset where it was detected.

Enums§

FableError
Error returned while parsing, lowering, or running Fable.
FableQueryType
Broad result lane expected by a Fable query plan.
FableRootAccess
Access policy for a Fable root.
SyntaxKind
The kind of every token and node in a Fable concrete syntax tree.

Traits§

FableQueryResult
Rust result types accepted by FableQueryPlan and FableRootQueryPlan.

Functions§

apply
Compile and immediately apply a Fable program to value.
apply_with_intrinsics
Compile with explicit host intrinsics and immediately apply to value.
lex
Tokenise src into a lossless stream of lexemes.
parse
Parse Fable source into a lossless CST.
predicate
Compile and immediately evaluate a read-only Fable predicate.
predicate_with_intrinsics
Compile with explicit host intrinsics and immediately evaluate a read-only predicate.
query
Compile and immediately evaluate a read-only Fable query.
query_with_intrinsics
Compile with explicit host intrinsics and immediately evaluate a read-only query.
transform
Compile and immediately apply a Fable in to out transform.
transform_with_intrinsics
Compile with explicit host intrinsics and immediately apply a Fable transform.

Type Aliases§

FableFieldBoolUnary
Host function for field -> bool intrinsics.
FableFieldMutUnary
Host function for field_mut -> unit intrinsics.
FableFieldStringUnary
Host function for field -> string intrinsics.
FableFloatUnary
Host function for float -> float intrinsics.
FableSignedUnary
Host function for signed number -> signed number intrinsics.
FableStringBinaryPredicate
Host function for (string, string) -> bool intrinsics.
FableStringUnary
Host function for string -> string intrinsics.
FableUnsignedUnary
Host function for unsigned number -> unsigned number intrinsics.
ResolvedNode
A node in the resolved, text-bearing syntax tree.
ResolvedToken
A token in the resolved, text-bearing syntax tree.
SyntaxElement
Either a red node or token.
SyntaxNode
A red syntax-tree node.
SyntaxToken
A red syntax-tree token.