diff options
author | Nadrieril | 2019-05-04 12:40:48 +0200 |
---|---|---|
committer | Nadrieril | 2019-05-04 12:40:48 +0200 |
commit | 4f04d1e6f02113ad0f539b723333f8f1f5734f13 (patch) | |
tree | 140e2a97597d1f340191c9603313119e6661ec65 /dhall_proc_macros/src/lib.rs | |
parent | 45be2ff1f5bb3d6e0faa098402adf985b3d5e7ca (diff) |
Rename dhall_generator to dhall_proc_macros
Diffstat (limited to 'dhall_proc_macros/src/lib.rs')
-rw-r--r-- | dhall_proc_macros/src/lib.rs | 26 |
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) +} |