ruby-changes:49844
From: mame <ko1@a...>
Date: Sat, 20 Jan 2018 00:22:42 +0900 (JST)
Subject: [ruby-changes:49844] mame:r61962 (trunk): parse.y: swap `foo!` and `foo` in Ripper DSL
mame 2018-01-20 00:22:36 +0900 (Sat, 20 Jan 2018) New Revision: 61962 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61962 Log: parse.y: swap `foo!` and `foo` in Ripper DSL `foo!(...)` means Ripper event, and `foo(...)` means C function/macro call. This is for fail-safe; if I forget `!` accidentally, it would fail to compile, instead of wrongly adding a new Ripper event. Modified files: trunk/ext/ripper/tools/dsl.rb trunk/parse.y Index: ext/ripper/tools/dsl.rb =================================================================== --- ext/ripper/tools/dsl.rb (revision 61961) +++ ext/ripper/tools/dsl.rb (revision 61962) @@ -34,12 +34,13 @@ class DSL https://github.com/ruby/ruby/blob/trunk/ext/ripper/tools/dsl.rb#L34 s end - def method_missing(*args) - if args.first =~ /!\z/ - "#{ $` }(#{ args.drop(1).join(", ") })" + def method_missing(event, *args) + if event.to_s =~ /!\z/ + event = $` + @events[event] = args.size + "dispatch#{ args.size }(#{ [event, *args].join(", ") })" else - @events[args.first.to_s] = args.size - 1 - "dispatch#{ args.size - 1 }(#{ args.join(", ") })" + "#{ event }(#{ args.join(", ") })" end end end Index: parse.y =================================================================== --- parse.y (revision 61961) +++ parse.y (revision 61962) @@ -968,7 +968,7 @@ program : { https://github.com/ruby/ruby/blob/trunk/parse.y#L968 } p->eval_tree = NEW_SCOPE(0, block_append(p, p->eval_tree, $2), &@$); /*% %*/ - /*% ripper: program($2) %*/ + /*% ripper: program!($2) %*/ /*%%%*/ /*% p->result = $$; @@ -988,21 +988,21 @@ top_stmts : none https://github.com/ruby/ruby/blob/trunk/parse.y#L988 /*%%%*/ $$ = NEW_BEGIN(0, &@$); /*% %*/ - /*% ripper: stmts_add(stmts_new, void_stmt) %*/ + /*% ripper: stmts_add!(stmts_new!, void_stmt!) %*/ } | top_stmt { /*%%%*/ $$ = newline_node($1); /*% %*/ - /*% ripper: stmts_add(stmts_new, $1) %*/ + /*% ripper: stmts_add!(stmts_new!, $1) %*/ } | top_stmts terms top_stmt { /*%%%*/ $$ = block_append(p, $1, newline_node($3)); /*% %*/ - /*% ripper: stmts_add($1, $3) %*/ + /*% ripper: stmts_add!($1, $3) %*/ } | error top_stmt { @@ -1024,7 +1024,7 @@ begin_block : '{' top_compstmt '}' https://github.com/ruby/ruby/blob/trunk/parse.y#L1024 NEW_BEGIN($2, &@$)); $$ = NEW_BEGIN(0, &@$); /*% %*/ - /*% ripper: send(:BEGIN, $2) %*/ + /*% ripper: BEGIN!($2) %*/ } ; @@ -1047,7 +1047,7 @@ bodystmt : compstmt https://github.com/ruby/ruby/blob/trunk/parse.y#L1047 } fixpos($$, $1); /*% %*/ - /*% ripper: bodystmt(escape_Qundef!($1), escape_Qundef!($2), escape_Qundef!($3), escape_Qundef!($4)) %*/ + /*% ripper: bodystmt!(escape_Qundef($1), escape_Qundef($2), escape_Qundef($3), escape_Qundef($4)) %*/ } ; @@ -1062,21 +1062,21 @@ stmts : none https://github.com/ruby/ruby/blob/trunk/parse.y#L1062 /*%%%*/ $$ = NEW_BEGIN(0, &@$); /*% %*/ - /*% ripper: stmts_add(stmts_new, void_stmt) %*/ + /*% ripper: stmts_add!(stmts_new!, void_stmt!) %*/ } | stmt_or_begin { /*%%%*/ $$ = newline_node($1); /*% %*/ - /*% ripper: stmts_add(stmts_new, $1) %*/ + /*% ripper: stmts_add!(stmts_new!, $1) %*/ } | stmts terms stmt_or_begin { /*%%%*/ $$ = block_append(p, $1, newline_node($3)); /*% %*/ - /*% ripper: stmts_add($1, $3) %*/ + /*% ripper: stmts_add!($1, $3) %*/ } | error stmt { @@ -1102,14 +1102,14 @@ stmt : keyword_alias fitem {SET_LEX_STA https://github.com/ruby/ruby/blob/trunk/parse.y#L1102 /*%%%*/ $$ = NEW_ALIAS($2, $4, &@$); /*% %*/ - /*% ripper: send(:alias, $2, $4) %*/ + /*% ripper: alias!($2, $4) %*/ } | keyword_alias tGVAR tGVAR { /*%%%*/ $$ = NEW_VALIAS($2, $3, &@$); /*% %*/ - /*% ripper: var_alias($2, $3) %*/ + /*% ripper: var_alias!($2, $3) %*/ } | keyword_alias tGVAR tBACK_REF { @@ -1119,7 +1119,7 @@ stmt : keyword_alias fitem {SET_LEX_STA https://github.com/ruby/ruby/blob/trunk/parse.y#L1119 buf[1] = (char)$3->nd_nth; $$ = NEW_VALIAS($2, rb_intern2(buf, 2), &@$); /*% %*/ - /*% ripper: var_alias($2, $3) %*/ + /*% ripper: var_alias!($2, $3) %*/ } | keyword_alias tGVAR tNTH_REF { @@ -1127,14 +1127,14 @@ stmt : keyword_alias fitem {SET_LEX_STA https://github.com/ruby/ruby/blob/trunk/parse.y#L1127 yyerror1(&@3, "can't make alias for the number variables"); $$ = NEW_BEGIN(0, &@$); /*% %*/ - /*% ripper[error]: alias_error(var_alias($2, $3)) %*/ + /*% ripper[error]: alias_error!(var_alias!($2, $3)) %*/ } | keyword_undef undef_list { /*%%%*/ $$ = $2; /*% %*/ - /*% ripper: send(:undef, $2) %*/ + /*% ripper: undef!($2) %*/ } | stmt modifier_if expr_value { @@ -1142,7 +1142,7 @@ stmt : keyword_alias fitem {SET_LEX_STA https://github.com/ruby/ruby/blob/trunk/parse.y#L1142 $$ = new_if(p, $3, remove_begin($1), 0, &@$); fixpos($$, $3); /*% %*/ - /*% ripper: if_mod($3, $1) %*/ + /*% ripper: if_mod!($3, $1) %*/ } | stmt modifier_unless expr_value { @@ -1150,7 +1150,7 @@ stmt : keyword_alias fitem {SET_LEX_STA https://github.com/ruby/ruby/blob/trunk/parse.y#L1150 $$ = new_unless(p, $3, remove_begin($1), 0, &@$); fixpos($$, $3); /*% %*/ - /*% ripper: unless_mod($3, $1) %*/ + /*% ripper: unless_mod!($3, $1) %*/ } | stmt modifier_while expr_value { @@ -1162,7 +1162,7 @@ stmt : keyword_alias fitem {SET_LEX_STA https://github.com/ruby/ruby/blob/trunk/parse.y#L1162 $$ = NEW_WHILE(cond(p, $3, &@3), $1, 1, &@$); } /*% %*/ - /*% ripper: while_mod($3, $1) %*/ + /*% ripper: while_mod!($3, $1) %*/ } | stmt modifier_until expr_value { @@ -1174,7 +1174,7 @@ stmt : keyword_alias fitem {SET_LEX_STA https://github.com/ruby/ruby/blob/trunk/parse.y#L1174 $$ = NEW_UNTIL(cond(p, $3, &@3), $1, 1, &@$); } /*% %*/ - /*% ripper: until_mod($3, $1) %*/ + /*% ripper: until_mod!($3, $1) %*/ } | stmt modifier_rescue stmt { @@ -1184,7 +1184,7 @@ stmt : keyword_alias fitem {SET_LEX_STA https://github.com/ruby/ruby/blob/trunk/parse.y#L1184 resq = NEW_RESBODY(0, remove_begin($3), 0, &loc); $$ = NEW_RESCUE(remove_begin($1), resq, 0, &@$); /*% %*/ - /*% ripper: rescue_mod($1, $3) %*/ + /*% ripper: rescue_mod!($1, $3) %*/ } | keyword_END '{' compstmt '}' { @@ -1198,7 +1198,7 @@ stmt : keyword_alias fitem {SET_LEX_STA https://github.com/ruby/ruby/blob/trunk/parse.y#L1198 $$ = NEW_POSTEXE(scope, &@$); } /*% %*/ - /*% ripper: send(:END, $3) %*/ + /*% ripper: END!($3) %*/ } | command_asgn | mlhs '=' command_call @@ -1207,7 +1207,7 @@ stmt : keyword_alias fitem {SET_LEX_STA https://github.com/ruby/ruby/blob/trunk/parse.y#L1207 value_expr($3); $$ = node_assign(p, $1, $3, &@$); /*% %*/ - /*% ripper: massign($1, $3) %*/ + /*% ripper: massign!($1, $3) %*/ } | lhs '=' mrhs { @@ -1219,7 +1219,7 @@ stmt : keyword_alias fitem {SET_LEX_STA https://github.com/ruby/ruby/blob/trunk/parse.y#L1219 /*%%%*/ $$ = node_assign(p, $1, $3, &@$); /*% %*/ - /*% ripper: massign($1, $3) %*/ + /*% ripper: massign!($1, $3) %*/ } | expr ; @@ -1281,7 +1281,7 @@ command_rhs : command_call %prec tOP_A https://github.com/ruby/ruby/blob/trunk/parse.y#L1281 value_expr($1); $$ = NEW_RESCUE($1, NEW_RESBODY(0, remove_begin($3), 0, &loc), 0, &@$); /*% %*/ - /*% ripper: rescue_mod($1, $3) %*/ + /*% ripper: rescue_mod!($1, $3) %*/ } | command_asgn ; @@ -1356,7 +1356,7 @@ command : fcall command_args %pre https://github.com/ruby/ruby/blob/trunk/parse.y#L1356 nd_set_last_loc($1, nd_last_loc($2)); $$ = $1; /*% %*/ - /*% ripper: command($1, $2) %*/ + /*% ripper: command!($1, $2) %*/ } | fcall command_args cmd_brace_block { @@ -1367,7 +1367,7 @@ command : fcall command_args %pre https://github.com/ruby/ruby/blob/trunk/parse.y#L1367 fixpos($$, $1); nd_set_last_loc($1, nd_last_loc($2)); /*% %*/ - /*% ripper: method_add_block(command($1, $2), $3) %*/ + /*% ripper: method_add_block!(command!($1, $2), $3) %*/ } | primary_value call_op operation2 command_args %prec tLOWEST { @@ -1391,7 +1391,7 @@ command : fcall command_args %pre https://github.com/ruby/ruby/blob/trunk/parse.y#L1391 $$ = NEW_SUPER($2, &@$); fixpos($$, $2); /*% %*/ - /*% ripper: send(:super, $2) %*/ + /*% ripper: super!($2) %*/ } | keyword_yield command_args { @@ -1399,28 +1399,28 @@ command : fcall command_args %pre https://github.com/ruby/ruby/blob/trunk/parse.y#L1399 $$ = new_yield(p, $2, &@$); fixpos($$, $2); /*% %*/ - /*% ripper: send(:yield, $2) %*/ + /*% ripper: yield!($2) %*/ } | k_return call_args { /*%%%*/ $$ = NEW_RETURN(ret_args(p, $2), &@$); /*% %*/ - /*% ripper: send(:return, $2) %*/ + /*% ripper: return!($2) %*/ } | keyword_break call_args { /*%%%*/ $$ = NEW_BREAK(ret_args(p, $2), &@$); /*% %*/ - /*% ripper: send(:break, $2) %*/ + /*% ripper: break!($2) %*/ } | keyword_next call_args { /*%%%*/ $$ = NEW_NEXT(ret_args(p, $2), &@$); /*% %*/ - /*% ripper: send(:next, $2) %*/ + /*% ripper: next!($2) %*/ } ; @@ -1430,7 +1430,7 @@ mlhs : mlhs_basic https://github.com/ruby/ruby/blob/trunk/parse.y#L1430 /*%%%*/ $$ = $2; /*% %*/ - /*% ripper: mlhs_paren($2) %*/ + /*% ripper: mlhs_paren!($2) %*/ } ; @@ -1440,7 +1440,7 @@ mlhs_inner : mlhs_basic https://github.com/ruby/ruby/blob/trunk/parse.y#L1440 /*%%%*/ $$ = NEW_MASGN(NEW_LIST($2, &@$), 0, &@$); /*% %*/ - /*% ripper: mlhs_paren($2) %*/ + /*% ripper: mlhs_paren!($2) %*/ } ; @@ -1456,63 +1456,63 @@ mlhs_basic : mlhs_head https://github.com/ruby/ruby/blob/trunk/parse.y#L1456 /*%%%*/ $$ = NEW_MASGN(list_append(p, $1,$2), 0, &@$); /*% %*/ - /*% ripper: mlhs_add($1, $2) %*/ + /*% ripper: mlhs_add!($1, $2) %*/ } | mlhs_head tSTAR mlhs_node { /*%%%*/ $$ = NEW_MASGN($1, $3, &@$); /*% %*/ - /*% ripper: mlhs_add_star($1, $3) %*/ + /*% ripper: mlhs_add_star!($1, $3) %*/ } | mlhs_head tSTAR mlhs_node ',' mlhs_post { /*%%%*/ $$ = NEW_MASGN($1, NEW_POSTARG($3,$5,&@$), &@$); /*% %*/ - /*% ripper: mlhs_add_post(mlhs_add_star($1, $3), $5) %*/ + /*% ripper: mlhs_add_post!(mlhs_add_star!($1, $3), $5) %*/ } | mlhs_head tSTAR { /*%%%*/ $$ = NEW_MASGN($1, NODE_SPECIAL_NO_NAME_REST, &@$); /*% %*/ - /*% ripper: mlhs_add_star($1, "Qnil") %*/ + /*% ripper: mlhs_add_star!($1, "Qnil") %*/ } | mlhs_head tSTAR ',' mlhs_post { /*%%%*/ $$ = NEW_MASGN($1, NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, $4, &@$), &@$); /*% %*/ - /*% ripper: mlhs_add_post(mlhs_add_star($1, "Qnil"), $4) %*/ + /*% ripper: mlhs_add_post!(mlhs_add_star!($1, "Qnil"), $4) %*/ } | tSTAR mlhs_node { /*%%%*/ $$ = NEW_MASGN(0, $2, &@$); /*% %*/ - /*% ripper: mlhs_add_star(mlhs_new, $2) %*/ + /*% ripper: mlhs_add_star!(mlhs_new!, $2) %*/ } | tSTAR mlhs_node ',' mlhs_post { /*%%%*/ $$ = NEW_MASGN(0, NEW_POSTARG($2,$4,&@$), &@$); /*% %*/ - /*% ripper: mlhs_add_post(mlhs_add_star(mlhs_new, $2), $4) %*/ + /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, $2), $4) %*/ } | tSTAR { /*%%%*/ $$ = NEW_MASGN(0, NODE_SPECIAL_NO_NAME_REST, &@$); /*% %*/ - /*% ripper: mlhs_add_star(mlhs_new, "Qnil") %*/ + /*% ripper: mlhs_add_star!(mlhs_new!, "Qnil") %*/ } | tSTAR ',' mlhs_post { /*%%%*/ $$ = NEW_MASGN(0, NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, $3, &@$), &@$); /*% %*/ - /*% ripper: mlhs_add_post(mlhs_add_star(mlhs_new, "Qnil"), $3) %*/ + /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, "Qnil"), $3) %*/ } ; @@ -1522,7 +1522,7 @@ mlhs_item : mlhs_node https://github.com/ruby/ruby/blob/trunk/parse.y#L1522 /*%%%*/ $$ = $2; /*% %*/ - /*% ripper: mlhs_paren($2) %*/ + /*% ripper: mlhs_paren!($2) %*/ } ; @@ -1531,14 +1531,14 @@ mlhs_head : mlhs_item ',' https://github.com/ruby/ruby/blob/trunk/parse.y#L1531 /*%%%*/ $$ = NEW_LIST($1, &@1); /*% %*/ - /*% ripper: mlhs_add(mlhs_new, $1) %*/ + /*% ripper: mlhs_add!(mlhs_new!, $1) %*/ } | mlhs_head mlhs_item ',' { /*%%%*/ $$ = list_append(p, $1, $2); /*% %*/ - /*% ripper: mlhs_add($1, $2) %*/ + /*% ripper: mlhs_add!($1, $2) %*/ } ; @@ -1547,14 +1547,14 @@ mlhs_post : mlhs_item https://github.com/ruby/ruby/blob/trunk/parse.y#L1547 /*%%%*/ $$ = NEW_LIST($1, &@$); /*% %*/ - /*% ripper: mlhs_add(mlhs_new, $1) %*/ + /*% ripper: mlhs_add!(mlhs_new!, $1) %*/ } | mlhs_post ',' mlhs_item { /*%%%*/ $$ = list_append(p, $1, $3); /*% %*/ - /*% ripper: mlhs_add($1, $3) %*/ + /*% ripper: mlhs_add!($1, $3) %*/ } ; @@ -1571,28 +1571,28 @@ mlhs_node : user_variable https://github.com/ruby/ruby/blob/trunk/parse.y#L1571 /*%%%*/ $$ = aryset(p, $1, $3, &@$); /*% %*/ - /*% ripper: aref_field($1, escape_Qundef!($3)) %*/ + /*% ripper: aref_field!($1, escape_Qundef($3)) %*/ } | primary_value call_op tIDENTIFIER { /*%%%*/ $$ = attrset(p, $1, $2, $3, &@$); /*% %*/ - /*% ripper: field($1, $2, $3) %*/ + /*% ripper: field!($1, $2, $3) %*/ } | primary_value tCOLON2 tIDENTIFIER { /*%%%*/ $$ = attrset(p, $1, idCOLON2, $3, &@$); /*% %*/ - /*% ripper: const_path_field($1, $3) %*/ + /*% ripper: const_path_field!($1, $3) %*/ } | primary_value call_op tCONSTANT { /*%%%*/ $$ = attrset(p, $1, $2, $3, &@$); /*% %*/ - /*% ripper: field($1, $2, $3) %*/ + /*% ripper: field!($1, $2, $3) %*/ } | primary_value tCOLON2 tCONSTANT { @@ -1622,28 +1622,28 @@ lhs : user_variable https://github.com/ruby/ruby/blob/trunk/parse.y#L1622 /*%%%*/ $$ = aryset(p, $1, $3, &@$); /*% %*/ - /*% ripper: aref_field($1, escape_Qundef!($3)) %*/ + /*% ripper: aref_field!($1, escape_Qundef($3)) %*/ } | primary_value call_op tIDENTIFIER { /*%%%*/ $$ = attrset(p, $1, $2, $3, &@$); /*% %*/ - /*% ripper: field($1, $2, $3) %*/ + /*% ripper: field!($1, $2, $3) %*/ } | primary_value tCOLON2 tIDENTIFIER { /*%%%*/ $$ = attrset(p, $1, idCOLON2, $3, &@$); /*% %*/ - /*% ripper: field($1, "ID2VAL(idCOLON2)", $3) %*/ + /*% ripper: field!($1, "ID2VAL(idCOLON2)", $3) %*/ } | primary_value call_op tCONSTANT { /*%%%*/ $$ = attrset(p, $1, $2, $3, &@$); /*% %*/ - /*% ripper: field($1, $2, $3) %*/ + /*% ripper: field!($1, $2, $3) %*/ } | primary_value tCOLON2 tCONSTANT { @@ -1665,7 +1665,7 @@ cname : tIDENTIFIER https://github.com/ruby/ruby/blob/trunk/parse.y#L1665 /*%%%*/ yyerror1(&@1, "class/module name must be CONSTANT"); /*% %*/ - /*% ripper[error]: class_name_error($1) %*/ + /*% ripper[error]: class_name_error!($1) %*/ } | tCONSTANT ; @@ -1675,21 +1675,21 @@ cpath : tCOLON3 cname https://github.com/ruby/ruby/blob/trunk/parse.y#L1675 /*%%%*/ $$ = NEW_COLON3($2, &@$); /*% %*/ - /*% ripper: top_const_ref($2) %*/ + /*% ripper: top_const_ref!($2) %*/ } | cname { /*%%%*/ $$ = NEW_COLON2(0, $$, &@$); /*% %*/ - /*% ripper: const_ref($1) %*/ + /*% ripper: const_ref!($1) %*/ } | primary_value tCOLON2 cname { /*%%%*/ $$ = NEW_COLON2($1, $3, &@$); /*% %*/ - /*% ripper: const_path_ref($1, $3) %*/ + /*% ripper: const_path_ref!($1, $3) %*/ } ; @@ -1717,7 +1717,7 @@ fitem : fsym https://github.com/ruby/ruby/blob/trunk/parse.y#L1717 /*%%%*/ $$ = NEW_LIT(ID2SYM($1), &@$); /*% %*/ - /*% ripper: symbol_literal($1) %*/ + /*% ripper: symbol_literal!($1) %*/ } | dsym ; @@ -1727,7 +1727,7 @@ undef_list : fitem https://github.com/ruby/ruby/blob/trunk/parse.y#L1727 /*%%%*/ $$ = NEW_UNDEF($1, &@$); /*% %*/ - /*% ripper: rb_ary_new3!(1, get_value!($1)) %*/ + /*% ripper: rb_ary_new3(1, get_value($1)) %*/ } | undef_list ',' {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);} fitem { @@ -1735,7 +1735,7 @@ undef_list : fitem https://github.com/ruby/ruby/blob/trunk/parse.y#L1735 NODE *undef = NEW_UNDEF($4, &@$); $$ = block_append(p, $1, undef); /*% %*/ - /*% ripper: rb_ary_push!($1, get_value!($4)) %*/ + /*% ripper: rb_ary_push($1, get_value($4)) %*/ } ; @@ -1838,7 +1838,7 @@ arg : lhs '=' arg_rhs https://github.com/ruby/ruby/blob/trunk/parse.y#L1838 value_expr($3); $$ = NEW_DOT2($1, $3, &@$); /*% %*/ - /*% ripper: dot2($1, $3) %*/ + /*% ripper: dot2!($1, $3) %*/ } | arg tDOT3 arg { @@ -1847,7 +1847,7 @@ arg : lhs '=' arg_rhs https://github.com/ruby/ruby/blob/trunk/parse.y#L1847 value_expr($3); $$ = NEW_DOT3($1, $3, &@$); /*% %*/ - /*% ripper: dot3($1, $3) %*/ + /*% ripper: dot3!($1, $3) %*/ } | arg '+' arg { @@ -1958,7 +1958,7 @@ arg : lhs '=' arg_rhs https://github.com/ruby/ruby/blob/trunk/parse.y#L1958 $$ = new_if(p, $1, $3, $6, &@$); fixpos($$, $1); /*% %*/ - /*% ripper: ifop($1, $3, $6) %*/ + /*% ripper: ifop!($1, $3, $6) %*/ } | primary { @@ -2000,14 +2000,14 @@ aref_args : none https://github.com/ruby/ruby/blob/trunk/parse.y#L2000 /*%%%*/ $$ = $3 ? arg_append(p, $1, new_hash(p, $3, &@3), &@$) : $1; /*% %*/ - /*% ripper: args_add($1, bare_assoc_hash($3)) %*/ + /*% ripper: args_add!($1, bare_assoc_hash!($3)) %*/ } | assocs trailer { /*%%%*/ $$ = $1 ? NEW_LIST(new_hash(p, $1, &@1), &@$) : 0; /*% %*/ - /*% ripper: args_add(args_new, bare_assoc_hash($1)) %*/ + /*% ripper: args_add!(args_new!, bare_assoc_hash!($1)) %*/ } ; @@ -2023,7 +2023,7 @@ arg_rhs : arg %prec tOP_ASGN https://github.com/ruby/ruby/blob/trunk/parse.y#L2023 value_expr($1); $$ = NEW_RESCUE($1, NEW_RESBODY(0, remove_begin($3), 0, &loc), 0, &@$); /*% %*/ - /*% ripper: rescue_mod($1, $3) %*/ + /*% ripper: rescue_mod!($1, $3) %*/ } ; @@ -2032,7 +2032,7 @@ paren_args : '(' opt_call_args rparen https://github.com/ruby/ruby/blob/trunk/parse.y#L2032 /*%%%*/ $$ = $2; /*% %*/ - /*% ripper: arg_paren(escape_Qundef!($2)) %*/ + /*% ripper: arg_paren!(escape_Qundef($2)) %*/ } ; @@ -2051,14 +2051,14 @@ opt_call_args : none https://github.com/ruby/ruby/blob/trunk/parse.y#L2051 /*%%%*/ $$ = $3 ? arg_append(p, $1, new_hash(p, $3, &@3), &@$) : $1; /*% %*/ - /*% ripper: args_add($1, bare_assoc_hash($3)) %*/ + /*% ripper: args_add!($1, bare_assoc_hash!($3)) %*/ } | assocs ',' { /*%%%*/ $$ = $1 ? NEW_LIST(new_hash(p, $1, &@1), &@1) : 0; /*% %*/ - /*% ripper: args_add(args_new, bare_assoc_hash($1)) %*/ + /*% ripper: args_add!(args_new!, bare_assoc_hash!($1)) %*/ } ; @@ -2068,14 +2068,14 @@ call_args : command https://github.com/ruby/ruby/blob/trunk/parse.y#L2068 value_expr($1); $$ (... truncated) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/