Sha256: 86464e0495a6c3ad1d506daaa2c572a513f09526a66c8022997bb4858daadbf4

Contents?: true

Size: 437 Bytes

Versions: 4

Compression:

Stored size: 437 Bytes

Contents

module RipperRubyParser
  module SexpHandlers
    module Arrays
      def process_array exp
        _, elems = exp.shift 2
        s(:array, *handle_array_elements(elems))
      end

      def process_aref exp
        _, coll, idx = exp.shift 3

        coll = process(coll)
        coll = nil if coll == s(:self)

        idx = process(idx) || s(:arglist)
        idx.shift
        s(:call, coll, :[], *idx)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ripper_ruby_parser-1.1.2 lib/ripper_ruby_parser/sexp_handlers/arrays.rb
ripper_ruby_parser-1.1.1 lib/ripper_ruby_parser/sexp_handlers/arrays.rb
ripper_ruby_parser-1.1.0 lib/ripper_ruby_parser/sexp_handlers/arrays.rb
ripper_ruby_parser-1.0.0 lib/ripper_ruby_parser/sexp_handlers/arrays.rb