2018-07-19 14:46:51 +03:00
|
|
|
module Ruby
|
2018-09-01 15:54:25 +03:00
|
|
|
# Send and yield are very very similar, so they have a base class CallStatement
|
|
|
|
#
|
|
|
|
# The SendStatement really only provides to_s, so see CallStatement
|
|
|
|
#
|
2018-07-30 14:44:14 +03:00
|
|
|
class SendStatement < CallStatement
|
2019-08-16 14:09:56 +03:00
|
|
|
def to_s(depth = 0)
|
|
|
|
at_depth( depth , "#{receiver}.#{name}(#{arguments.join(', ')})")
|
2018-07-19 14:46:51 +03:00
|
|
|
end
|
|
|
|
end
|
2019-08-19 18:48:13 +03:00
|
|
|
class SuperStatement < SendStatement
|
|
|
|
def initialize(args)
|
|
|
|
super(:super , SelfExpression.new , args)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2018-07-19 14:46:51 +03:00
|
|
|
end
|