Continue parsing paramslist until we've found the closing parenthesis
This commit is contained in:
@@ -353,8 +353,14 @@ namespace MalachScript::Parser {
|
||||
}
|
||||
PROGRESS_TOKEN(currentToken);
|
||||
}
|
||||
if (currentToken->GetKind() != LexTokenKind::CloseParenthesisSymbol) {
|
||||
while (currentToken->GetKind() != LexTokenKind::CloseParenthesisSymbol) {
|
||||
LogError(Diagnostics::DiagnosticType::UnexpectedToken, currentToken->GetSpan());
|
||||
if (currentToken->GetKind() == LexTokenKind::EndOfFile) {
|
||||
break;
|
||||
}
|
||||
if (currentToken->GetKind() == LexTokenKind::SemicolonSymbol) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
out = new ParsedParamListStatement(TextSpan(start, currentToken->GetSpan().GetEnd()), parameters);
|
||||
PROGRESS_TOKEN(currentToken);
|
||||
|
||||
Reference in New Issue
Block a user