ruby-changes:49741
From: mame <ko1@a...>
Date: Tue, 16 Jan 2018 01:12:39 +0900 (JST)
Subject: [ruby-changes:49741] mame:r61858 (trunk): parse.y: Removes unneeded Ripper/Parser guards
mame 2018-01-16 01:12:34 +0900 (Tue, 16 Jan 2018) New Revision: 61858 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61858 Log: parse.y: Removes unneeded Ripper/Parser guards Modified files: trunk/parse.y Index: parse.y =================================================================== --- parse.y (revision 61857) +++ parse.y (revision 61858) @@ -1325,11 +1325,8 @@ command_asgn : lhs '=' command_rhs https://github.com/ruby/ruby/blob/trunk/parse.y#L1325 command_rhs : command_call %prec tOP_ASGN { - /*%%%*/ value_expr($1); $$ = $1; - /*% - %*/ } | command_call modifier_rescue stmt { @@ -1366,12 +1363,8 @@ expr : command_call https://github.com/ruby/ruby/blob/trunk/parse.y#L1363 expr_value : expr { - /*%%%*/ value_expr($1); $$ = $1; - /*% - $$ = $1; - %*/ } ; @@ -1408,12 +1401,10 @@ fcall : operation https://github.com/ruby/ruby/blob/trunk/parse.y#L1401 command : fcall command_args %prec tLOWEST { + $$ = new_command(p, $1, $2); /*%%%*/ - $$ = $1; - $$->nd_args = $2; nd_set_last_loc($1, nd_last_loc($2)); /*% - $$ = dispatch2(command, $1, $2); %*/ } | fcall command_args cmd_brace_block @@ -2089,12 +2080,8 @@ rel_expr : arg relop arg %prec '>' https://github.com/ruby/ruby/blob/trunk/parse.y#L2080 arg_value : arg { - /*%%%*/ value_expr($1); $$ = $1; - /*% - $$ = $1; - %*/ } ; @@ -2123,11 +2110,8 @@ aref_args : none https://github.com/ruby/ruby/blob/trunk/parse.y#L2110 arg_rhs : arg %prec tOP_ASGN { - /*%%%*/ value_expr($1); $$ = $1; - /*% - %*/ } | arg modifier_rescue arg { @@ -2781,12 +2765,8 @@ primary : literal https://github.com/ruby/ruby/blob/trunk/parse.y#L2765 primary_value : primary { - /*%%%*/ value_expr($1); $$ = $1; - /*% - $$ = $1; - %*/ } ; @@ -4478,12 +4458,8 @@ opt_f_block_arg : ',' f_block_arg https://github.com/ruby/ruby/blob/trunk/parse.y#L4458 singleton : var_ref { - /*%%%*/ value_expr($1); $$ = $1; - /*% - $$ = $1; - %*/ } | '(' {SET_LEX_STATE(EXPR_BEG);} expr rparen { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/