trying to get function calls to work (but will have to rework regeister handling)

This commit is contained in:
Torsten Ruger
2014-05-10 15:24:56 +03:00
parent 7d69132d90
commit 79a28ac5fa
9 changed files with 25 additions and 7 deletions

View File

@ -2,4 +2,4 @@ def foo(x)
a = 5
end
foo( 3 )
foo( 3 )

View File

@ -26,7 +26,7 @@ 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}"
puts "parsing #{index}=#{part.inspect}"
expr = part.compile( program.context )
if index = parts.length
program.main = expr