Sha256: 38a85e88b9e3f83ac703f008f018b1edaa29a70b44b55d3164ac4afcdaa63d96

Contents?: true

Size: 275 Bytes

Versions: 50

Compression:

Stored size: 275 Bytes

Contents

module Ruby2JS
  class Converter

    # (break
    #   (int 1))

    handle :break do |n=nil|
      raise Error.new("break argument #{ n.inspect }", @ast) if n
      raise Error.new("break outside of loop", @ast) if @next_token == :return
      put 'break'
    end
  end
end

Version data entries

50 entries across 50 versions & 1 rubygems

Version Path
ruby2js-4.0.0 lib/ruby2js/converter/break.rb
ruby2js-3.6.1 lib/ruby2js/converter/break.rb
ruby2js-3.6.0 lib/ruby2js/converter/break.rb
ruby2js-3.5.3 lib/ruby2js/converter/break.rb
ruby2js-3.5.2 lib/ruby2js/converter/break.rb
ruby2js-3.5.1 lib/ruby2js/converter/break.rb
ruby2js-3.5.0 lib/ruby2js/converter/break.rb
ruby2js-3.4.0 lib/ruby2js/converter/break.rb
ruby2js-3.3.6 lib/ruby2js/converter/break.rb
ruby2js-3.3.5 lib/ruby2js/converter/break.rb
ruby2js-3.3.4 lib/ruby2js/converter/break.rb
ruby2js-3.3.3 lib/ruby2js/converter/break.rb
ruby2js-3.3.2 lib/ruby2js/converter/break.rb
ruby2js-3.3.1 lib/ruby2js/converter/break.rb
ruby2js-3.3.0 lib/ruby2js/converter/break.rb
ruby2js-3.2.0 lib/ruby2js/converter/break.rb
ruby2js-3.1.2 lib/ruby2js/converter/break.rb
ruby2js-3.1.1 lib/ruby2js/converter/break.rb
ruby2js-3.1.0 lib/ruby2js/converter/break.rb
ruby2js-3.0.15 lib/ruby2js/converter/break.rb