Fix USE/EXEC error check
This commit is contained in:
@@ -1111,6 +1111,11 @@ class Parser
|
|||||||
{
|
{
|
||||||
lex.popFront();
|
lex.popFront();
|
||||||
auto expr = expression();
|
auto expr = expression();
|
||||||
|
if (!expr)
|
||||||
|
{
|
||||||
|
syntaxError();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
return new Use(expr, lex.location);
|
return new Use(expr, lex.location);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -1118,6 +1123,11 @@ class Parser
|
|||||||
{
|
{
|
||||||
lex.popFront();
|
lex.popFront();
|
||||||
auto expr = expression();
|
auto expr = expression();
|
||||||
|
if (!expr)
|
||||||
|
{
|
||||||
|
syntaxError();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
return new Exec(expr, lex.location);
|
return new Exec(expr, lex.location);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user