//! A proc_macro shim for other crates in this workspace use proc_macro::TokenStream; use quote::quote; use syn::parse_macro_input; #[proc_macro_attribute] pub fn localize(attribute: TokenStream, item: TokenStream) -> TokenStream { let parsed_attribute: syn::LitStr = parse_macro_input!(attribute); let parsed_enum: syn::ItemEnum = parse_macro_input!(item); let enum_impl = fluent_embed::localize( parsed_attribute.clone(), parsed_enum.ident.clone(), parsed_enum.variants.clone(), ); quote! { #parsed_enum #enum_impl } .into() }