Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test for parsing Delimiter::None in expressions #1538

Merged
merged 1 commit into from
Dec 11, 2023
Merged

Conversation

dtolnay
Copy link
Owner

@dtolnay dtolnay commented Dec 10, 2023

This test will take an expression such as (**self).get(), replace the parens with invisible delimiters (Delimiter::None) i.e. equivalent to $e.get() where the $e metavariable contains **self, then print the syntax tree containing invisible delimiters into a TokenStream, reparse the TokenStream back to syn::Expr, and verify successful round trip.

Closes #840.

@dtolnay
Copy link
Owner Author

dtolnay commented Dec 10, 2023

Not a bad start:

391215 passed | 1913 failed

@dtolnay dtolnay merged commit 1ce8ccf into master Dec 11, 2023
28 checks passed
@dtolnay dtolnay deleted the testinvisible branch December 11, 2023 02:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Synthetic test coverage of None-delimited groups
1 participant