From 0d64e555e25c7fc45f163b211b6d1f6e200d3fae Mon Sep 17 00:00:00 2001 From: "Wolfgang (Blub) Bumiller" Date: Mon, 20 Aug 2012 18:15:31 +0200 Subject: [PATCH] Better handling of EOF - encountering EOF in parser_next will not return false yet, this is a more elegant way... --- parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.39.2