Don't produce 'unknown token' errors in preprocessing mode

This commit is contained in:
Wolfgang (Blub) Bumiller 2012-11-30 15:38:03 +01:00
parent 7f915c0f2a
commit 5ca4390a1f

View file

@ -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);
}