callable as base for yield and send
more yield tests
This commit is contained in:
@ -3,8 +3,10 @@ module Vool
|
||||
class YieldStatement < Statement
|
||||
attr_reader :arguments
|
||||
|
||||
def initialize(arguments )
|
||||
def initialize(name , receiver , arguments)
|
||||
@arguments = arguments
|
||||
@receiver = receiver
|
||||
@name = name
|
||||
@arguments ||= []
|
||||
end
|
||||
|
||||
@ -24,7 +26,7 @@ module Vool
|
||||
# - a SimpleCall,
|
||||
def to_mom( compiler )
|
||||
@parfait_block = @block.to_mom(compiler) if @block
|
||||
@receiver = SelfExpression.new(compiler.self_type) if @receiver.is_a?(SelfExpression)
|
||||
@receiver = SelfExpression.new(compiler.receiver_type) if @receiver.is_a?(SelfExpression)
|
||||
if(@receiver.ct_type)
|
||||
simple_call(compiler)
|
||||
else
|
||||
|
Reference in New Issue
Block a user