ruby-changes:49848
From: mame <ko1@a...>
Date: Sat, 20 Jan 2018 01:28:28 +0900 (JST)
Subject: [ruby-changes:49848] mame:r61966 (trunk): parse.y: Remove double meaning of node_assign
mame 2018-01-20 01:28:23 +0900 (Sat, 20 Jan 2018) New Revision: 61966 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61966 Log: parse.y: Remove double meaning of node_assign Modified files: trunk/parse.y Index: parse.y =================================================================== --- parse.y (revision 61965) +++ parse.y (revision 61966) @@ -479,7 +479,6 @@ static int id_is_var(struct parser_param https://github.com/ruby/ruby/blob/trunk/parse.y#L479 #define match_op(p,node1,node2,op_loc,loc) call_bin_op(0, (node1), idEqTilde, (node2), op_loc, loc) #define call_uni_op(p, recv,id,op_loc,loc) dispatch2(unary, STATIC_ID2SYM(id), (recv)) #define logop(p,id,node1,node2,op_loc,loc) call_bin_op(0, (node1), (id), (node2), op_loc, loc) -#define node_assign(p, node1, node2, loc) dispatch2(assign, (node1), (node2)) static VALUE new_qcall(struct parser_params *p, VALUE q, VALUE r, VALUE m, VALUE a, YYLTYPE *op_loc, const YYLTYPE *loc); static VALUE new_command_qcall(struct parser_params* p, VALUE atype, VALUE recv, VALUE mid, VALUE args, VALUE block, const YYLTYPE *op_loc, const YYLTYPE *loc); @@ -1201,8 +1200,11 @@ stmt : keyword_alias fitem {SET_LEX_STA https://github.com/ruby/ruby/blob/trunk/parse.y#L1200 } | lhs '=' mrhs { + /*%%%*/ value_expr($3); $$ = node_assign(p, $1, $3, &@$); + /*% %*/ + /*% ripper: assign!($1, $3) %*/ } | mlhs '=' mrhs_arg { @@ -1216,8 +1218,11 @@ stmt : keyword_alias fitem {SET_LEX_STA https://github.com/ruby/ruby/blob/trunk/parse.y#L1218 command_asgn : lhs '=' command_rhs { + /*%%%*/ value_expr($3); $$ = node_assign(p, $1, $3, &@$); + /*% %*/ + /*% ripper: assign!($1, $3) %*/ } | var_lhs tOP_ASGN command_rhs { @@ -1786,7 +1791,10 @@ reswords : keyword__LINE__ | keyword__FI https://github.com/ruby/ruby/blob/trunk/parse.y#L1791 arg : lhs '=' arg_rhs { + /*%%%*/ $$ = node_assign(p, $1, $3, &@$); + /*% %*/ + /*% ripper: assign!($1, $3) %*/ } | var_lhs tOP_ASGN arg_rhs { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/