mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
mruby-compiler/parse.y: allow multiple anonymous splat in args rule
For example, this should be allowed: ```ruby def f(*) p(*,*) end ```
This commit is contained in:
@@ -2651,6 +2651,10 @@ args : arg
|
||||
void_expr_error(p, $3);
|
||||
$$ = push($1, $3);
|
||||
}
|
||||
| args comma tSTAR
|
||||
{
|
||||
$$ = push($1, new_splat(p, new_lvar(p, intern_op(mul))));
|
||||
}
|
||||
| args comma tSTAR arg
|
||||
{
|
||||
$$ = push($1, new_splat(p, $4));
|
||||
|
||||
+1150
-1142
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user