cynic
cynic copied to clipboard
Consider returning TokenStreams instead of Results
There's a lot of places where we return Results in cynic and then convert to TokenStream a level up. This is fine, but may limit our ability to error to a single error at a time. Might be more appropriate to convert to TokenStreams at every different point that can error so we can have > 1 error emitted from each macro invocation.
#132 adds the cynic::Errors
type that wraps up several syn::Error
s into one, and supports emitting all of them. That seems a better solution than the one proposed in this issue, so should probably just update any code that emits > 1 error to use this type.
I've at least partially done this now. Not fully, but enough that the issue can be closed. Any further work should probably be handled by the move to proc-macro-error in #695