audb 0.1.11

AuDB - Compile-time database application framework with gold files
Documentation
//! Gold file parser for `.au` files
//!
//! This module provides parsing for AuDB's gold file format - a block-based
//! configuration and query language that can embed multiple syntaxes.
//!
//! ## Gold File Format
//!
//! Gold files use a block-based structure with `@` directives:
//!
//! ```au
//! @schema User {
//!   id: EntityId
//!   name: String
//! }
//!
//! @query get_user(id: EntityId) -> User {
//!   language = "hyperql"
//!   ---
//!   SELECT * FROM users WHERE id = :id
//!   ---
//! }
//! ```
//!
//! ## Architecture
//!
//! The parser has two stages:
//!
//! 1. **Lexing** ([`lexer`]): Tokenize source text into [`Token`] stream (winnow-based)
//! 2. **Parsing** ([`parser`]): Build AST from tokens
//!
//! ## Usage
//!
//! ```ignore
//! use audb::parser::GoldParser;
//!
//! let gold_file = GoldParser::parse_file("project.au")?;
//! for block in gold_file.blocks {
//!     println!("Block: {:?}", block.block_type());
//! }
//! ```

pub mod ast;
pub mod lexer;
pub mod parser;

// Re-export key types for convenience
pub use ast::{
    Block, ConfigBlock, CustomBlock, DataBlock, EndpointBlock, GoldFile, Parameter, QueryBlock,
    SchemaBlock, SchemaField, Value,
};
pub use lexer::{LocatedToken, Token, WinnowLexer};
pub use parser::GoldParser;