rubyx/lib/rubyx/rubyx_compiler.rb
Torsten Ruger ae3d64eb53 moved all the normalize stuff over to the ruby layer
Which is how it should have been from the start
2018-07-19 14:47:29 +03:00

35 lines
600 B
Ruby

module RubyX
class RubyXCompiler
attr_reader :source
def initialize(source)
@source = source
end
def ruby_to_vool
ruby = Ruby::RubyCompiler.compile( source )
vool = ruby.to_vool
vool
end
def ruby_to_mom
vool = ruby_to_vool
vool.to_mom(nil)
end
def ruby_to_risc(platform)
mom = ruby_to_mom
mom.translate(platform)
end
def ruby_to_binary(platform)
Parfait.boot!
Risc.boot!
linker = ruby_to_risc(platform)
linker.position_all
linker.create_binary
linker
end
end
end