From 2edc7ce822b9180a15b3ca41ae10fb2986bb6df2 Mon Sep 17 00:00:00 2001 From: "Wolfgang (Blub) Bumiller" Date: Sun, 11 Nov 2012 18:45:20 +0100 Subject: [PATCH] index operator actually has 2 operands, not 0 --- lexer.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 }, -- 2.39.2