Improve error messages on invalid function declarations.

This commit is contained in:
Deukhoofd 2020-10-10 19:33:30 +02:00
parent a7c7fc3e28
commit ce9ad2c9ba
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
1 changed files with 4 additions and 1 deletions

View File

@ -361,9 +361,12 @@ namespace MalachScript::Parser {
if (currentToken->GetKind() == LexTokenKind::SemicolonSymbol) {
break;
}
PROGRESS_TOKEN(currentToken);
}
out = new ParsedParamListStatement(TextSpan(start, currentToken->GetSpan().GetEnd()), parameters);
PROGRESS_TOKEN(currentToken);
if (currentToken->GetKind() != LexTokenKind::SemicolonSymbol) {
PROGRESS_TOKEN(currentToken);
}
return true;
}