mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
parse.y: allow trailing comma in method definition parameters
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -4656,6 +4656,10 @@ opt_args_tail : ',' args_tail
|
||||
{
|
||||
$$ = $2;
|
||||
}
|
||||
| ','
|
||||
{
|
||||
$$ = new_args_tail(p, 0, 0, 0);
|
||||
}
|
||||
| /* none */
|
||||
{
|
||||
$$ = new_args_tail(p, 0, 0, 0);
|
||||
@@ -4867,6 +4871,10 @@ opt_f_block_arg : ',' f_block_arg
|
||||
{
|
||||
$$ = $2;
|
||||
}
|
||||
| ','
|
||||
{
|
||||
$$ = 0;
|
||||
}
|
||||
| none
|
||||
{
|
||||
$$ = 0;
|
||||
|
||||
+1000
-981
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user