Class: Masamune::AbstractSyntaxTree::BlockParametersVisitors

Inherits:
Prism::Visitor
  • Object
show all
Defined in:
lib/masamune/abstract_syntax_tree/visitors/block_parameters_visitor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeBlockParametersVisitors

Returns a new instance of BlockParametersVisitors.



6
7
8
# File 'lib/masamune/abstract_syntax_tree/visitors/block_parameters_visitor.rb', line 6

def initialize
  @results = []
end

Instance Attribute Details

#resultsObject (readonly)

Returns the value of attribute results.



4
5
6
# File 'lib/masamune/abstract_syntax_tree/visitors/block_parameters_visitor.rb', line 4

def results
  @results
end

Instance Method Details

#visit_block_parameters_node(node) ⇒ Object

Since block parameters nodes can house multiple variables in one node, we don’t have to check for a token_value.



12
13
14
15
# File 'lib/masamune/abstract_syntax_tree/visitors/block_parameters_visitor.rb', line 12

def visit_block_parameters_node(node)
  results << node
  super
end