summaryrefslogtreecommitdiff
path: root/dhall_generator/src/lib.rs
blob: 1124968b14a6733c2c5d0c0b716c6979c8972792 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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)
}