Fixed issue where function declarations without parameters would cause errors
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -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){
|
||||||
|
|||||||
Reference in New Issue
Block a user