Method: Parser::Ruby34#_reduce_503

Defined in:
lib/parser/ruby34.rb

#_reduce_503(val, _values, result) ⇒ Object


11265
11266
11267
11268
11269
11270
11271
11272
11273
# File 'lib/parser/ruby34.rb', line 11265

def _reduce_503(val, _values, result)
                      # array patterns that end with comma
                      # like [1, 2,]
                      # must be emitted as `array_pattern_with_tail`
                      last_item = @builder.match_with_trailing_comma(val[1], val[2])
                      result = [ *val[0], last_item ]

    result
end