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-3.0.14 lib/ruby2js/converter/break.rb
ruby2js-3.0.13 lib/ruby2js/converter/break.rb
ruby2js-3.0.12 lib/ruby2js/converter/break.rb
ruby2js-3.0.11 lib/ruby2js/converter/break.rb
ruby2js-3.0.10 lib/ruby2js/converter/break.rb
ruby2js-3.0.9 lib/ruby2js/converter/break.rb
ruby2js-3.0.8 lib/ruby2js/converter/break.rb
ruby2js-3.0.7 lib/ruby2js/converter/break.rb
ruby2js-3.0.6 lib/ruby2js/converter/break.rb
ruby2js-3.0.5 lib/ruby2js/converter/break.rb