rename machine to c_machine
This commit is contained in:
@ -26,11 +26,11 @@ class TestRunner < MiniTest::Test
|
||||
# file is a list of expressions, al but the last must be a function
|
||||
# and the last is wrapped as a main
|
||||
parts.each_with_index do |part,index|
|
||||
puts "parsing #{index}=#{part.inspect}"
|
||||
expr = part.compile( program.context )
|
||||
if index = parts.length
|
||||
expr = part.compile( program.context , nil )
|
||||
program.main = expr
|
||||
else
|
||||
expr = part.compile( program.context , program.main )
|
||||
raise "should be function definition for now" unless expr.is_a? Function
|
||||
program.add_function expr
|
||||
end
|
||||
|
@ -28,7 +28,7 @@ class TestSmallProg < MiniTest::Test
|
||||
end
|
||||
|
||||
def test_hello
|
||||
hello = Vm::StringLiteral.new "Hello Raisa\n"
|
||||
hello = Vm::StringConstant.new "Hello Raisa\n"
|
||||
@program.add_object hello
|
||||
@program.main.instance_eval do
|
||||
mov :left =>:r7, :right => 4 # 4 == write
|
||||
|
Reference in New Issue
Block a user