1pub mod ast;
5pub mod case;
7pub mod debug;
9pub mod extract;
11pub mod ident;
13pub mod mark;
15pub mod meta;
17pub mod path;
19pub mod pipes;
21mod template;
22mod types;
23
24#[cfg(feature = "ext")]
26pub mod ext;
27
28pub use extract::*;
29pub use mark::Diagnostic;
30pub use mark::Result;
31pub use meta::*;
32pub use template::*;
33pub use types::*;
34
35#[macro_export]
37macro_rules! parse {
38 ($s:literal => $ty:ty) => {
39 $crate::syn::parse_str::<$ty>($s)
40 };
41 ($s:literal) => {
42 $crate::syn::parse_str($s)
43 };
44 ($ts:expr => $ty:ty) => {
45 $crate::syn::parse2::<$ty>(::std::convert::Into::into($ts))
46 };
47 ($ts:expr) => {
48 $crate::syn::parse2(::std::convert::Into::into($ts))
49 };
50}
51
52#[macro_export]
54macro_rules! parse_input {
55 ($($tt:tt)*) => { $crate::syn::parse_macro_input!($($tt)*) }
56}
57
58pub use proc_macro2::{Span, TokenStream};
59pub use quote::{ToTokens, format_ident};
60
61pub use proc_macro2;
62pub use quote;
63pub use syn;
64
65pub trait Expand {
67 fn expand(
68 &self,
69 output: &proc_macro2::Ident,
70 idents: &mut ident::Iter,
71 ) -> proc_macro2::TokenStream;
72}
73
74pub trait Render {
76 fn render(&self, input: &Input) -> Output;
77}
78
79pub trait Pipe {
81 type Input;
82 type Output: quote::ToTokens;
83
84 fn pipe(&self, input: Self::Input) -> Self::Output;
85}