]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - lexer.h
Preparing to generate accessors for field arrays
[xonotic/gmqcc.git] / lexer.h
diff --git a/lexer.h b/lexer.h
index 2142da64ad97193b0230849a336f0fe993df077c..8a93d233baf08060ddd1644590fc721136f19dba 100644 (file)
--- a/lexer.h
+++ b/lexer.h
@@ -162,6 +162,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 },
@@ -222,6 +223,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 },