From: Wolfgang (Blub) Bumiller Date: Mon, 20 Aug 2012 16:15:31 +0000 (+0200) Subject: Better handling of EOF - encountering EOF in parser_next will not return false yet... X-Git-Tag: 0.1-rc1~130 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=0d64e555e25c7fc45f163b211b6d1f6e200d3fae;p=xonotic%2Fgmqcc.git Better handling of EOF - encountering EOF in parser_next will not return false yet, this is a more elegant way... --- diff --git a/parser.c b/parser.c index 21a944b..2541548 100644 --- a/parser.c +++ b/parser.c @@ -129,7 +129,7 @@ bool parser_next(parser_t *parser) /* lex_do kills the previous token */ parser->tok = lex_do(parser->lex); if (parser->tok == TOKEN_EOF) - return false; + return true; if (parser->tok >= TOKEN_ERROR) { parseerror(parser, "lex error"); return false;