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

This commit is contained in:
Deukhoofd committed 2019-06-08 14:42:23 +02:00
1 parent a2263535d9
commit fc66c15c2f
1 file changed
+3
+3
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){