rubyx/test/vool/vool_compiler/helper.rb
Torsten Ruger 3702411043 first propper hoisting test
had to change course, normalising and object creation is not possible
in one go
have to now generate random tmp vars  that will have to be picked up
later (sorted by tmp_ prefix?)
2018-03-15 12:46:56 +05:30

17 lines
374 B
Ruby

require_relative "../helper"
module VoolHelper
include CompilerHelper
def compile_main( input )
st = Vool::VoolCompiler.ruby_to_vool as_test_main( input )
assert_equal st.class , Vool::ClassStatement
assert_equal st.body.class , Vool::MethodStatement
st.body.body
end
def compile_plain( input )
Vool::VoolCompiler.ruby_to_vool input
end
end