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