]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - lexer.h
Some side-effect propagation for better warnings, so that comma-operators with assign...
[xonotic/gmqcc.git] / lexer.h
diff --git a/lexer.h b/lexer.h
index 7cc1c7f4dc25cc04cac4c9e0112774e1d83e8f8b..49c7762081454933216aac4e3d902dfa956f6e59 100644 (file)
--- a/lexer.h
+++ b/lexer.h
@@ -252,6 +252,9 @@ static const oper_info fte_operators[] = {
     { "==",  2, opid2('=','='),     ASSOC_LEFT,  10,  0 },
     { "!=",  2, opid2('!','='),     ASSOC_LEFT,  10,  0 },
 
+    { "?",   3, opid2('?',':'),     ASSOC_RIGHT, 9,  0 },
+    { ":",   3, opid2(':','?'),     ASSOC_RIGHT, 9,  0 },
+
     { "=",   2, opid1('='),         ASSOC_RIGHT, 8,  0 },
     { "+=",  2, opid2('+','='),     ASSOC_RIGHT, 8,  0 },
     { "-=",  2, opid2('-','='),     ASSOC_RIGHT, 8,  0 },
@@ -265,10 +268,7 @@ static const oper_info fte_operators[] = {
     { "&&",  2, opid2('&','&'),     ASSOC_LEFT,  5,  0 },
     { "||",  2, opid2('|','|'),     ASSOC_LEFT,  5,  0 },
 
-    { ",",   2, opid1(','),         ASSOC_LEFT,  2,  0 },
-
-    { "?",   3, opid2('?',':'),     ASSOC_RIGHT, 1,  0 },
-    { ":",   3, opid2(':','?'),     ASSOC_RIGHT, 1,  0 }
+    { ",",   2, opid1(','),         ASSOC_LEFT,  2,  0 }
 };
 static const size_t fte_operator_count = (sizeof(fte_operators) / sizeof(fte_operators[0]));