scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit 9b4c6ff2e6afee8e2a97f96f21ab894c859e867e
parent 10a0b46b7b6016099d6aa422e09c2179fe7b2fcc
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Sat,  9 May 2015 18:15:56 +0200

Fix error returning EOFTOK in next()

Diffstat:
Mcc1/lex.c | 2+-
Mcc1/stmt.c | 1+
2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/cc1/lex.c b/cc1/lex.c @@ -479,7 +479,7 @@ next(void) char c; if (!fill()) - return EOFTOK; + return yytoken = EOFTOK; while (isspace(*input->begin)) ++input->begin; diff --git a/cc1/stmt.c b/cc1/stmt.c @@ -313,6 +313,7 @@ void compound(Symbol *lbreak, Symbol *lcont, Caselist *lswitch) { extern jmp_buf recover; + pushctx(); expect('{');