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

Consider inserting invisible groups, rather than parens, when applying grouping for precedence #1660

Open
dtolnay opened this issue May 16, 2024 · 1 comment

Comments

@dtolnay
Copy link
Owner

dtolnay commented May 16, 2024

As of #1659, we are currently using code like token::Paren::default().surround(tokens, |tokens| e.to_tokens(tokens)) .

But maybe a better behavior would be token::Group::default().surround(...).

@programmerjake
Copy link
Contributor

I think using parens still is better because you may want to dump the tokens to a file, which breaks with invisible delimiters afaik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants