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
44
45
46
47
48
49
50
51
//! Drone procedural macros.
//!
//! See `drone` documentation for details.

#![feature(const_atomic_bool_new)]
#![feature(proc_macro)]
#![recursion_limit = "512"]
#![cfg_attr(feature = "clippy", feature(plugin))]
#![cfg_attr(feature = "clippy", plugin(clippy))]
#![cfg_attr(feature = "clippy", allow(precedence, doc_markdown))]

#[macro_use]
extern crate drone_macros_core;
#[macro_use]
extern crate failure;
extern crate inflector;
extern crate proc_macro;
#[macro_use]
extern crate quote;
extern crate syn;

mod heap;
mod reg_mappings;
mod reg_tokens;
mod thread_local;

use proc_macro::TokenStream;

#[doc(hidden)]
#[proc_macro]
pub fn heap(input: TokenStream) -> TokenStream {
  tokens!(heap::heap(input))
}

#[doc(hidden)]
#[proc_macro]
pub fn reg_mappings(input: TokenStream) -> TokenStream {
  tokens!(reg_mappings::reg_mappings(input))
}

#[doc(hidden)]
#[proc_macro]
pub fn reg_tokens(input: TokenStream) -> TokenStream {
  tokens!(reg_tokens::reg_tokens(input))
}

#[doc(hidden)]
#[proc_macro]
pub fn thread_local(input: TokenStream) -> TokenStream {
  tokens!(thread_local::thread_local(input))
}