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-5.1.1 lib/ruby2js/converter/break.rb
ruby2js-5.1.0 lib/ruby2js/converter/break.rb
ruby2js-5.0.1 lib/ruby2js/converter/break.rb
ruby2js-5.0.0 lib/ruby2js/converter/break.rb
ruby2js-4.2.2 lib/ruby2js/converter/break.rb
ruby2js-4.2.1 lib/ruby2js/converter/break.rb
ruby2js-4.2.0 lib/ruby2js/converter/break.rb
ruby2js-4.1.7 lib/ruby2js/converter/break.rb
ruby2js-4.1.6 lib/ruby2js/converter/break.rb
ruby2js-4.1.5 lib/ruby2js/converter/break.rb
ruby2js-4.1.4 lib/ruby2js/converter/break.rb
ruby2js-4.1.3 lib/ruby2js/converter/break.rb
ruby2js-4.1.2 lib/ruby2js/converter/break.rb
ruby2js-4.1.1 lib/ruby2js/converter/break.rb
ruby2js-4.1.0 lib/ruby2js/converter/break.rb
ruby2js-4.0.5 lib/ruby2js/converter/break.rb
ruby2js-4.0.4 lib/ruby2js/converter/break.rb
ruby2js-4.0.3 lib/ruby2js/converter/break.rb
ruby2js-4.0.2 lib/ruby2js/converter/break.rb
ruby2js-4.0.1 lib/ruby2js/converter/break.rb