Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@lqd

lqd/attribute.rs Secret

Created July 19, 2019 17:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lqd/1d882a8e8c9d41f3318ad98d60f8a11a to your computer and use it in GitHub Desktop.
Save lqd/1d882a8e8c9d41f3318ad98d60f8a11a to your computer and use it in GitHub Desktop.
extern crate proc_macro;
use proc_macro::TokenStream;
#[proc_macro_attribute]
pub fn dom_struct(_: TokenStream, _: TokenStream) -> TokenStream {
"#[derive(DomObject)] struct S {
qux: Qux<Qux<Baz> >,
bar: Box<Bar>,
}".parse().unwrap()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment