index operator actually has 2 operands, not 0

This commit is contained in:
Wolfgang (Blub) Bumiller 2012-11-11 18:45:20 +01:00
parent caf8946f99
commit 2edc7ce822

View file

@ -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 },