-
Notifications
You must be signed in to change notification settings - Fork 441
Balance spacing around =
#1694
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
Balance spacing around =
#1694
Conversation
Tests/SwiftParserTest/translated/DiagnoseInitializerAsTypedPatternTests.swift
Outdated
Show resolved
Hide resolved
b0929a1
to
9b84e5c
Compare
When the leading or trailing trivia was empty it was replacing the present nodes trivias
9b84e5c
to
43927e8
Compare
@@ -978,7 +979,7 @@ public class ParseDiagnosticsGenerator: SyntaxAnyVisitor { | |||
fixIts: [ | |||
FixIt( | |||
message: ReplaceTokensFixIt(replaceTokens: [.binaryOperator("==")], replacements: [node.equal]), | |||
changes: [.makeMissing(unexpected), .makePresent(node.equal, leadingTrivia: [])] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found two places where we don't need to add trivia
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. I suspect there might be a few more as well. Haven’t checked though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried to do a quick look, didn't find any
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, maybe there aren’t any more left. Even better. It was just a gut feeling without looking at the code.
@swift-ci please test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
When the leading or trailing trivia was empty it was replacing the present nodes trivias