Sha256: 78e3611fbb9cbb43667c06fc9717237af031994b3517507375bd7945a02bd138

Contents?: true

Size: 307 Bytes

Versions: 71

Compression:

Stored size: 307 Bytes

Contents

require 'ruby2js'

module Ruby2JS
  module Filter
    module Strict
      include SEXP

      def process(node)
        if @strict
          super
        else
          @strict = true
          s(:begin, s(:str, 'use strict'), super(node))
        end
      end
    end

    DEFAULTS.push Strict
  end
end

Version data entries

71 entries across 71 versions & 1 rubygems

Version Path
ruby2js-2.1.24 lib/ruby2js/filter/strict.rb
ruby2js-2.1.23 lib/ruby2js/filter/strict.rb
ruby2js-2.1.22 lib/ruby2js/filter/strict.rb
ruby2js-2.1.21 lib/ruby2js/filter/strict.rb
ruby2js-2.1.20 lib/ruby2js/filter/strict.rb
ruby2js-2.1.19 lib/ruby2js/filter/strict.rb
ruby2js-2.1.18 lib/ruby2js/filter/strict.rb
ruby2js-2.1.17 lib/ruby2js/filter/strict.rb
ruby2js-2.1.16 lib/ruby2js/filter/strict.rb
ruby2js-2.1.15 lib/ruby2js/filter/strict.rb
ruby2js-2.1.14 lib/ruby2js/filter/strict.rb
ruby2js-2.1.13 lib/ruby2js/filter/strict.rb
ruby2js-2.1.12 lib/ruby2js/filter/strict.rb
ruby2js-2.1.11 lib/ruby2js/filter/strict.rb
ruby2js-2.1.10 lib/ruby2js/filter/strict.rb
ruby2js-2.1.9 lib/ruby2js/filter/strict.rb
ruby2js-2.1.8 lib/ruby2js/filter/strict.rb
ruby2js-2.1.7 lib/ruby2js/filter/strict.rb
ruby2js-2.1.6 lib/ruby2js/filter/strict.rb
ruby2js-2.1.5 lib/ruby2js/filter/strict.rb