diff --git a/src/n8/parser/Parser.cpp b/src/n8/parser/Parser.cpp index 1ec6a59..7547fbd 100644 --- a/src/n8/parser/Parser.cpp +++ b/src/n8/parser/Parser.cpp @@ -47,6 +47,7 @@ #include #include +#include #include #include #include @@ -1049,9 +1050,12 @@ std::shared_ptr Parser::statement() { return this->stmtUse(); else if(this->isNext("wait", TokenType::KEYWORD)) return this->stmtWait(); + else if(this->isNext(";", TokenType::OPERATOR)) + return std::make_shared( + std::make_shared(this->consume(";")) + ); std::shared_ptr expr = this->expression(); - if(this->isNext(";", TokenType::OPERATOR)) this->consume(";");