Skip to content

Commit 8b022d3

Browse files
committed
Apply cases for all spaced binary operators
1 parent 919cada commit 8b022d3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

CodeGeneration/Sources/generate-swiftsyntax/templates/basicformat/BasicFormatFile.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ let basicFormatFile = SourceFile {
126126
switch (token.previousToken(viewMode: .sourceAccurate)?.tokenKind, token.tokenKind) {
127127
case (.postfixQuestionMark, .rightAngle): // Ensures there is not space in `MyGeneric<Foo?>`
128128
return false
129-
case (.leftParen, .spacedBinaryOperator("*")):
129+
case (.leftParen, .spacedBinaryOperator):
130130
return false
131131
default:
132132
break
@@ -169,7 +169,7 @@ let basicFormatFile = SourceFile {
169169
(.tryKeyword, .exclamationMark), // Ensures there is not space in `try!`
170170
(.tryKeyword, .postfixQuestionMark): // Ensures there is not space in `try?`
171171
return false
172-
case (.spacedBinaryOperator("*"), .comma):
172+
case (.spacedBinaryOperator, .comma):
173173
return false
174174
default:
175175
break

Sources/SwiftBasicFormat/generated/BasicFormat.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ open class BasicFormat: SyntaxRewriter {
133133
switch (token.previousToken(viewMode: .sourceAccurate)?.tokenKind, token.tokenKind) {
134134
case (.postfixQuestionMark, .rightAngle): // Ensures there is not space in `MyGeneric<Foo?>`
135135
return false
136-
case (.leftParen, .spacedBinaryOperator("*")):
136+
case (.leftParen, .spacedBinaryOperator):
137137
return false
138138
default:
139139
break
@@ -176,7 +176,7 @@ open class BasicFormat: SyntaxRewriter {
176176
(.tryKeyword, .exclamationMark), // Ensures there is not space in `try!`
177177
(.tryKeyword, .postfixQuestionMark): // Ensures there is not space in `try?`
178178
return false
179-
case (.spacedBinaryOperator("*"), .comma):
179+
case (.spacedBinaryOperator, .comma):
180180
return false
181181
default:
182182
break

0 commit comments

Comments
 (0)