Sha256: a16e7ef10f9775363256df3ded4aa21c507e80df2ad22e5ba58afee327fa4af3

Contents?: true

Size: 455 Bytes

Versions: 24

Compression:

Stored size: 455 Bytes

Contents

# frozen_string_literal: true

require 'opal/nodes/base'

module Opal
  module Nodes
    module Args
      # This node is responsible for initializing a shadow arg
      #
      # proc { |;a| }
      #
      class InitializeShadowarg < Base
        handle :initialize_shadowarg
        children :name

        def compile
          scope.locals << name
          scope.add_arg(name)
          line "#{name} = nil;"
        end
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
opal-1.5.1 lib/opal/nodes/args/initialize_shadowarg.rb
opal-1.5.0 lib/opal/nodes/args/initialize_shadowarg.rb
opal-1.5.0.rc1 lib/opal/nodes/args/initialize_shadowarg.rb
opal-1.4.1 lib/opal/nodes/args/initialize_shadowarg.rb
opal-1.4.0 lib/opal/nodes/args/initialize_shadowarg.rb
opal-1.4.0.alpha1 lib/opal/nodes/args/initialize_shadowarg.rb
opal-1.3.2 lib/opal/nodes/args/initialize_shadowarg.rb
opal-1.3.1 lib/opal/nodes/args/initialize_shadowarg.rb
opal-1.3.0 lib/opal/nodes/args/initialize_shadowarg.rb
opal-1.3.0.rc1 lib/opal/nodes/args/initialize_shadowarg.rb
opal-1.3.0.alpha1 lib/opal/nodes/args/initialize_shadowarg.rb
opal-1.2.0 lib/opal/nodes/args/initialize_shadowarg.rb
opal-1.2.0.beta1 lib/opal/nodes/args/initialize_shadowarg.rb
opal-1.1.1 lib/opal/nodes/args/initialize_shadowarg.rb
opal-1.1.1.rc1 lib/opal/nodes/args/initialize_shadowarg.rb
opal-1.1.0 lib/opal/nodes/args/initialize_shadowarg.rb
opal-1.1.0.rc1 lib/opal/nodes/args/initialize_shadowarg.rb
opal-1.0.5 lib/opal/nodes/args/initialize_shadowarg.rb
opal-1.0.4 lib/opal/nodes/args/initialize_shadowarg.rb
opal-1.0.3 lib/opal/nodes/args/initialize_shadowarg.rb