extern crate proc_macro; use unsynn::*; #[proc_macro] pub fn morx(input: proc_macro::TokenStream) -> proc_macro::TokenStream { println!("{:?}", input); let ast: MorxBlock = unsynn::TokenStream::from(input).to_token_iter().parse_all().unwrap(); LiteralString::from_str("test").to_token_stream().into() } unsynn! { struct MorxBlock(Any>, Nothing>); struct MorxNode(Ident, MorxChildren); struct MorxAttr(Either); struct MorxComplexAttr(Ident, Assign, AttrValue); struct AttrValue(Either); struct MorxChildren(Either>>); }