Move vool block compilation into constant generation

When the lambda is passed as argument, it must be moved. This triggers the generation of a corresponding parfait object (as before, and as for other constants) but now also triggers the code build. The code being the constant as it were
Also some more name fixes from renames
This commit is contained in:
2019-08-19 14:33:02 +03:00
parent 3ddf2e3837
commit a722a4c285
7 changed files with 13 additions and 12 deletions

View File

@ -10,10 +10,10 @@ module Vool
@vool = ruby_tree.to_vool
end
def test_class
assert_equal ClassStatement , @vool.class
assert_equal ClassExpression , @vool.class
end
def test_method
assert_equal MethodStatement , @vool.body.first.class
assert_equal MethodExpression , @vool.body.first.class
end
def test_create_class
assert_equal Parfait::Class , @vool.create_class_object.class
@ -33,7 +33,7 @@ module Vool
def assert_type_for(input)
ruby_tree = Ruby::RubyCompiler.compile( as_test_main(input) )
vool = ruby_tree.to_vool
assert_equal ClassStatement , vool.class
assert_equal ClassExpression , vool.class
clazz = vool.create_class_object
assert_equal Parfait::Class , clazz.class
assert_equal :a , clazz.instance_type.names[1]

View File

@ -13,9 +13,9 @@ module Vool
@clazz.body.first
end
def test_setup
assert_equal ClassStatement , @clazz.class
assert_equal ClassExpression , @clazz.class
assert_equal Statements , @clazz.body.class
assert_equal MethodStatement , method.class
assert_equal MethodExpression , method.class
end
def test_class
assert_equal Parfait::Class , @clazz.create_class_object.class