From: Wolfgang (Blub) Bumiller Date: Thu, 16 Aug 2012 14:06:12 +0000 (+0200) Subject: lexer: recognize != as operator when noops=false X-Git-Tag: 0.1-rc1~249 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7bc564f175b4e040c90a0774b877a59dfbb8523f;p=xonotic%2Fgmqcc.git lexer: recognize != as operator when noops=false --- diff --git a/lexer.c b/lexer.c index 0c58a5d..382512d 100644 --- a/lexer.c +++ b/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 == '/') /* *=, /= */ {