serde_implicit_proc/lib.rs
1use proc_macro::TokenStream as TS1;
2use syn::{DeriveInput, parse_macro_input};
3
4mod ast;
5mod expand;
6
7#[proc_macro_derive(Deserialize, attributes(tag))]
8pub fn derive_serialize(input: TS1) -> TS1 {
9 let mut input = parse_macro_input!(input as DeriveInput);
10
11 let ts = expand::expand_derive_serialize(input)
12 .unwrap_or_else(syn::Error::into_compile_error)
13 .into();
14
15 ts
16}