]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
index operator actually has 2 operands, not 0
authorWolfgang (Blub) Bumiller <blub@speed.at>
Sun, 11 Nov 2012 17:45:20 +0000 (18:45 +0100)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Sun, 11 Nov 2012 17:45:20 +0000 (18:45 +0100)
lexer.h

diff --git a/lexer.h b/lexer.h
index 445b16cbbd25728f640ccd87361d9b950291d6c1..8a93d233baf08060ddd1644590fc721136f19dba 100644 (file)
--- a/lexer.h
+++ b/lexer.h
@@ -162,7 +162,7 @@ static const oper_info c_operators[] = {
 
     { ".",   2, opid1('.'),         ASSOC_LEFT,  15, 0 },
     { "(",   0, opid1('('),         ASSOC_LEFT,  15, 0 }, /* function call */
-    { "[",   0, opid1('['),         ASSOC_LEFT,  15, 0 }, /* array subscript */
+    { "[",   2, opid1('['),         ASSOC_LEFT,  15, 0 }, /* array subscript */
 
     { "!",   1, opid2('!', 'P'),    ASSOC_RIGHT, 14, OP_PREFIX },
     { "~",   1, opid2('~', 'P'),    ASSOC_RIGHT, 14, OP_PREFIX },
@@ -223,7 +223,7 @@ static const oper_info qcc_operators[] = {
 
     { ".",   2, opid1('.'),         ASSOC_LEFT,  15, 0 },
     { "(",   0, opid1('('),         ASSOC_LEFT,  15, 0 }, /* function call */
-    { "[",   0, opid1('['),         ASSOC_LEFT,  15, 0 }, /* array subscript */
+    { "[",   2, opid1('['),         ASSOC_LEFT,  15, 0 }, /* array subscript */
 
     { "!",   1, opid2('!', 'P'),    ASSOC_RIGHT, 14, OP_PREFIX },
     { "+",   1, opid2('+','P'),     ASSOC_RIGHT, 14, OP_PREFIX },