parse.y: skip unnecessary `local_add_f(p, 0)`.

parent 4c28356b
...@@ -2954,7 +2954,6 @@ f_margs : f_arg ...@@ -2954,7 +2954,6 @@ f_margs : f_arg
} }
| f_arg ',' tSTAR | f_arg ',' tSTAR
{ {
local_add_f(p, 0);
$$ = list3($1, nint(-1), 0); $$ = list3($1, nint(-1), 0);
} }
| f_arg ',' tSTAR ',' f_arg | f_arg ',' tSTAR ',' f_arg
...@@ -2971,16 +2970,11 @@ f_margs : f_arg ...@@ -2971,16 +2970,11 @@ f_margs : f_arg
} }
| tSTAR | tSTAR
{ {
local_add_f(p, 0);
$$ = list3(0, nint(-1), 0); $$ = list3(0, nint(-1), 0);
} }
| tSTAR ',' | tSTAR ',' f_arg
{ {
local_add_f(p, 0); $$ = list3(0, nint(-1), $3);
}
f_arg
{
$$ = list3(0, nint(-1), $4);
} }
; ;
...@@ -3861,7 +3855,6 @@ f_arg_item : f_norm_arg ...@@ -3861,7 +3855,6 @@ f_arg_item : f_norm_arg
{ {
$$ = new_masgn_param(p, $3, p->locals->car); $$ = new_masgn_param(p, $3, p->locals->car);
local_resume(p, $<nd>2); local_resume(p, $<nd>2);
local_add_f(p, 0);
} }
; ;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment