use syn::{parse_macro_input, DeriveInput};
fn __print_stream(stream: proc_macro2::TokenStream) -> proc_macro::TokenStream {
println!("{stream}");
stream.into()
}
#[proc_macro_derive(Decode, attributes(rasn))]
pub fn decode_derive(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
let derive_input = parse_macro_input!(input as DeriveInput);
rasn_derive_impl::decode_derive_inner(derive_input)
.unwrap_or_else(syn::Error::into_compile_error)
.into()
}
#[proc_macro_derive(Encode, attributes(rasn))]
pub fn encode_derive(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
let derive_input = parse_macro_input!(input as DeriveInput);
rasn_derive_impl::encode_derive_inner(derive_input)
.unwrap_or_else(syn::Error::into_compile_error)
.into()
}
#[proc_macro_derive(AsnType, attributes(rasn))]
pub fn asn_type_derive(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
let derive_input = parse_macro_input!(input as DeriveInput);
rasn_derive_impl::asn_type_derive_inner(derive_input)
.unwrap_or_else(syn::Error::into_compile_error)
.into()
}