Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

* ruby33.y: extract words_sep #967

Merged
merged 1 commit into from
Dec 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions lib/parser/ruby33.y
Original file line number Diff line number Diff line change
Expand Up @@ -2401,6 +2401,9 @@ opt_block_args_tail:
opts = @builder.regexp_options(val[3])
result = @builder.regexp_compose(val[0], val[1], val[2], opts)
}

words_sep: tSPACE
| words_sep tSPACE

words: tWORDS_BEG word_list tSTRING_END
{
Expand All @@ -2411,7 +2414,7 @@ opt_block_args_tail:
{
result = []
}
| word_list word tSPACE
| word_list word words_sep
{
result = val[0] << @builder.word(val[1])
}
Expand All @@ -2434,7 +2437,7 @@ opt_block_args_tail:
{
result = []
}
| symbol_list word tSPACE
| symbol_list word words_sep
{
result = val[0] << @builder.word(val[1])
}
Expand All @@ -2453,7 +2456,7 @@ opt_block_args_tail:
{
result = []
}
| qword_list tSTRING_CONTENT tSPACE
| qword_list tSTRING_CONTENT words_sep
{
result = val[0] << @builder.string_internal(val[1])
}
Expand All @@ -2462,7 +2465,7 @@ opt_block_args_tail:
{
result = []
}
| qsym_list tSTRING_CONTENT tSPACE
| qsym_list tSTRING_CONTENT words_sep
{
result = val[0] << @builder.symbol_internal(val[1])
}
Expand Down