don't add the general 'parse error' message if an error has already been printed

This commit is contained in:
Wolfgang (Blub) Bumiller 2012-08-14 11:54:27 +02:00
parent 4dad7c7d50
commit 104e9bce92

View file

@ -1752,7 +1752,7 @@ bool parser_compile(const char *filename)
if (!parser_do(parser)) {
if (parser->tok == TOKEN_EOF)
parseerror(parser, "unexpected eof");
else
else if (!parser->errors)
parseerror(parser, "parse error\n");
lex_close(parser->lex);
mem_d(parser);