I'm currently writing a procedural macros. I want to use some syntax similar to serde_derive
:
struct Foo {
#[bar(default = "default")]
pub foo: String,
}
The content inside the parenthneses -- default = "default"
-- is a TokenStream. But I have no idea how to parse it because syn::parse
doesn't accept reference.