Expand description
Project declarations for constructs the parser cannot infer from source.
Declarations supplement the aliases found by crate::semantic::define.
They can describe environments defined in another file or through constructs
the definition scanner does not recognize.
A declaration names a spelling, not a pairing. Shape gates still decide whether the source supports a construct, so invalid declarations degrade to generic syntax rather than forcing a tree shape.
The schema follows three rules:
- Each syntactic category has its own name map.
likecopies a built-in entry from the same category. Cross-category relationships use explicit fields such asEnvironmentDecl::begin.Declarations::resolveperforms validation after deserialization so errors can identify the original configuration key.
These types are shared by all parser front ends. Their serialized field names are public API.
Structs§
- Command
Name - A control-word name as written in a declaration, stored without the
leading backslash — the spelling every signature and
ParseCtxmap is keyed by. - Declaration
Error - A rule
Declarations::resolverejected, with the dotted key of the entry that broke it (environments.myenv.like) so the CLI can point at the line the user wrote. - Declarations
- Every declaration a project makes, as authored — unresolved and unvalidated.
- Environment
Decl - One
[environments.<name>]entry: what the environment named by the key behaves like, and which command spellings stand in for its delimiters. - Resolved
Declarations - A project’s declarations, checked and projected into signature data by
Declarations::resolve.
Enums§
- Declaration
Error Kind - Why a declaration was rejected. Each variant is a rule from
AGENTS.mddecision #12 or its architecture section.
Type Aliases§
- Environment
Decls - The name-keyed
[environments]map. A type alias so the CLI’sConfigcan name the field’s type without restating the key type.