Sha256: cf4076d7db4180c4252046e6454c2a48ff9f679d35cabd40f638564140179771

Contents?: true

Size: 331 Bytes

Versions: 6

Compression:

Stored size: 331 Bytes

Contents

module Ruby2JS
  class Converter

    # (xstr
    #   (str 'a'))
    # (for
    #   (lvasgn :i)
    #   (array
    #     (int 1))
    #   (...)

    handle :for do |var, expression, block|
      parse s(:block,
        s(:send, expression, :forEach),
        s(:args, s(:arg, var.children.last)),
        block);
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ruby2js-1.1.5 lib/ruby2js/converter/for.rb
ruby2js-1.1.4 lib/ruby2js/converter/for.rb
ruby2js-1.1.3 lib/ruby2js/converter/for.rb
ruby2js-1.1.2 lib/ruby2js/converter/for.rb
ruby2js-1.1.1 lib/ruby2js/converter/for.rb
ruby2js-1.1.0 lib/ruby2js/converter/for.rb