mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-02-28 05:51:19 +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;
|
return lex->tok.ttype;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (lex->flags.preprocessing) {
|
||||||
|
lex_tokench(lex, ch);
|
||||||
|
lex_endtoken(lex);
|
||||||
|
return (lex->tok.ttype = ch);
|
||||||
|
}
|
||||||
|
|
||||||
lexerror(lex, "unknown token");
|
lexerror(lex, "unknown token");
|
||||||
return (lex->tok.ttype = TOKEN_ERROR);
|
return (lex->tok.ttype = TOKEN_ERROR);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue