File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,9 @@ using namespace swift::syntax;
36
36
// / isStartOfStmt - Return true if the current token starts a statement.
37
37
// /
38
38
bool Parser::isStartOfStmt () {
39
+ // This needs to be kept in sync with `Parser::parseStmt()`. If a new token
40
+ // kind is accepted here as start of statement, it should also be handled in
41
+ // `Parser::parseStmt()`.
39
42
switch (Tok.getKind ()) {
40
43
default : return false ;
41
44
case tok::kw_return:
@@ -588,7 +591,9 @@ ParserResult<Stmt> Parser::parseStmt() {
588
591
if (isContextualYieldKeyword ()) {
589
592
Tok.setKind (tok::kw_yield);
590
593
}
591
-
594
+
595
+ // This needs to handle everything that `Parser::isStartOfStmt()` accepts as
596
+ // start of statement.
592
597
switch (Tok.getKind ()) {
593
598
case tok::pound_line:
594
599
case tok::pound_sourceLocation:
You can’t perform that action at this time.
0 commit comments