summaryrefslogtreecommitdiff
path: root/dhall_generator/src/lib.rs
blob: f31faa4276a09dbd455d85a216575de3adc9a2ea (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
27
extern crate proc_macro;

mod dhall_expr;
mod dhall_type;

use proc_macro::TokenStream;

// Deprecated
#[proc_macro]
pub fn dhall_expr(input: TokenStream) -> TokenStream {
    subexpr(input)
}

#[proc_macro]
pub fn expr(input: TokenStream) -> TokenStream {
    dhall_expr::expr(input)
}

#[proc_macro]
pub fn subexpr(input: TokenStream) -> TokenStream {
    dhall_expr::subexpr(input)
}

#[proc_macro_derive(Type)]
pub fn derive_type(input: TokenStream) -> TokenStream {
    dhall_type::derive_type(input)
}