Sha256: 0cf428f931d51c19d24abc76e8c7441e1095d989cacaec1ecf078b1f22349348

Contents?: true

Size: 295 Bytes

Versions: 7

Compression:

Stored size: 295 Bytes

Contents

module Ruby2JS
  class Converter

    # (while-post
    #   (true)
    #   (kwbegin
    #     (...)))

    handle :while_post do |condition, block|
      block = block.updated(:begin) if block.type == :kwbegin
      "do {#@nl#{ scope block }#@nl} while (#{ parse condition })"
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
ruby2js-1.2.0 lib/ruby2js/converter/whilepost.rb
ruby2js-1.1.5 lib/ruby2js/converter/whilepost.rb
ruby2js-1.1.4 lib/ruby2js/converter/whilepost.rb
ruby2js-1.1.3 lib/ruby2js/converter/whilepost.rb
ruby2js-1.1.2 lib/ruby2js/converter/whilepost.rb
ruby2js-1.1.1 lib/ruby2js/converter/whilepost.rb
ruby2js-1.1.0 lib/ruby2js/converter/whilepost.rb