moving helper for all to use
This commit is contained in:
parent
80c3430536
commit
b5ca886069
@ -18,6 +18,24 @@ module CompilerHelper
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
module MomCompile
|
||||||
|
include CompilerHelper
|
||||||
|
|
||||||
|
def compile_first_method input
|
||||||
|
lst = Vool::VoolCompiler.compile as_test_main( input )
|
||||||
|
assert_equal Parfait::Class , lst.clazz.class , input
|
||||||
|
@method = lst.clazz.get_method(:main)
|
||||||
|
assert @method
|
||||||
|
res = lst.to_mom( nil )
|
||||||
|
#puts "#{res.class}"
|
||||||
|
res.first
|
||||||
|
end
|
||||||
|
|
||||||
|
def compile_first_method_flat(input)
|
||||||
|
compile_first_method(input).flatten
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
module CleanCompile
|
module CleanCompile
|
||||||
def clean_compile(clazz_name , method_name , args , statements)
|
def clean_compile(clazz_name , method_name , args , statements)
|
||||||
|
@ -1,14 +1 @@
|
|||||||
require_relative "../helper"
|
require_relative "../helper"
|
||||||
|
|
||||||
module MomCompile
|
|
||||||
include CompilerHelper
|
|
||||||
|
|
||||||
def compile_first_method input
|
|
||||||
lst = Vool::VoolCompiler.compile as_test_main( input )
|
|
||||||
assert_equal Parfait::Class , lst.clazz.class , input
|
|
||||||
@method = lst.clazz.get_method(:main)
|
|
||||||
assert @method
|
|
||||||
lst.to_mom( nil ).first
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user