2018-07-19 13:46:51 +02:00
|
|
|
module Ruby
|
|
|
|
|
2018-07-21 13:34:39 +02:00
|
|
|
class YieldStatement < Callable
|
2018-07-19 13:46:51 +02:00
|
|
|
|
2018-07-21 13:34:39 +02:00
|
|
|
def initialize(arguments)
|
|
|
|
super("yield_#{object_id}".to_sym , SelfExpression.new , arguments)
|
2018-07-19 13:46:51 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
def to_s
|
2018-07-21 13:34:39 +02:00
|
|
|
"yield(#{arguments.join(', ')})"
|
2018-07-19 13:46:51 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|