Generate quote::ToTokens for data type that already has implmented Parse trait

37 views Asked by At

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.

0

There are 0 answers