From ec073534ecd1ef4923b08ec535039d5456863393 Mon Sep 17 00:00:00 2001 From: yui-knk Date: Mon, 11 Dec 2017 00:28:27 +0000 Subject: parse.y: Remove not used argument * parse.y (list_append_gen): location is not used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61103 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- parse.y | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) (limited to 'parse.y') diff --git a/parse.y b/parse.y index b7033b45fd..39982b2662 100644 --- a/parse.y +++ b/parse.y @@ -421,8 +421,8 @@ static void block_dup_check_gen(struct parser_params*,NODE*,NODE*); static NODE *block_append_gen(struct parser_params*,NODE*,NODE*,const YYLTYPE*); #define block_append(h,t,location) block_append_gen(parser,(h),(t),(location)) -static NODE *list_append_gen(struct parser_params*,NODE*,NODE*,const YYLTYPE*); -#define list_append(l,i,location) list_append_gen(parser,(l),(i),(location)) +static NODE *list_append_gen(struct parser_params*,NODE*,NODE*); +#define list_append(l,i) list_append_gen(parser,(l),(i)) static NODE *list_concat(NODE*,NODE*); static NODE *arg_append_gen(struct parser_params*,NODE*,NODE*,const YYLTYPE*); #define arg_append(h,t,location) arg_append_gen(parser,(h),(t),(location)) @@ -1788,7 +1788,7 @@ mlhs_basic : mlhs_head | mlhs_head mlhs_item { /*%%%*/ - $$ = new_masgn(list_append($1,$2,&@$), 0, &@$); + $$ = new_masgn(list_append($1,$2), 0, &@$); /*% $$ = mlhs_add($1, $2); %*/ @@ -1885,7 +1885,7 @@ mlhs_head : mlhs_item ',' | mlhs_head mlhs_item ',' { /*%%%*/ - $$ = list_append($1, $2, &@$); + $$ = list_append($1, $2); /*% $$ = mlhs_add($1, $2); %*/ @@ -1903,7 +1903,7 @@ mlhs_post : mlhs_item | mlhs_post ',' mlhs_item { /*%%%*/ - $$ = list_append($1, $3, &@$); + $$ = list_append($1, $3); /*% $$ = mlhs_add($1, $3); %*/ @@ -2585,7 +2585,7 @@ args : arg_value /*%%%*/ NODE *n1; if ((n1 = splat_array($1)) != 0) { - $$ = list_append(n1, $3, &@$); + $$ = list_append(n1, $3); } else { $$ = arg_append($1, $3, &@$); @@ -2619,7 +2619,7 @@ mrhs : args ',' arg_value /*%%%*/ NODE *n1; if ((n1 = splat_array($1)) != 0) { - $$ = list_append(n1, $3, &@$); + $$ = list_append(n1, $3); } else { $$ = arg_append($1, $3, &@$); @@ -3306,7 +3306,7 @@ f_marg_list : f_marg | f_marg_list ',' f_marg { /*%%%*/ - $$ = list_append($1, $3, &@$); + $$ = list_append($1, $3); /*% $$ = mlhs_add($1, $3); %*/ @@ -4001,7 +4001,7 @@ word_list : /* none */ | word_list word ' ' { /*%%%*/ - $$ = list_append($1, evstr2dstr($2, &@$), &@$); + $$ = list_append($1, evstr2dstr($2, &@$)); /*% $$ = dispatch2(words_add, $1, $2); %*/ @@ -4055,7 +4055,7 @@ symbol_list : /* none */ nd_set_type($2, NODE_LIT); add_mark_object($2->nd_lit = rb_str_intern($2->nd_lit)); } - $$ = list_append($1, $2, &@$); + $$ = list_append($1, $2); /*% $$ = dispatch2(symbols_add, $1, $2); %*/ @@ -4094,7 +4094,7 @@ qword_list : /* none */ { /*%%%*/ $2->nd_loc = @2; - $$ = list_append($1, $2, &@$); + $$ = list_append($1, $2); /*% $$ = dispatch2(qwords_add, $1, $2); %*/ @@ -4117,7 +4117,7 @@ qsym_list : /* none */ nd_set_type($2, NODE_LIT); add_mark_object($2->nd_lit = ID2SYM(rb_intern_str(lit))); $2->nd_loc = @2; - $$ = list_append($1, $2, &@$); + $$ = list_append($1, $2); /*% $$ = dispatch2(qsymbols_add, $1, $2); %*/ @@ -4186,10 +4186,10 @@ regexp_contents: /* none */ case NODE_DSTR: break; default: - head = list_append(new_dstr(Qnil, &@$), head, &@$); + head = list_append(new_dstr(Qnil, &@$), head); break; } - $$ = list_append(head, tail, &@$); + $$ = list_append(head, tail); } /*% VALUE s1 = 1, s2 = 0, n1 = $1, n2 = $2; @@ -5006,7 +5006,7 @@ assoc : arg_value tASSOC arg_value nd_set_type($1, NODE_LIT); add_mark_object($1->nd_lit = rb_fstring($1->nd_lit)); } - $$ = list_append(new_list($1, &@$), $3, &@$); + $$ = list_append(new_list($1, &@$), $3); /*% $$ = dispatch2(assoc_new, $1, $3); %*/ @@ -5014,7 +5014,7 @@ assoc : arg_value tASSOC arg_value | tLABEL arg_value { /*%%%*/ - $$ = list_append(new_list(new_lit(ID2SYM($1), &@1), &@$), $2, &@$); + $$ = list_append(new_list(new_lit(ID2SYM($1), &@1), &@$), $2); /*% $$ = dispatch2(assoc_new, $1, $2); %*/ @@ -5025,7 +5025,7 @@ assoc : arg_value tASSOC arg_value YYLTYPE location; location.first_loc = @1.first_loc; location.last_loc = @3.last_loc; - $$ = list_append(new_list(dsym_node($2, &location), &location), $4, &@$); + $$ = list_append(new_list(dsym_node($2, &location), &location), $4); /*% $$ = dispatch2(assoc_new, dispatch1(dyna_symbol, $2), $4); %*/ @@ -5037,7 +5037,7 @@ assoc : arg_value tASSOC arg_value !($2->nd_head && $2->nd_head->nd_alen)) $$ = 0; else - $$ = list_append(new_list(0, &@$), $2, &@$); + $$ = list_append(new_list(0, &@$), $2); /*% $$ = dispatch1(assoc_splat, $2); %*/ @@ -9041,7 +9041,7 @@ block_append_gen(struct parser_params *parser, NODE *head, NODE *tail, const YYL /* append item to the list */ static NODE* -list_append_gen(struct parser_params *parser, NODE *list, NODE *item, const YYLTYPE *location) +list_append_gen(struct parser_params *parser, NODE *list, NODE *item) { NODE *last; @@ -9121,7 +9121,7 @@ literal_concat_gen(struct parser_params *parser, NODE *head, NODE *tail, const Y htype = nd_type(head); if (htype == NODE_EVSTR) { NODE *node = new_dstr(STR_NEW0(), location); - head = list_append(node, head, location); + head = list_append(node, head); htype = NODE_DSTR; } if (heredoc_indent > 0) { @@ -9129,7 +9129,7 @@ literal_concat_gen(struct parser_params *parser, NODE *head, NODE *tail, const Y case NODE_STR: nd_set_type(head, NODE_DSTR); case NODE_DSTR: - return list_append(head, tail, location); + return list_append(head, tail); default: break; } @@ -9154,7 +9154,7 @@ literal_concat_gen(struct parser_params *parser, NODE *head, NODE *tail, const Y rb_discard_node(tail); } else { - list_append(head, tail, location); + list_append(head, tail); } break; @@ -9193,7 +9193,7 @@ literal_concat_gen(struct parser_params *parser, NODE *head, NODE *tail, const Y nd_set_type(head, NODE_DSTR); head->nd_alen = 1; } - list_append(head, tail, location); + list_append(head, tail); break; } return head; @@ -9203,7 +9203,7 @@ static NODE * evstr2dstr_gen(struct parser_params *parser, NODE *node, const YYLTYPE *location) { if (nd_type(node) == NODE_EVSTR) { - node = list_append(new_dstr(STR_NEW0(), location), node, location); + node = list_append(new_dstr(STR_NEW0(), location), node); } return node; } @@ -10127,13 +10127,13 @@ arg_append_gen(struct parser_params *parser, NODE *node1, NODE *node2, const YYL if (!node1) return new_list(node2, &node2->nd_loc); switch (nd_type(node1)) { case NODE_ARRAY: - return list_append(node1, node2, location); + return list_append(node1, node2); case NODE_BLOCK_PASS: node1->nd_head = arg_append(node1->nd_head, node2, location); node1->nd_loc.last_loc = node1->nd_head->nd_loc.last_loc; return node1; case NODE_ARGSPUSH: - node1->nd_body = list_append(new_list(node1->nd_body, &node1->nd_body->nd_loc), node2, location); + node1->nd_body = list_append(new_list(node1->nd_body, &node1->nd_body->nd_loc), node2); node1->nd_loc.last_loc = node1->nd_body->nd_loc.last_loc; nd_set_type(node1, NODE_ARGSCAT); return node1; -- cgit v1.2.3