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

Improve precision of jump parentheses when next token cannot begin expr #1695

Merged
merged 2 commits into from
Jul 7, 2024

Conversation

dtolnay
Copy link
Owner

@dtolnay dtolnay commented Jul 7, 2024

Previously syn would forcibly put parentheses when printing something like (break) + 1 or (return) + 1. Although parentheses are required in (break) - 1 and (return) - 1, they should not be required when the next token following the valueless jump is not a legal first token of an expression.

@dtolnay dtolnay merged commit 9ab3fba into master Jul 7, 2024
29 checks passed
@dtolnay dtolnay deleted the jumps branch July 7, 2024 01:31
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.

None yet

1 participant