2018-07-19 15:22:44 +02:00
|
|
|
module Ruby
|
2018-07-19 13:46:51 +02:00
|
|
|
|
|
|
|
class BlockStatement < Statement
|
2018-07-19 15:22:44 +02:00
|
|
|
attr_reader :send , :args , :body
|
2018-07-19 13:46:51 +02:00
|
|
|
|
2018-07-19 15:22:44 +02:00
|
|
|
def initialize( send , args , body )
|
|
|
|
@send , @args , @body = send , args , body
|
2018-07-19 13:46:51 +02:00
|
|
|
raise "no bod" unless @body
|
|
|
|
end
|
|
|
|
|
2018-07-19 13:59:10 +02:00
|
|
|
def to_vool
|
2018-07-19 13:46:51 +02:00
|
|
|
BlockStatement.new( @args , @body.normalize)
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|