Skip to content

Commit 9184378

Browse files
committed
Remove check logic for expressions after a colon from ternary operators
1 parent 24f4274 commit 9184378

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

Sources/SwiftParser/Expressions.swift

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -317,19 +317,7 @@ extension Parser {
317317
arena: self.arena
318318
)
319319

320-
let rhs: RawExprSyntax?
321-
if colon.isMissing {
322-
if let previousTokenKind = currentToken.cursor.previousTokenKind,
323-
self.at(TokenSpec(previousTokenKind))
324-
{
325-
rhs = nil
326-
} else {
327-
rhs = RawExprSyntax(RawMissingExprSyntax(arena: self.arena))
328-
}
329-
} else {
330-
rhs = nil
331-
}
332-
return (RawExprSyntax(op), rhs)
320+
return (RawExprSyntax(op), nil)
333321

334322
case (.equal, let handle)?:
335323
switch pattern {

0 commit comments

Comments
 (0)