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-1.8.0 lib/ruby2js/filter/strict.rb
ruby2js-1.7.0 lib/ruby2js/filter/strict.rb
ruby2js-1.6.0 lib/ruby2js/filter/strict.rb
ruby2js-1.5.0 lib/ruby2js/filter/strict.rb
ruby2js-1.4.0 lib/ruby2js/filter/strict.rb
ruby2js-1.3.0 lib/ruby2js/filter/strict.rb
ruby2js-1.2.0 lib/ruby2js/filter/strict.rb
ruby2js-1.1.5 lib/ruby2js/filter/strict.rb
ruby2js-1.1.4 lib/ruby2js/filter/strict.rb
ruby2js-1.1.3 lib/ruby2js/filter/strict.rb
ruby2js-1.1.2 lib/ruby2js/filter/strict.rb