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

Better indentation for property access as binary operator operand. #1615

Merged
merged 4 commits into from
Dec 7, 2024

Conversation

munificent
Copy link
Member

While I was at it, I figured out a more systematic way to hoist leading comments out from the subexpressions containing the token that the comments precede. That fixes this bug and also lets us get rid of many of the one-off places where we were manually hoisting comments out of some subexpressions.

Surprisingly, even though this touches visitNode() which is a fairly hot method, it doesn't seem to measurably harm performance.

Fix #1611.

It was supposed to be rounded down to the nearest hundred. Oops.
While I was at it, I figured out a more systematic way to hoist leading comments out from the subexpressions containing the token that the comments precede. That fixes this bug and also lets us get rid of many of the one-off places where we were manually hoisting comments out of some subexpressions.

Surprisingly, even though this touches visitNode() which is a fairly hot method, it doesn't seem to measurably harm performance.
Base automatically changed from fix-test-dir-name to main December 7, 2024 01:03
@munificent munificent merged commit 04883d6 into main Dec 7, 2024
7 checks passed
@munificent munificent deleted the 1611-leading-comment-indent branch December 7, 2024 01:18
munificent added a commit that referenced this pull request Dec 17, 2024
Looks like this was already fixed by #1615.

Close #1628.
munificent added a commit that referenced this pull request Dec 17, 2024
Add regression test for #1628.

Looks like this was already fixed by #1615.

Close #1628.
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.

Weird indentation with comment inside infix operator
2 participants