parse.y: allow trailing comma in method definition parameters

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Yukihiro "Matz" Matsumoto
2026-01-27 15:20:22 +09:00
parent 32a27216bb
commit f78334b3bf
2 changed files with 1008 additions and 981 deletions
+8
View File
@@ -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;
File diff suppressed because it is too large Load Diff