diff --git a/argon/lang/parser2/parser2.cpp b/argon/lang/parser2/parser2.cpp index 200aee5d..bd327bb6 100644 --- a/argon/lang/parser2/parser2.cpp +++ b/argon/lang/parser2/parser2.cpp @@ -1213,6 +1213,8 @@ Node *Parser::ParseSyncBlock(Context *context) { this->Eat(true); expr = (ArObject *) this->ParseExpression(context, PeekPrecedence(TokenType::ASTERISK)); + if (!expr) + throw ParserException(this->tkcur_.loc, kStandardError[0]); if (((Node *) expr.Get())->node_type == NodeType::LITERAL) throw ParserException(((Node *) expr.Get())->loc, kStandardError[14]);