Merged
Conversation
This was referenced Jun 2, 2023
Merged
Merged
Member
Author
|
Current dependencies on/for this PR:
This comment was auto-generated by Graphite. |
Contributor
PR Check ResultsEcosystem✅ ecosystem check detected no changes. BenchmarkLinuxWindows |
d113ea6 to
530cb36
Compare
2e10b8a to
b45ed57
Compare
zanieb
reviewed
Jun 3, 2023
Comment on lines
+53
to
+54
| # trailing else body comment | ||
| while ( |
Member
Author
878709f to
b602cdc
Compare
MichaReiser
commented
Jun 4, 2023
|
|
||
| /// Formats the leading comments of a node. | ||
| pub(crate) fn leading_comments<T>(node: &T) -> FormatLeadingComments | ||
| pub(crate) fn leading_node_comments<T>(node: &T) -> FormatLeadingComments |
Member
Author
There was a problem hiding this comment.
I renamed the function because I now needed a way to either format the leading comments of a node OR a specific list of comments.
| } | ||
| } | ||
|
|
||
| const fn needs_parentheses(expr: &Expr) -> bool { |
Member
Author
There was a problem hiding this comment.
This match is not complete yet because it's impossible to test without having implemented some expression formatting.
We should revisit this later. The important thing is that we have this logic centrelized, so that it should be easy to fix later.
Closed
Member
Author
|
How do I get |
konstin
approved these changes
Jun 5, 2023
| # trailing else body comment | ||
|
|
||
|
|
||
| while aVeryLongConditionThatSpillsOverToTheNextLineBecauseItIsExtremellyLongAndGoesOnAndOnAndOnAndOnAndOnAndOnAndOnAndOnAndOn: # trailing comment |
Member
There was a problem hiding this comment.
b602cdc to
30574e1
Compare
konstin
pushed a commit
that referenced
this pull request
Jun 13, 2023
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
This PR implements formatting of
whilestatements.Test Plan
I reviewed the black changes and added our own tests to verify the correct placement of comments.