From 3455c950ac575243e3acd6a803b6d6b0da782c42 Mon Sep 17 00:00:00 2001 From: jacopodl Date: Thu, 27 Jun 2024 23:25:17 +0200 Subject: [PATCH] fix(parser) --- argon/lang/parser2/parser2.cpp | 2 ++ 1 file changed, 2 insertions(+) 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]);