Skip to content

Commit

Permalink
* ruby33.y: extract words_sep (#967)
Browse files Browse the repository at this point in the history
  • Loading branch information
iliabylich authored Dec 28, 2023
1 parent e368bb9 commit 41dc835
Showing 1 changed file with 7 additions and 4 deletions.
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

0 comments on commit 41dc835

Please sign in to comment.