summaryrefslogtreecommitdiffstats
path: root/Parser
diff options
context:
space:
mode:
Diffstat (limited to 'Parser')
-rw-r--r--Parser/tokenizer.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c
index 75b63fb..083ef0e 100644
--- a/Parser/tokenizer.c
+++ b/Parser/tokenizer.c
@@ -257,7 +257,12 @@ tok_nextc(tok)
}
else {
cur = tok->cur - tok->buf;
- tok->done = E_OK;
+ if (feof(tok->fp)) {
+ tok->done = E_EOF;
+ done = 1;
+ }
+ else
+ tok->done = E_OK;
}
tok->lineno++;
/* Read until '\n' or EOF */