more class creation tests

This commit is contained in:
Torsten Ruger
2017-04-09 10:14:28 +03:00
parent 397eca541a
commit b2775455e1
5 changed files with 56 additions and 13 deletions

View File

@ -29,7 +29,6 @@ module Vool
vars.each { |var| ivar_hash[var] = :Object }
@clazz.set_instance_type( Parfait::Type.for_hash( @clazz , ivar_hash ) )
end
puts "BODY is #{body.class}"
body.collect([]).each {|node| node.set_class(@clazz) }
body.create_objects
end

View File

@ -27,7 +27,7 @@ module Vool
def make_type( )
type_hash = {}
@args.each {|arg| type_hash[arg.children[0]] = :Object }
@args.each {|arg| type_hash[arg] = :Object }
Parfait::NamedList.type_for( type_hash )
end

View File

@ -21,6 +21,10 @@ module Vool
@statements.each { |s| s.collect(arr) }
super
end
def create_objects
@statements.each{ |s| s.create_objects }
end
end
class ScopeStatement < Statements