Skip to content

Commit b68172c

Browse files
committed
Rename f_optarg to f_opt_arg for consistency in parser rules
1 parent 1c8154e commit b68172c

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

parse.y

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2984,15 +2984,15 @@ rb_parser_ary_free(rb_parser_t *p, rb_parser_ary_t *ary)
29842984
}
29852985
;
29862986

2987-
%rule f_optarg(value) <node_opt_arg>
2987+
%rule f_opt_arg(value) <node_opt_arg>
29882988
: f_opt(value)
29892989
{
29902990
$$ = $f_opt;
29912991
/*% ripper: rb_ary_new3(1, $:1) %*/
29922992
}
2993-
| f_optarg(value) ',' f_opt(value)
2993+
| f_opt_arg(value) ',' f_opt(value)
29942994
{
2995-
$$ = opt_arg_append($f_optarg, $f_opt);
2995+
$$ = opt_arg_append($f_opt_arg, $f_opt);
29962996
/*% ripper: rb_ary_push($:1, $:3) %*/
29972997
}
29982998
;
@@ -4968,22 +4968,22 @@ excessed_comma : ','
49684968
}
49694969
;
49704970

4971-
block_param : f_arg ',' f_optarg(primary_value) ',' f_rest_arg opt_args_tail(block_args_tail)
4971+
block_param : f_arg ',' f_opt_arg(primary_value) ',' f_rest_arg opt_args_tail(block_args_tail)
49724972
{
49734973
$$ = new_args(p, $1, $3, $5, 0, $6, &@$);
49744974
/*% ripper: params!($:1, $:3, $:5, Qnil, *$:6[0..2]) %*/
49754975
}
4976-
| f_arg ',' f_optarg(primary_value) ',' f_rest_arg ',' f_arg opt_args_tail(block_args_tail)
4976+
| f_arg ',' f_opt_arg(primary_value) ',' f_rest_arg ',' f_arg opt_args_tail(block_args_tail)
49774977
{
49784978
$$ = new_args(p, $1, $3, $5, $7, $8, &@$);
49794979
/*% ripper: params!($:1, $:3, $:5, $:7, *$:8[0..2]) %*/
49804980
}
4981-
| f_arg ',' f_optarg(primary_value) opt_args_tail(block_args_tail)
4981+
| f_arg ',' f_opt_arg(primary_value) opt_args_tail(block_args_tail)
49824982
{
49834983
$$ = new_args(p, $1, $3, 0, 0, $4, &@$);
49844984
/*% ripper: params!($:1, $:3, Qnil, Qnil, *$:4[0..2]) %*/
49854985
}
4986-
| f_arg ',' f_optarg(primary_value) ',' f_arg opt_args_tail(block_args_tail)
4986+
| f_arg ',' f_opt_arg(primary_value) ',' f_arg opt_args_tail(block_args_tail)
49874987
{
49884988
$$ = new_args(p, $1, $3, 0, $5, $6, &@$);
49894989
/*% ripper: params!($:1, $:3, Qnil, $:5, *$:6[0..2]) %*/
@@ -5009,22 +5009,22 @@ block_param : f_arg ',' f_optarg(primary_value) ',' f_rest_arg opt_args_tail(blo
50095009
$$ = new_args(p, $1, 0, 0, 0, $2, &@$);
50105010
/*% ripper: params!($:1, Qnil, Qnil, Qnil, *$:2[0..2]) %*/
50115011
}
5012-
| f_optarg(primary_value) ',' f_rest_arg opt_args_tail(block_args_tail)
5012+
| f_opt_arg(primary_value) ',' f_rest_arg opt_args_tail(block_args_tail)
50135013
{
50145014
$$ = new_args(p, 0, $1, $3, 0, $4, &@$);
50155015
/*% ripper: params!(Qnil, $:1, $:3, Qnil, *$:4[0..2]) %*/
50165016
}
5017-
| f_optarg(primary_value) ',' f_rest_arg ',' f_arg opt_args_tail(block_args_tail)
5017+
| f_opt_arg(primary_value) ',' f_rest_arg ',' f_arg opt_args_tail(block_args_tail)
50185018
{
50195019
$$ = new_args(p, 0, $1, $3, $5, $6, &@$);
50205020
/*% ripper: params!(Qnil, $:1, $:3, $:5, *$:6[0..2]) %*/
50215021
}
5022-
| f_optarg(primary_value) opt_args_tail(block_args_tail)
5022+
| f_opt_arg(primary_value) opt_args_tail(block_args_tail)
50235023
{
50245024
$$ = new_args(p, 0, $1, 0, 0, $2, &@$);
50255025
/*% ripper: params!(Qnil, $:1, Qnil, Qnil, *$:2[0..2]) %*/
50265026
}
5027-
| f_optarg(primary_value) ',' f_arg opt_args_tail(block_args_tail)
5027+
| f_opt_arg(primary_value) ',' f_arg opt_args_tail(block_args_tail)
50285028
{
50295029
$$ = new_args(p, 0, $1, 0, $3, $4, &@$);
50305030
/*% ripper: params!(Qnil, $:1, Qnil, $:3, *$:4[0..2]) %*/
@@ -6281,22 +6281,22 @@ args_tail : args_tail_basic(arg_value)
62816281
}
62826282
;
62836283

6284-
f_args : f_arg ',' f_optarg(arg_value) ',' f_rest_arg opt_args_tail(args_tail)
6284+
f_args : f_arg ',' f_opt_arg(arg_value) ',' f_rest_arg opt_args_tail(args_tail)
62856285
{
62866286
$$ = new_args(p, $1, $3, $5, 0, $6, &@$);
62876287
/*% ripper: params!($:1, $:3, $:5, Qnil, *$:6[0..2]) %*/
62886288
}
6289-
| f_arg ',' f_optarg(arg_value) ',' f_rest_arg ',' f_arg opt_args_tail(args_tail)
6289+
| f_arg ',' f_opt_arg(arg_value) ',' f_rest_arg ',' f_arg opt_args_tail(args_tail)
62906290
{
62916291
$$ = new_args(p, $1, $3, $5, $7, $8, &@$);
62926292
/*% ripper: params!($:1, $:3, $:5, $:7, *$:8[0..2]) %*/
62936293
}
6294-
| f_arg ',' f_optarg(arg_value) opt_args_tail(args_tail)
6294+
| f_arg ',' f_opt_arg(arg_value) opt_args_tail(args_tail)
62956295
{
62966296
$$ = new_args(p, $1, $3, 0, 0, $4, &@$);
62976297
/*% ripper: params!($:1, $:3, Qnil, Qnil, *$:4[0..2]) %*/
62986298
}
6299-
| f_arg ',' f_optarg(arg_value) ',' f_arg opt_args_tail(args_tail)
6299+
| f_arg ',' f_opt_arg(arg_value) ',' f_arg opt_args_tail(args_tail)
63006300
{
63016301
$$ = new_args(p, $1, $3, 0, $5, $6, &@$);
63026302
/*% ripper: params!($:1, $:3, Qnil, $:5, *$:6[0..2]) %*/
@@ -6316,22 +6316,22 @@ f_args : f_arg ',' f_optarg(arg_value) ',' f_rest_arg opt_args_tail(args_tail)
63166316
$$ = new_args(p, $1, 0, 0, 0, $2, &@$);
63176317
/*% ripper: params!($:1, Qnil, Qnil, Qnil, *$:2[0..2]) %*/
63186318
}
6319-
| f_optarg(arg_value) ',' f_rest_arg opt_args_tail(args_tail)
6319+
| f_opt_arg(arg_value) ',' f_rest_arg opt_args_tail(args_tail)
63206320
{
63216321
$$ = new_args(p, 0, $1, $3, 0, $4, &@$);
63226322
/*% ripper: params!(Qnil, $:1, $:3, Qnil, *$:4[0..2]) %*/
63236323
}
6324-
| f_optarg(arg_value) ',' f_rest_arg ',' f_arg opt_args_tail(args_tail)
6324+
| f_opt_arg(arg_value) ',' f_rest_arg ',' f_arg opt_args_tail(args_tail)
63256325
{
63266326
$$ = new_args(p, 0, $1, $3, $5, $6, &@$);
63276327
/*% ripper: params!(Qnil, $:1, $:3, $:5, *$:6[0..2]) %*/
63286328
}
6329-
| f_optarg(arg_value) opt_args_tail(args_tail)
6329+
| f_opt_arg(arg_value) opt_args_tail(args_tail)
63306330
{
63316331
$$ = new_args(p, 0, $1, 0, 0, $2, &@$);
63326332
/*% ripper: params!(Qnil, $:1, Qnil, Qnil, *$:2[0..2]) %*/
63336333
}
6334-
| f_optarg(arg_value) ',' f_arg opt_args_tail(args_tail)
6334+
| f_opt_arg(arg_value) ',' f_arg opt_args_tail(args_tail)
63356335
{
63366336
$$ = new_args(p, 0, $1, 0, $3, $4, &@$);
63376337
/*% ripper: params!(Qnil, $:1, Qnil, $:3, *$:4[0..2]) %*/

0 commit comments

Comments
 (0)