Docs Técnicas
Parser And Verifier
The parser converts source into ContractModule.
O conteúdo abaixo vem das fontes técnicas do repositório e é prerenderizado no site para leitura direta por pessoas, crawlers e agentes.
The parser converts source into ContractModule.
The verifier enforces publish-time safety.
Parser
Primary source:
text
crates/domain/atlas-trea/src/parser.rsThe parser supports the implemented source subset described in the language chapters.
The parser is responsible for:
- recognizing the current source grammar;
- building AST nodes for storage, entrypoints, expressions, and statements;
- rejecting invalid syntax before any safety analysis runs.
Verifier
Primary source:
text
crates/domain/atlas-trea/src/verifier.rsVerifier checks include:
- duplicate storage fields;
- duplicate functions;
- storage default type compatibility;
- parameter uniqueness;
- assignment type compatibility;
- return arity and type compatibility;
- view read-only restrictions;
- bounded loop restrictions;
- recursion rejection;
- public ABI
Money[...]rejection; - executable storage
Money[...]rejection; - typed local
Money[...]rejection; - intrinsic arity and basic argument types.
Step-By-Step Responsibility Split
- the parser decides whether source is valid TREA syntax;
- the verifier decides whether valid syntax is publishable under the current executable profile;
- the compiler can then lower verified source into artifact and reports.
What The Verifier Does Not Decide
The verifier does not decide:
- ledger route admissibility;
- lifecycle state admissibility;
- accepted version selection;
- final posting commit.
Those checks happen later, at ledger integration and commit time.