move compiler to typed

starting to get rid of soml, bit by bit
This commit is contained in:
Torsten Ruger
2016-12-08 15:25:20 +02:00
parent c3a28d2abc
commit da553f996f
30 changed files with 36 additions and 35 deletions

View File

@ -1,7 +1,7 @@
require_relative '../../helper'
require 'parslet/convenience'
Soml::Compiler.class_eval do
Typed::Compiler.class_eval do
def set_main main
@clazz = Register.machine.space.get_class_by_name :Object
@method = main
@ -23,7 +23,7 @@ module ExpressionHelper
parts = Parser::Transform.new.apply(syntax)
codes = Soml.ast_to_code parts
#puts parts.inspect
compiler = Soml::Compiler.new
compiler = Typed::Compiler.new
set_main(compiler)
produced = compiler.process( codes )
assert @output , "No output given"

View File

@ -22,7 +22,7 @@ module RuntimeTests
def load_program
@machine = Register.machine.boot
Soml::Compiler.load_parfait
Typed::Compiler.load_parfait
@machine.parse_and_compile main()
@machine.collect
end

View File

@ -12,7 +12,7 @@ module ParfaitTests
def setup
@stdout = ""
@machine = Register.machine.boot
Soml::Compiler.load_parfait
Typed::Compiler.load_parfait
end
def main