caffeine_lang/frontend/ast
Types
A block of blueprints for one or more artifacts.
pub type BlueprintsBlock {
BlueprintsBlock(
artifacts: List(String),
items: List(BlueprintItem),
)
}
Constructors
-
BlueprintsBlock( artifacts: List(String), items: List(BlueprintItem), )
A blueprints file containing type aliases, extendables, and blueprint blocks. Type aliases must come before extendables, which must come before blocks.
pub type BlueprintsFile {
BlueprintsFile(
type_aliases: List(TypeAlias),
extendables: List(Extendable),
blocks: List(BlueprintsBlock),
)
}
Constructors
-
BlueprintsFile( type_aliases: List(TypeAlias), extendables: List(Extendable), blocks: List(BlueprintsBlock), )
A block of expectations for a blueprint.
pub type ExpectsBlock {
ExpectsBlock(blueprint: String, items: List(ExpectItem))
}
Constructors
-
ExpectsBlock(blueprint: String, items: List(ExpectItem))
An expects file containing extendables and expects blocks.
pub type ExpectsFile {
ExpectsFile(
extendables: List(Extendable),
blocks: List(ExpectsBlock),
)
}
Constructors
-
ExpectsFile( extendables: List(Extendable), blocks: List(ExpectsBlock), )
An extendable block that can be inherited by blueprints or expectations.
pub type Extendable {
Extendable(name: String, kind: ExtendableKind, body: Struct)
}
Constructors
-
Extendable(name: String, kind: ExtendableKind, body: Struct)
The kind of extendable (Requires for types, Provides for values).
pub type ExtendableKind {
ExtendableRequires
ExtendableProvides
}
Constructors
-
ExtendableRequires -
ExtendableProvides
A type alias that defines a named, reusable refined type. Example: _env (Type): String { x | x in { prod, staging, dev } }
pub type TypeAlias {
TypeAlias(name: String, type_: accepted_types.AcceptedTypes)
}
Constructors
-
TypeAlias(name: String, type_: accepted_types.AcceptedTypes)
A value in a field - either a type (in Requires) or a literal (in Provides).
pub type Value {
TypeValue(type_: accepted_types.AcceptedTypes)
LiteralValue(literal: Literal)
}
Constructors
-
TypeValue(type_: accepted_types.AcceptedTypes) -
LiteralValue(literal: Literal)