Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: ba61804edb
Fetching contributors…

Cannot retrieve contributors at this time

34 lines (30 sloc) 0.646 kb
# Simple Loop
#
# Run this file to create a SimpleLoop.class file.
# It takes one argument and prints it out in a loop
# until you stop the process.
#
# ruby examples/simple_loop.rb
# java SimpleLoop repeatMe
#
require 'bitescript'
include BiteScript
fb = FileBuilder.build(__FILE__) do
public_class "SimpleLoop" do
public_static_method "main", [], void, string[] do
aload 0
push_int 0
aaload
label :top
dup
aprintln
goto :top
returnvoid
end
end
end
fb.generate do |filename, class_builder|
File.open(filename, 'w') do |file|
file.write(class_builder.generate)
end
end
Jump to Line
Something went wrong with that request. Please try again.