drone_macros/
lib.rs

1//! Drone procedural macros.
2//!
3//! See `drone` documentation for details.
4#![feature(proc_macro)]
5#![recursion_limit = "256"]
6#![cfg_attr(feature = "clippy", feature(plugin))]
7#![cfg_attr(feature = "clippy", plugin(clippy))]
8#![cfg_attr(feature = "clippy", allow(precedence, doc_markdown))]
9
10extern crate proc_macro;
11#[macro_use]
12extern crate quote;
13extern crate syn;
14
15mod bind;
16mod heap;
17mod reg;
18mod thread_local;
19
20use proc_macro::TokenStream;
21
22/// See `drone` documentation for details.
23#[proc_macro]
24pub fn bind_imp(input: TokenStream) -> TokenStream {
25  bind::bind(input)
26}
27
28/// See `drone` documentation for details.
29#[proc_macro]
30pub fn heap_imp(input: TokenStream) -> TokenStream {
31  heap::heap(input)
32}
33
34/// See `drone` documentation for details.
35#[proc_macro]
36pub fn reg_imp(input: TokenStream) -> TokenStream {
37  reg::reg(input)
38}
39/// See `drone` documentation for details.
40#[proc_macro]
41pub fn thread_local_imp(input: TokenStream) -> TokenStream {
42  thread_local::thread_local(input)
43}