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:
@ -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]
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user