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