Skip to content

Commit 21e686e

Browse files
committed
[Parse] Remove dead condition
We used to avoid parsing labels for yield stmts by passing in `SyntaxKind::YieldStmt` and relying on this condition. However we no longer do so, we pass `SyntaxKind::ExprList` instead.
1 parent ce334af commit 21e686e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/Parse/ParseExpr.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3132,8 +3132,7 @@ ParserStatus Parser::parseExprList(tok leftTok, tok rightTok,
31323132
Kind, [&] () -> ParserStatus {
31333133
Identifier FieldName;
31343134
SourceLoc FieldNameLoc;
3135-
if (Kind != SyntaxKind::YieldStmt)
3136-
parseOptionalArgumentLabel(FieldName, FieldNameLoc);
3135+
parseOptionalArgumentLabel(FieldName, FieldNameLoc);
31373136

31383137
// See if we have an operator decl ref '(<op>)'. The operator token in
31393138
// this case lexes as a binary operator because it neither leads nor

0 commit comments

Comments
 (0)