From: Wolfgang (Blub) Bumiller Date: Tue, 4 Dec 2012 20:04:14 +0000 (+0100) Subject: s/parser_sy_pop/parser_sy_apply_operator/ X-Git-Tag: 0.1.9~114 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f140251e85c41477280e9eb787ecb4195c3d3ac9;p=xonotic%2Fgmqcc.git s/parser_sy_pop/parser_sy_apply_operator/ --- diff --git a/parser.c b/parser.c index d0340dd..769cced 100644 --- a/parser.c +++ b/parser.c @@ -484,7 +484,7 @@ static bool rotate_entfield_array_index_nodes(ast_expression **out) return true; } -static bool parser_sy_pop(parser_t *parser, shunt *sy) +static bool parser_sy_apply_operator(parser_t *parser, shunt *sy) { const oper_info *op; lex_ctx ctx; @@ -1317,7 +1317,7 @@ static bool parser_close_paren(parser_t *parser, shunt *sy, bool functions_only) /* pop off the parenthesis */ vec_shrinkby(sy->ops, 1); /* then apply the index operator */ - if (!parser_sy_pop(parser, sy)) + if (!parser_sy_apply_operator(parser, sy)) return false; return true; } @@ -1333,7 +1333,7 @@ static bool parser_close_paren(parser_t *parser, shunt *sy, bool functions_only) vec_shrinkby(sy->ops, 1); return true; } - if (!parser_sy_pop(parser, sy)) + if (!parser_sy_apply_operator(parser, sy)) return false; } return true; @@ -1621,7 +1621,7 @@ static ast_expression* parse_expression_leave(parser_t *parser, bool stopatcomma (op->prec < olast->prec) || (op->assoc == ASSOC_LEFT && op->prec <= olast->prec) ) ) { - if (!parser_sy_pop(parser, &sy)) + if (!parser_sy_apply_operator(parser, &sy)) goto onerr; if (vec_size(sy.ops) && !vec_last(sy.ops).paren) olast = &operators[vec_last(sy.ops).etype-1]; @@ -1708,7 +1708,7 @@ static ast_expression* parse_expression_leave(parser_t *parser, bool stopatcomma } while (vec_size(sy.ops)) { - if (!parser_sy_pop(parser, &sy)) + if (!parser_sy_apply_operator(parser, &sy)) goto onerr; } @@ -4227,7 +4227,7 @@ skipvar: vec_push(sy.out, syexp(ast_ctx(var), (ast_expression*)var)); vec_push(sy.out, syexp(ast_ctx(cexp), (ast_expression*)cexp)); vec_push(sy.ops, syop(ast_ctx(var), parser->assign_op)); - if (!parser_sy_pop(parser, &sy)) + if (!parser_sy_apply_operator(parser, &sy)) ast_unref(cexp); else { if (vec_size(sy.out) != 1 && vec_size(sy.ops) != 0)