Skip to main content

rorpc_parse/
lib.rs

1//! AST parsing utilities and code generation for rorpc proc macros.
2//!
3//! This crate is a regular (non-proc-macro) library so all parsing logic is
4//! independently testable with normal `#[test]` functions.
5//!
6//! # Layers
7//!
8//! - [`errors`] — structured `Error` type with span information and compile-time suggestions
9//! - [`types`] — AST-based wrapper extraction (`Json<T>`, `Result<T,E>`, etc.)
10//! - [`attributes`] — `#[serde(...)]` and `#[zod(...)]` attribute parsing
11//! - [`functions`] — handler function signature analysis → [`functions::HandlerSignature`]
12//! - [`codegen`] — code generation; each sub-module corresponds to one proc macro
13//!
14//! # Dependency direction
15//!
16//! ```text
17//! rorpc-macros  (proc-macro bridge, lib.rs only)
18//!      └── rorpc-parse  (this crate — all implementation logic)
19//!               └── syn, quote, proc-macro2, inventory
20//! ```
21
22pub mod attributes;
23pub mod codegen;
24pub mod errors;
25pub mod functions;
26pub mod types;
27
28pub use errors::{Error, Result};