This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index at /llms.txt, or add .md to any page's URL.
Contract grammar and vocabulary reference
The Contract grammar and vocabulary the compiler accepts: every declaration, element and attribute.
This is a descriptive reference for the compiler on main, not a proposal for
new syntax. The human guide teaches the
language; the agent guide gives the implementation loop.
The parser, type checker, and lowering rules are authoritative when this summary
and implementation disagree.
The grammar below describes authored forms. Context-sensitive restrictions are
listed separately: parsing a construct does not imply it types, lowers, bakes,
or runs on every host. IDENT, FIELD, and TAG are identifier tokens accepted
in their respective contexts; reserved-word handling differs by context.
Is this helpful
Last updated November 30, 2026