]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - lexer.h
Merging in new-syntax
[xonotic/gmqcc.git] / lexer.h
diff --git a/lexer.h b/lexer.h
index 0fbe61fc2e0cc45dfde13987a7ca0edc718a918d..a3b9833f3cab1727d66bbe85ffdb4e198e318fd5 100644 (file)
--- a/lexer.h
+++ b/lexer.h
@@ -167,6 +167,7 @@ static const oper_info c_operators[] = {
 
     { ".",   2, opid1('.'),         ASSOC_LEFT,  15, 0 },
     { "(",   0, opid1('('),         ASSOC_LEFT,  15, 0 }, /* function call */
+    { "[",   2, opid1('['),         ASSOC_LEFT,  15, 0 }, /* array subscript */
 
     { "!",   1, opid2('!', 'P'),    ASSOC_RIGHT, 14, OP_PREFIX },
     { "~",   1, opid2('~', 'P'),    ASSOC_RIGHT, 14, OP_PREFIX },
@@ -227,6 +228,7 @@ static const oper_info qcc_operators[] = {
 
     { ".",   2, opid1('.'),         ASSOC_LEFT,  15, 0 },
     { "(",   0, opid1('('),         ASSOC_LEFT,  15, 0 }, /* function call */
+    { "[",   2, opid1('['),         ASSOC_LEFT,  15, 0 }, /* array subscript */
 
     { "!",   1, opid2('!', 'P'),    ASSOC_RIGHT, 14, OP_PREFIX },
     { "+",   1, opid2('+','P'),     ASSOC_RIGHT, 14, OP_PREFIX },