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

This commit is contained in:
Yukihiro "Matz" Matsumoto
2021-11-19 16:21:22 +09:00
parent 4c28356b71
commit 9e064f2353
2 changed files with 1572 additions and 1590 deletions
+2 -9
View File
@@ -2954,7 +2954,6 @@ f_margs : f_arg
}
| f_arg ',' tSTAR
{
local_add_f(p, 0);
$$ = list3($1, nint(-1), 0);
}
| f_arg ',' tSTAR ',' f_arg
@@ -2971,16 +2970,11 @@ f_margs : f_arg
}
| tSTAR
{
local_add_f(p, 0);
$$ = list3(0, nint(-1), 0);
}
| tSTAR ','
| tSTAR ',' f_arg
{
local_add_f(p, 0);
}
f_arg
{
$$ = list3(0, nint(-1), $4);
$$ = list3(0, nint(-1), $3);
}
;
@@ -3861,7 +3855,6 @@ f_arg_item : f_norm_arg
{
$$ = new_masgn_param(p, $3, p->locals->car);
local_resume(p, $<nd>2);
local_add_f(p, 0);
}
;
File diff suppressed because it is too large Load Diff