Fixed issue where function declarations without parameters would cause errors
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2019-06-08 14:42:23 +02:00
parent a2263535d9
commit fc66c15c2f
No known key found for this signature in database
GPG Key ID: B4C087AC81641654
1 changed files with 3 additions and 0 deletions

View File

@ -109,6 +109,9 @@ ParsedStatement *Parser::ParseFunctionDeclaration(IToken *current) {
while (this -> _position < this->_tokens.size()){
auto type = this->Next();
if (type->GetKind() == TokenKind::CloseParenthesis){
break;
}
auto identifier = this->Next();
auto next = this->Next();
if (type->GetKind() != TokenKind::Identifier &&!hasErrors){