Skip to main content

trilogy_parser/
lib.rs

1mod parser;
2mod resolver;
3mod directory_resolver;
4mod graph;
5mod trilogy_parser;
6#[cfg(feature = "python")]
7pub mod python_bindings;
8
9// The pest parser over the full Trilogy grammar. Exported because
10// `ParseError::PestError` already surfaces `Rule` in its public signature —
11// without this a consumer cannot name that type, let alone match on it — and
12// because the raw parse tree is the reason non-Python tooling wants the crate.
13pub use trilogy_parser::{Rule, TrilogyParser};
14
15pub use parser::{
16    parse_file, parse_imports, AddressKind, DatasourceDeclaration, ImportStatement, ParseError,
17    ParsedFile, PersistMode, PersistStatement,
18};
19pub use resolver::{
20    DatasourceInfo, DependencyGraph, FileNode, ImportInfo, ImportResolver, PersistInfo,
21    ResolveError,
22};
23pub use directory_resolver::{
24    process_directory_with_imports, build_edges, DirectoryGraph, Edge, EdgeReason, FileInfo,
25};
26pub use graph::GraphCore;