Expand description
Schema parser for .ferriorm files.
This crate turns a .ferriorm schema string into a fully validated
ferriorm_core::schema::Schema IR. It operates in two phases:
- Parsing (
parser) – a PEG grammar (defined ingrammar.pest) tokenizes the input and builds a rawferriorm_core::ast::SchemaFile. - Validation (
validator) – resolves types, checks constraints, and produces the canonicalferriorm_core::schema::Schemaconsumed by codegen and the migration engine.
For convenience, parse_and_validate combines both steps.
§Related crates
ferriorm_core– domain types produced by this crate.ferriorm_codegen– consumes theSchemaIR to generate Rust code.ferriorm_migrate– consumes theSchemaIR to produce migrations.
Re-exports§
Modules§
- error
- Error types for the schema parser and validator.
- parser
- PEG-based parser that turns a
.ferriormschema string into a raw AST. - validator
- Semantic validation of the raw AST into the resolved Schema IR.
Functions§
- parse_
and_ validate - Parse and validate a schema file in one step.