]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - lexer.c
Implemented >< (vector cross product operator). Currently support for constants only.
[xonotic/gmqcc.git] / lexer.c
diff --git a/lexer.c b/lexer.c
index af7819dd802016e0870843c5b6b85ded5d5efc59..517747123be44ac82b2a0f53433b23aae4f2d86b 100644 (file)
--- a/lexer.c
+++ b/lexer.c
@@ -1306,7 +1306,7 @@ int lex_do(lex_file *lex)
     }
 
     if (ch == '+' || ch == '-' || /* ++, --, +=, -=  and -> as well! */
-        ch == '>' || ch == '<' || /* <<, >>, <=, >=                  */
+        ch == '>' || ch == '<' || /* <<, >>, <=, >=  and >< as well! */
         ch == '=' || ch == '!' || /* <=>, ==, !=                     */
         ch == '&' || ch == '|' || /* &&, ||, &=, |=                  */
         ch == '~' || ch == '^'    /* ~=, ~, ^                        */
@@ -1314,7 +1314,9 @@ int lex_do(lex_file *lex)
         lex_tokench(lex, ch);
 
         nextch = lex_getch(lex);
-        if ((nextch == '=' && ch != '<') || (nextch == ch && ch != '!')) {
+        if ((nextch == '=' && ch != '<') ||
+            (nextch == ch  && ch != '!') ||
+            (nextch == '<' && ch == '>')) {
             lex_tokench(lex, nextch);
         } else if (ch == '<' && nextch == '=') {
             lex_tokench(lex, nextch);