X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fgmqcc.git;a=blobdiff_plain;f=lexer.h;h=a3b9833f3cab1727d66bbe85ffdb4e198e318fd5;hp=0fbe61fc2e0cc45dfde13987a7ca0edc718a918d;hb=84088cb5f0e41a88e88b1af310a9ed12e56a038b;hpb=18deba1a5168a06f7c3180a073f6b1789d5f7a6e diff --git a/lexer.h b/lexer.h index 0fbe61f..a3b9833 100644 --- a/lexer.h +++ b/lexer.h @@ -167,6 +167,7 @@ static const oper_info c_operators[] = { { ".", 2, opid1('.'), ASSOC_LEFT, 15, 0 }, { "(", 0, opid1('('), ASSOC_LEFT, 15, 0 }, /* function call */ + { "[", 2, opid1('['), ASSOC_LEFT, 15, 0 }, /* array subscript */ { "!", 1, opid2('!', 'P'), ASSOC_RIGHT, 14, OP_PREFIX }, { "~", 1, opid2('~', 'P'), ASSOC_RIGHT, 14, OP_PREFIX }, @@ -227,6 +228,7 @@ static const oper_info qcc_operators[] = { { ".", 2, opid1('.'), ASSOC_LEFT, 15, 0 }, { "(", 0, opid1('('), ASSOC_LEFT, 15, 0 }, /* function call */ + { "[", 2, opid1('['), ASSOC_LEFT, 15, 0 }, /* array subscript */ { "!", 1, opid2('!', 'P'), ASSOC_RIGHT, 14, OP_PREFIX }, { "+", 1, opid2('+','P'), ASSOC_RIGHT, 14, OP_PREFIX },