Skip to content

Fix nested parameterized rule calls in subsequent args position#779

Merged
ydah merged 1 commit intoruby:masterfrom
ydah:fix-nested-parameterized_rule
Mar 1, 2026
Merged

Fix nested parameterized rule calls in subsequent args position#779
ydah merged 1 commit intoruby:masterfrom
ydah:fix-nested-parameterized_rule

Conversation

@ydah
Copy link
Member

@ydah ydah commented Mar 1, 2026

parameterized_args only supported nested rule calls (e.g. f_opt(number)) as the first argument. Subsequent arguments after a comma could only be bare symbols, causing a parse error when using args_list(f_opt(number), opt_tail(string), number).

Add the missing production to handle IDENTIFIER "(" parameterized_args ")" after a comma, mirroring the existing first-arg production.

@ydah ydah marked this pull request as ready for review March 1, 2026 09:12
`parameterized_args` only supported nested rule calls (e.g.
`f_opt(number)`) as the **first** argument. Subsequent arguments after
a comma could only be bare symbols, causing a parse error when using
`args_list(f_opt(number), opt_tail(string), number)`.

Add the missing production to handle `IDENTIFIER "(" parameterized_args ")"` after a comma, mirroring the existing first-arg production.
@ydah ydah force-pushed the fix-nested-parameterized_rule branch from 998eace to cabceee Compare March 1, 2026 09:50
@ydah ydah merged commit ef25b58 into ruby:master Mar 1, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants