Don't die on regular EOF

This commit is contained in:
Wolfgang Bumiller 2012-07-19 11:22:09 +02:00
parent d581fdc048
commit d6cd3b6dc9

View file

@ -146,6 +146,8 @@ bool parser_compile(const char *filename)
while (parser->tok != TOKEN_EOF && parser->tok < TOKEN_ERROR)
{
if (!parser_do(parser)) {
if (parser->tok == TOKEN_EOF)
break;
printf("parse error\n");
lex_close(parser->lex);
mem_d(parser);