Fixed issue where function declarations without parameters would cause errors
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
a2263535d9
commit
fc66c15c2f
|
@ -109,6 +109,9 @@ ParsedStatement *Parser::ParseFunctionDeclaration(IToken *current) {
|
||||||
|
|
||||||
while (this -> _position < this->_tokens.size()){
|
while (this -> _position < this->_tokens.size()){
|
||||||
auto type = this->Next();
|
auto type = this->Next();
|
||||||
|
if (type->GetKind() == TokenKind::CloseParenthesis){
|
||||||
|
break;
|
||||||
|
}
|
||||||
auto identifier = this->Next();
|
auto identifier = this->Next();
|
||||||
auto next = this->Next();
|
auto next = this->Next();
|
||||||
if (type->GetKind() != TokenKind::Identifier &&!hasErrors){
|
if (type->GetKind() != TokenKind::Identifier &&!hasErrors){
|
||||||
|
|
Loading…
Reference in New Issue