-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #83339 - Aaron1011:deep-recollect, r=petrochenkov
Perform 'deep recollection' in test helper macros Currently, the print helper macro performs 'recollection' by doing `token_stream.into_iter().collect()`. However, this will not affect nonterminals that occur nested inside delimited groups, since the wrapping delimited group will be left untouched. This commit adds 'deep recollection', which recursively recollects every delimited group in the token stream. As with normal recollection, we only print out something if deep recollection results in a different stringified token stream. This is useful for catching bugs where we update the AST of a nonterminal (which affects pretty-printing), but do not update the attatched `TokenStream`
- Loading branch information
Showing
3 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters