Is there a way to generate a ToTokens
impl for a data type (represents macro input) that already has an implmentation of syn::Parse
trait and the original TokenStream
? I want to know if there's a way to automatically do this because I don't want to write ToTokens
for it.
macro input
--- (Parse) ---> my data type
Then I make changes to my data type
and want to write it back as a TokenStream
representing an edited macro input
:
my data type added with extra data
--- (ToTokens?) ---> new macro input
.