make method creation class methods in MethodCompiler
and pass the wish to use main explicitly, which is really a test feature
This commit is contained in:
@ -22,7 +22,7 @@ require 'rubyx'
|
||||
|
||||
module Compiling
|
||||
def clean_compile(clazz_name , method_name , args , statements)
|
||||
compiler = Vm::MethodCompiler.new.create_method(clazz_name,method_name,args ).init_method
|
||||
compiler = Vm::MethodCompiler.create_method(clazz_name,method_name,args ).init_method
|
||||
compiler.process( Vm.ast_to_code( statements ) )
|
||||
end
|
||||
|
||||
|
@ -28,7 +28,7 @@ module Register
|
||||
include AST::Sexp
|
||||
include Compiling
|
||||
include SpaceHack
|
||||
|
||||
|
||||
def setup
|
||||
Register.machine.boot # force boot to reset main
|
||||
end
|
||||
@ -41,7 +41,7 @@ module Register
|
||||
end
|
||||
def check_nil
|
||||
assert @expect , "No output given"
|
||||
compiler = Vm::MethodCompiler.new
|
||||
compiler = Vm::MethodCompiler.new(:main)
|
||||
code = Vm.ast_to_code( @input )
|
||||
assert code.to_s , @input
|
||||
produced = compiler.process( code )
|
||||
|
Reference in New Issue
Block a user