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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//! Drone procedural macros.
//!
//! See `drone` documentation for details.
#![feature(proc_macro)]
#![recursion_limit = "256"]
#![cfg_attr(feature = "clippy", feature(plugin))]
#![cfg_attr(feature = "clippy", plugin(clippy))]
#![cfg_attr(feature = "clippy", allow(precedence, doc_markdown))]

extern crate proc_macro;
#[macro_use]
extern crate quote;
extern crate syn;

mod bind;
mod heap;
mod reg;
mod thread_local;

use proc_macro::TokenStream;

/// See `drone` documentation for details.
#[proc_macro]
pub fn bind_imp(input: TokenStream) -> TokenStream {
  bind::bind(input)
}

/// See `drone` documentation for details.
#[proc_macro]
pub fn heap_imp(input: TokenStream) -> TokenStream {
  heap::heap(input)
}

/// See `drone` documentation for details.
#[proc_macro]
pub fn reg_imp(input: TokenStream) -> TokenStream {
  reg::reg(input)
}
/// See `drone` documentation for details.
#[proc_macro]
pub fn thread_local_imp(input: TokenStream) -> TokenStream {
  thread_local::thread_local(input)
}