summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-compiler/core/parse.y
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2021-11-19 16:21:22 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2021-11-20 08:50:51 +0900
commit9e064f23534db63a07154f23a3f458546dff0568 (patch)
tree7fe7a0b51eeac706fe17dfcf7230204a0b223bd0 /mrbgems/mruby-compiler/core/parse.y
parent4c28356b71667fbec1877afefd4820b6fc7c4d3f (diff)
downloadmruby-9e064f23534db63a07154f23a3f458546dff0568.tar.gz
mruby-9e064f23534db63a07154f23a3f458546dff0568.zip
parse.y: skip unnecessary `local_add_f(p, 0)`.
Diffstat (limited to 'mrbgems/mruby-compiler/core/parse.y')
-rw-r--r--mrbgems/mruby-compiler/core/parse.y11
1 files changed, 2 insertions, 9 deletions
diff --git a/mrbgems/mruby-compiler/core/parse.y b/mrbgems/mruby-compiler/core/parse.y
index e70621723..00d1c2e9c 100644
--- a/mrbgems/mruby-compiler/core/parse.y
+++ b/mrbgems/mruby-compiler/core/parse.y
@@ -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);
}
;