Skip to content

Commit ab66626

Browse files
authored
Merge pull request #472 from ahoppen/ahoppen/merge-binary-operators
Adjustments for merging `spacedBinaryOperator` and `unspacedBinaryOperator`
2 parents b86a9bf + 216ee3e commit ab66626

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Sources/SwiftFormatPrettyPrint/TokenStreamCreator.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -306,9 +306,9 @@ fileprivate final class TokenStreamCreator: SyntaxVisitor {
306306

307307
// Add a non-breaking space after the identifier if it's an operator, to separate it visually
308308
// from the following parenthesis or generic argument list. Note that even if the function is
309-
// defining a prefix or postfix operator, or even if the operator isn't originally followed by a
310-
// space, the token kind always comes through as `spacedBinaryOperator`.
311-
if case .spacedBinaryOperator = node.identifier.tokenKind {
309+
// defining a prefix or postfix operator, the token kind always comes through as
310+
// `binaryOperator`.
311+
if case .binaryOperator = node.identifier.tokenKind {
312312
after(node.identifier.lastToken, tokens: .space)
313313
}
314314

0 commit comments

Comments
 (0)