From: Wolfgang Bumiller Date: Fri, 27 Jul 2012 10:53:15 +0000 (+0200) Subject: the comma is now in the operator list X-Git-Tag: 0.1-rc1~387 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=623046dda82afac9aece37145c25c6a8bc50fa64;p=xonotic%2Fgmqcc.git the comma is now in the operator list --- diff --git a/lexer.h b/lexer.h index c23f944..ae8812b 100644 --- a/lexer.h +++ b/lexer.h @@ -183,6 +183,8 @@ static const oper_info operators[] = { { "&=", 2, opid2('&','='), ASSOC_RIGHT, 2, 0 }, { "^=", 2, opid2('^','='), ASSOC_RIGHT, 2, 0 }, { "|=", 2, opid2('|','='), ASSOC_RIGHT, 2, 0 }, + + { ",", 2, opid1(','), ASSOC_LEFT, 1, 0 } }; static const size_t operator_count = (sizeof(operators) / sizeof(operators[0])); diff --git a/parser.c b/parser.c index 56f20f2..75c6911 100644 --- a/parser.c +++ b/parser.c @@ -458,12 +458,6 @@ static ast_expression* parser_expression(parser_t *parser) goto onerr; } } - else if (parser->tok == ',') { - if (!shunt_ops_add(&sy, syparen(parser_ctx(parser), ','))) { - parseerror(parser, "out of memory"); - goto onerr; - } - } else if (parser->tok == ')') { /* we do expect an operator next */ /* closing an opening paren */