implements self sent
with explicit and implicit self
This commit is contained in:
@ -33,6 +33,14 @@ module Vool
|
||||
end
|
||||
end
|
||||
class SelfStatement < Statement
|
||||
attr_reader :clazz
|
||||
|
||||
def set_class(clazz)
|
||||
@clazz = clazz
|
||||
end
|
||||
def ct_type
|
||||
@clazz.instance_type
|
||||
end
|
||||
end
|
||||
class SuperStatement < Statement
|
||||
end
|
||||
|
@ -56,7 +56,8 @@ module Vool
|
||||
|
||||
def simple_call
|
||||
type = @receiver.ct_type
|
||||
method = type.get_method(@name)
|
||||
method = type.resolve_method(@name)
|
||||
raise "No method #{@name} for #{type}" unless method
|
||||
[Mom::SimpleCall.new( method) ]
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user