Sha256: 17c910cf0f4da688af691125109e85fbda464a49b7e322d7d6e14fa74568bfd7

Contents?: true

Size: 335 Bytes

Versions: 22

Compression:

Stored size: 335 Bytes

Contents

# frozen_string_literal: true

require 'opal/nodes/def'

module Opal
  module Nodes
    class DefsNode < DefNode
      handle :defs
      children :recvr, :mid, :inline_args, :stmts

      def wrap_with_definition
        helper :defs
        unshift '$defs(', expr(recvr), ", '$#{mid}', "
        push ')'
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
opal-1.8.3.rc1 lib/opal/nodes/defs.rb
opal-1.8.2 lib/opal/nodes/defs.rb
opal-1.8.1 lib/opal/nodes/defs.rb
opal-1.8.0 lib/opal/nodes/defs.rb
opal-1.8.0.beta1 lib/opal/nodes/defs.rb
opal-1.7.4 lib/opal/nodes/defs.rb
opal-1.8.0.alpha1 lib/opal/nodes/defs.rb
opal-1.7.3 lib/opal/nodes/defs.rb
opal-1.7.2 lib/opal/nodes/defs.rb
opal-1.7.1 lib/opal/nodes/defs.rb
opal-1.7.0 lib/opal/nodes/defs.rb
opal-1.7.0.rc1 lib/opal/nodes/defs.rb
opal-1.6.1 lib/opal/nodes/defs.rb
opal-1.6.0 lib/opal/nodes/defs.rb
opal-1.6.0.rc1 lib/opal/nodes/defs.rb
opal-1.6.0.alpha1 lib/opal/nodes/defs.rb
opal-1.5.1 lib/opal/nodes/defs.rb
opal-1.5.0 lib/opal/nodes/defs.rb
opal-1.5.0.rc1 lib/opal/nodes/defs.rb
opal-1.4.1 lib/opal/nodes/defs.rb