Sha256: 93d1ab3e4d7a91c22f6dcf42296413998da767cb6be1bd78e4bd7ec116a6ecce

Contents?: true

Size: 278 Bytes

Versions: 47

Compression:

Stored size: 278 Bytes

Contents

module Ruby2JS
  class Converter

    # (const nil :C)

    handle :const do |receiver, name|
      # resolve anonymous receivers against rbstack
      receiver ||= @rbstack.map {|rb| rb[name]}.compact.last

      parse receiver; put '.' if receiver; put name
    end
  end
end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
ruby2js-2.0.6 lib/ruby2js/converter/const.rb
ruby2js-2.0.5 lib/ruby2js/converter/const.rb
ruby2js-2.0.4 lib/ruby2js/converter/const.rb
ruby2js-2.0.3 lib/ruby2js/converter/const.rb
ruby2js-2.0.2 lib/ruby2js/converter/const.rb
ruby2js-2.0.1 lib/ruby2js/converter/const.rb
ruby2js-2.0.0 lib/ruby2js/converter/const.rb