From 5ca4390a1f32d102601fa679379d720acf207265 Mon Sep 17 00:00:00 2001 From: "Wolfgang (Blub) Bumiller" Date: Fri, 30 Nov 2012 15:38:03 +0100 Subject: [PATCH] Don't produce 'unknown token' errors in preprocessing mode --- lexer.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lexer.c b/lexer.c index 295cb5b..258fb97 100644 --- a/lexer.c +++ b/lexer.c @@ -1381,6 +1381,12 @@ int lex_do(lex_file *lex) return lex->tok.ttype; } + if (lex->flags.preprocessing) { + lex_tokench(lex, ch); + lex_endtoken(lex); + return (lex->tok.ttype = ch); + } + lexerror(lex, "unknown token"); return (lex->tok.ttype = TOKEN_ERROR); } -- 2.39.2