Improve error messages on invalid function declarations.

This commit is contained in:
2020-10-10 19:33:30 +02:00
parent a7c7fc3e28
commit ce9ad2c9ba

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);
if (currentToken->GetKind() != LexTokenKind::SemicolonSymbol) {
PROGRESS_TOKEN(currentToken);
}
return true;
}