mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-03-22 02:31:28 +00:00
lexer: recognize != as operator when noops=false
This commit is contained in:
parent
d81ef81246
commit
7bc564f175
1 changed files with 4 additions and 1 deletions
5
lexer.c
5
lexer.c
|
@ -528,6 +528,7 @@ int lex_do(lex_file *lex)
|
|||
case '~':
|
||||
case ',':
|
||||
case '.':
|
||||
case '!':
|
||||
if (!lex_tokench(lex, ch) ||
|
||||
!lex_endtoken(lex))
|
||||
{
|
||||
|
@ -550,7 +551,7 @@ int lex_do(lex_file *lex)
|
|||
|
||||
if (ch == '+' || ch == '-' || /* ++, --, +=, -= and -> as well! */
|
||||
ch == '>' || ch == '<' || /* <<, >>, <=, >= */
|
||||
ch == '=' || /* == */
|
||||
ch == '=' || ch == '!' || /* ==, != */
|
||||
ch == '&' || ch == '|') /* &&, ||, &=, |= */
|
||||
{
|
||||
if (!lex_tokench(lex, ch))
|
||||
|
@ -571,6 +572,7 @@ int lex_do(lex_file *lex)
|
|||
return (lex->tok->ttype = TOKEN_OPERATOR);
|
||||
}
|
||||
|
||||
/*
|
||||
if (ch == '^' || ch == '~' || ch == '!')
|
||||
{
|
||||
if (!lex_tokench(lex, ch) ||
|
||||
|
@ -580,6 +582,7 @@ int lex_do(lex_file *lex)
|
|||
}
|
||||
return (lex->tok->ttype = TOKEN_OPERATOR);
|
||||
}
|
||||
*/
|
||||
|
||||
if (ch == '*' || ch == '/') /* *=, /= */
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue