]> de.git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
array-subscript operator entries
authorWolfgang (Blub) Bumiller <blub@speed.at>
Sat, 10 Nov 2012 19:04:10 +0000 (20:04 +0100)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Sun, 11 Nov 2012 09:13:01 +0000 (10:13 +0100)
lexer.h

diff --git a/lexer.h b/lexer.h
index 2142da64ad97193b0230849a336f0fe993df077c..445b16cbbd25728f640ccd87361d9b950291d6c1 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 */
+    { "[",   0, 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 */
+    { "[",   0, opid1('['),         ASSOC_LEFT,  15, 0 }, /* array subscript */
 
     { "!",   1, opid2('!', 'P'),    ASSOC_RIGHT, 14, OP_PREFIX },
     { "+",   1, opid2('+','P'),     ASSOC_RIGHT, 14, OP_PREFIX },