1 | mod args; |
---|---|
2 | mod attribute; |
3 | mod derive; |
4 | |
5 | use proc_macro2::TokenStream; |
6 | use syn::Error; |
7 | |
8 | /// The annotation for pinned type. |
9 | const PIN: &str = "pin"; |
10 | |
11 | pub(crate) fn attribute(args: &TokenStream, input: TokenStream) -> TokenStream { |
12 | attribute::parse_attribute(args, input).unwrap_or_else(Error::into_compile_error) |
13 | } |
14 | |
15 | pub(crate) fn derive(input: TokenStream) -> TokenStream { |
16 | derive::parse_derive(input).unwrap_or_else(Error::into_compile_error) |
17 | } |
18 |