diff --git a/SMILEBASIC/parser.d b/SMILEBASIC/parser.d index 4f09c76..14a6bf5 100644 --- a/SMILEBASIC/parser.d +++ b/SMILEBASIC/parser.d @@ -1111,6 +1111,11 @@ class Parser { lex.popFront(); auto expr = expression(); + if (!expr) + { + syntaxError(); + return null; + } return new Use(expr, lex.location); } break; @@ -1118,6 +1123,11 @@ class Parser { lex.popFront(); auto expr = expression(); + if (!expr) + { + syntaxError(); + return null; + } return new Exec(expr, lex.location); } break;