Project

General

Profile

Feature #8956 » fix-hash-delims.patch

adamdunson (Addie Drake), 09/26/2013 11:54 PM

View differences:

parse.y
%type <node> command_asgn mrhs mrhs_arg superclass block_call block_command
%type <node> f_block_optarg f_block_opt
%type <node> f_arglist f_args f_arg f_arg_item f_optarg f_marg f_marg_list f_margs
%type <node> assoc_list assocs assoc undef_list backref string_dvar for_var
%type <node> assoc_list assocs assocs_no_comma assoc undef_list backref string_dvar for_var
%type <node> block_param opt_block_param block_param_def f_opt
%type <node> f_kwarg f_kw f_block_kwarg f_block_kw
%type <node> bv_decls opt_bv_decl bvar
......
;
assoc_list : none
| assocs trailer
| assocs_no_comma trailer
{
/*%%%*/
$$ = $1;
......
}
;
assocs_no_comma : assoc
/*%c%*/
/*%c
{
$$ = rb_ary_new3(1, $1);
}
%*/
| assocs_no_comma assoc_seperator assoc
{
/*%%%*/
$$ = list_concat($1, $3);
/*%
$$ = rb_ary_push($1, $3);
%*/
}
;
assoc : arg_value tASSOC arg_value
{
/*%%%*/
......
;
trailer : /* none */
| '\n'
| assoc_seperator
;
assoc_seperator : '\n'
| ','
;
(1-1/7)