Expand custom derives
diff --git a/src/lib.rs b/src/lib.rs
index 603e094..fd85720 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -2,6 +2,7 @@
#![cfg_attr(feature = "clippy", plugin(clippy))]
#[cfg(feature = "printing")]
+#[macro_use]
extern crate quote;
#[cfg(feature = "parsing")]
@@ -68,6 +69,11 @@
mod op;
pub use op::{BinOp, UnOp};
+#[cfg(feature = "expand")]
+mod registry;
+#[cfg(feature = "expand")]
+pub use registry::{CustomDerive, Expanded, Registry};
+
#[cfg(feature = "parsing")]
mod space;
@@ -109,6 +115,11 @@
}
#[cfg(feature = "full")]
+ pub fn parse_items(input: &str) -> Result<Vec<Item>, String> {
+ unwrap("items", item::parsing::items, input)
+ }
+
+ #[cfg(feature = "full")]
pub fn parse_expr(input: &str) -> Result<Expr, String> {
unwrap("expression", expr::parsing::expr, input)
}