use rubyc_compiler as instance

not as before class methods
so we can carry the state around
This commit is contained in:
Torsten Ruger
2018-07-01 11:59:07 +03:00
parent 1505df894a
commit 22b1fea587
3 changed files with 24 additions and 12 deletions

View File

@ -8,13 +8,14 @@ module RubyX
end
def ruby_to_risc(input , platform)
mom = ruby_to_mom(input)
puts "MOM #{mom.class}"
mom.translate(platform)
end
def ruby_to_vool(input)
RubyXCompiler.ruby_to_vool(input)
RubyXCompiler.new(input).ruby_to_vool
end
def ruby_to_mom(input)
RubyXCompiler.ruby_to_mom(input)
RubyXCompiler.new(input).ruby_to_mom
end
def compile_in_test input
vool = ruby_to_vool in_Test(input)