Rename Block to RubyBlock at Ruby level
The parser presents the whole call that defines the block as a block. And so does the Ruby layer, as we don't want to do processing in ast. Just making it clearer, also Vool:: block will have to be renamed
This commit is contained in:
@ -5,7 +5,7 @@ module Ruby
|
||||
# A block is in essence quite like a method, so the block definition is like a
|
||||
# method definition, except it is not bound to the class direcly, but the enclosing
|
||||
# method. The enclosing method also provides the scope.
|
||||
class BlockStatement < Statement
|
||||
class RubyBlockStatement < Statement
|
||||
attr_reader :send , :args , :body
|
||||
|
||||
def initialize( send , args , body )
|
@ -76,10 +76,11 @@ module Ruby
|
||||
end
|
||||
|
||||
def on_block(block_node)
|
||||
puts block_node.to_s
|
||||
sendd = process(block_node.children[0])
|
||||
args = process(block_node.children[1])
|
||||
body = process(block_node.children[2])
|
||||
BlockStatement.new(sendd , args , body)
|
||||
RubyBlockStatement.new(sendd , args , body)
|
||||
end
|
||||
|
||||
def on_yield(node)
|
||||
|
Reference in New Issue
Block a user