syn
syn copied to clipboard
Write a test that counts the number of times visit_span is called
Visiting a particular syntax tree node with syn::visit
, the number of calls to visit_span
should be equal to the number of tokens when converted into TokenStream. This test would help catch many classes of missing visit calls, including #291.
I see missing visit_span calls in:
- fields of type TokenStream;
- some variants of Lit;
- punctuation of a Punctuated (#291).