1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//! # panproto-parse
//!
//! Tree-sitter full-AST parsers and emitters for panproto language protocols.
//!
//! This crate provides the schema-level presentation functors that map between
//! source code text and panproto [`Schema`] models. It operates at the schema
//! level of panproto's two-parameter architecture (complementing `panproto-io`
//! which operates at the instance level).
//!
//! ## Theory extraction
//!
//! Tree-sitter grammars are theory presentations. Each grammar's `node-types.json`
//! is structurally isomorphic to a GAT: named node types become sorts, fields
//! become operations. The [`theory_extract`] module auto-derives panproto theories
//! from grammar metadata, ensuring the theory is always in sync with the parser.
//!
//! ## Generic walker
//!
//! Because theories are auto-derived from the grammar, the AST walker is fully
//! generic: one [`walker::AstWalker`] implementation works for all languages.
//! The node's `kind()` IS the panproto vertex kind; the field name IS the edge
//! kind. Per-language customization is limited to formatting constraints and
//! import resolution hints.
//!
//! ## Pipeline
//!
//! ```text
//! source code ──parse──→ Schema ──merge/diff/check──→ Schema ──emit──→ source code
//! ```
//!
//! [`Schema`]: panproto_schema::Schema
/// Error types for full-AST parsing and emission.
/// Scope-aware vertex ID generation for full-AST schemas.
/// Automated theory extraction from tree-sitter grammar metadata.
/// Generic tree-sitter AST walker.
/// Per-language parser and emitter implementations.
/// Parser registry mapping protocol names to implementations.
pub use ParseError;
pub use IdGenerator;
pub use ;
pub use ;
pub use ;