mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-01-31 03:50:36 +00:00
Don't produce 'unknown token' errors in preprocessing mode
This commit is contained in:
parent
7f915c0f2a
commit
5ca4390a1f
1 changed files with 6 additions and 0 deletions
6
lexer.c
6
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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue