summaryrefslogtreecommitdiff
path: root/dhall_proc_macros/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'dhall_proc_macros/src/lib.rs')
-rw-r--r--dhall_proc_macros/src/lib.rs26
1 files changed, 26 insertions, 0 deletions
diff --git a/dhall_proc_macros/src/lib.rs b/dhall_proc_macros/src/lib.rs
new file mode 100644
index 0000000..1124968
--- /dev/null
+++ b/dhall_proc_macros/src/lib.rs
@@ -0,0 +1,26 @@
+//! This crate contains the code-generation primitives for the [dhall-rust][dhall-rust] crate.
+//! This is highly unstable and breaks regularly; use at your own risk.
+//!
+//! [dhall-rust]: https://github.com/Nadrieril/dhall-rust
+
+extern crate proc_macro;
+
+mod derive;
+mod quote;
+
+use proc_macro::TokenStream;
+
+#[proc_macro]
+pub fn expr(input: TokenStream) -> TokenStream {
+ quote::expr(input)
+}
+
+#[proc_macro]
+pub fn subexpr(input: TokenStream) -> TokenStream {
+ quote::subexpr(input)
+}
+
+#[proc_macro_derive(SimpleStaticType)]
+pub fn derive_simple_static_type(input: TokenStream) -> TokenStream {
+ derive::derive_simple_static_type(input)
+}