mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-01-18 14:21:36 +00:00
better handlign of a too early error condition
This commit is contained in:
parent
e0ffcfb74b
commit
5a0995c767
1 changed files with 6 additions and 1 deletions
7
parser.c
7
parser.c
|
@ -2685,12 +2685,17 @@ bool parser_compile(const char *filename)
|
|||
if (parser->tok == TOKEN_EOF)
|
||||
parseerror(parser, "unexpected eof");
|
||||
else if (!parser->errors)
|
||||
parseerror(parser, "parse error\n");
|
||||
parseerror(parser, "parse error");
|
||||
lex_close(parser->lex);
|
||||
parser->lex = NULL;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
parseerror(parser, "parse error");
|
||||
lex_close(parser->lex);
|
||||
parser->lex = NULL;
|
||||
return false;
|
||||
}
|
||||
|
||||
lex_close(parser->lex);
|
||||
|
|
Loading…
Reference in a new issue