Skip to main content

macro_schema_core/
lib.rs

1//! `proc_macro2` implementation of `macro-schema`.
2//!
3//! Depend on the `macro-schema` crate, not this one. This crate holds the
4//! implementation behind its `define!` and `expand!` macros as ordinary Rust
5//! functions, [`define`] and [`expand`], so it can be unit-tested and stepped
6//! through in a debugger without going through the compiler's macro expander.
7//! [`expand_definition`] does the same for a client: it expands a call of a
8//! macro straight from that macro's `define!` input.
9//! The repository's `specs/MACRO_SCHEMA_SPEC.md` explains how the pieces fit
10//! together.
11
12mod instance;
13mod schema;
14mod template;
15mod value;
16
17pub use instance::{expand, expand_definition};
18pub use schema::define;
19pub use syn::{Error, Result};
20
21#[cfg(test)]
22mod tests;