From: Wolfgang (Blub) Bumiller Date: Fri, 30 Nov 2012 14:38:03 +0000 (+0100) Subject: Don't produce 'unknown token' errors in preprocessing mode X-Git-Tag: 0.1.9~175 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5ca4390a1f32d102601fa679379d720acf207265;p=xonotic%2Fgmqcc.git Don't produce 'unknown token' errors in preprocessing mode --- 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); }