rename meta to singleton class
seems more appropriate, as it is the class for a single object Also seems to be called that on the net (don't remember where the meta came from, but it's gone)
This commit is contained in:
@ -37,7 +37,7 @@ module Vool
|
||||
when MethodExpression
|
||||
node.to_mom(@clazz)
|
||||
when ClassMethodExpression
|
||||
node.to_mom(@clazz.meta_class)
|
||||
node.to_mom(@clazz.singleton_class)
|
||||
else
|
||||
raise "Only methods for now #{node.class}:#{node}"
|
||||
end
|
||||
@ -62,7 +62,7 @@ module Vool
|
||||
end
|
||||
|
||||
# goes through the code looking for instance variables (and their assignments)
|
||||
# adding each to the respective type, ie class or meta_class, depending
|
||||
# adding each to the respective type, ie class or singleton_class, depending
|
||||
# on if they are instance or class instance variables.
|
||||
#
|
||||
# Class variables are deemed a design mistake, ie not implemented (yet)
|
||||
@ -72,7 +72,7 @@ module Vool
|
||||
when MethodExpression
|
||||
target = @clazz
|
||||
when ClassMethodExpression
|
||||
target = @clazz.meta_class
|
||||
target = @clazz.singleton_class
|
||||
else
|
||||
raise "Only methods for now #{node.class}:#{node}"
|
||||
end
|
||||
|
@ -8,7 +8,7 @@ module Vool
|
||||
end
|
||||
|
||||
def to_mom(clazz)
|
||||
raise "not meta" unless clazz.class == Parfait::MetaClass
|
||||
raise "not singleton" unless clazz.class == Parfait::SingletonClass
|
||||
raise( "no class in #{self}") unless clazz
|
||||
method = clazz.add_instance_method_for(name , make_arg_type , make_frame , body )
|
||||
#puts "CLass method Class:#{clazz}:#{name}"
|
||||
|
@ -49,7 +49,7 @@ module Vool
|
||||
class ModuleName < Expression
|
||||
include Named
|
||||
def ct_type
|
||||
get_named_class.meta_class.instance_type
|
||||
get_named_class.singleton_class.instance_type
|
||||
end
|
||||
def to_slot(_)
|
||||
return Mom::SlotDefinition.new( get_named_class, [])
|
||||
|
Reference in New Issue
Block a user