From: Wolfgang (Blub) Bumiller Date: Sun, 11 Nov 2012 17:45:20 +0000 (+0100) Subject: index operator actually has 2 operands, not 0 X-Git-Tag: 0.1~19^2~28 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2edc7ce822b9180a15b3ca41ae10fb2986bb6df2;p=xonotic%2Fgmqcc.git index operator actually has 2 operands, not 0 --- diff --git a/lexer.h b/lexer.h index 445b16c..8a93d23 100644 --- 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 },