]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - lexer.c
operator &~=
[xonotic/gmqcc.git] / lexer.c
diff --git a/lexer.c b/lexer.c
index c37678ec0d0c7f1baca44e322aeb6563acbb4891..8f1bcb8a46eb3eb5bd823c91267f5bae01765950 100644 (file)
--- a/lexer.c
+++ b/lexer.c
@@ -834,7 +834,7 @@ static int GMQCC_WARN lex_finish_digit(lex_file *lex, int lastch)
 
 int lex_do(lex_file *lex)
 {
-    int ch, nextch;
+    int ch, nextch, thirdch;
 
     lex_token_new(lex);
 #if 0
@@ -1114,6 +1114,16 @@ int lex_do(lex_file *lex)
             lex_tokench(lex, nextch);
         } else if (ch == '-' && nextch == '>') {
             lex_tokench(lex, nextch);
+        } else if (ch == '&' && nextch == '~') {
+            thirdch = lex_getch(lex);
+            if (thirdch != '=') {
+                lex_ungetch(lex, thirdch);
+                lex_ungetch(lex, nextch);
+            }
+            else {
+                lex_tokench(lex, nextch);
+                lex_tokench(lex, thirdch);
+            }
         } else
             lex_ungetch(lex, nextch);