Skip to content

Commit c0aceab

Browse files
Review comment: don't test semicolon in functionbody, but functionstatement and localfunctionstatement
1 parent 41ba954 commit c0aceab

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

LuaParser/src/Parse/LuaParser.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,8 @@ void LuaParser::FunctionStatement() {
361361

362362
FunctionBody();
363363

364+
TestAndNext(';');
365+
364366
m.Complete(*this, LuaSyntaxNodeKind::FunctionStatement);
365367
}
366368

@@ -375,6 +377,8 @@ void LuaParser::LocalFunctionStatement() {
375377

376378
FunctionBody();
377379

380+
TestAndNext(';');
381+
378382
m.Complete(*this, LuaSyntaxNodeKind::LocalFunctionStatement);
379383
}
380384

@@ -675,8 +679,6 @@ void LuaParser::FunctionBody() {
675679

676680
CheckAndNext(TK_END);
677681

678-
TestAndNext(';');
679-
680682
m.Complete(*this, LuaSyntaxNodeKind::FunctionBody);
681683
}
682684

0 commit comments

Comments
 (0)