Sha256: 77d5254a0bfe4befefb167c5bc2147f92786c78aef8b63046832004f8f324a73
Contents?: true
Size: 848 Bytes
Versions: 44
Compression:
Stored size: 848 Bytes
Contents
module Ruby2JS class Converter # (zsuper) # # (super ...) handle :super, :zsuper do |*args| unless @class_parent and @instance_method raise NotImplementedError, "super outside of a method" end # what to pass if @ast.type == :zsuper if @instance_method.type == :method args = @instance_method.children[2].children[1].children elsif @instance_method.type == :prop args = nil else args = @instance_method.children[1].children end end parse @class_parent # what to call if @instance_method.type != :constructor puts ".prototype.#{ @instance_method.children[1].to_s.chomp('=') }" end if args put '.call('; parse_all s(:self), *args, join: ', '; put ')' end end end end
Version data entries
44 entries across 44 versions & 1 rubygems