Class: Masamune::AbstractSyntaxTree::BlockParametersVisitors
- Inherits:
-
Prism::Visitor
- Object
- Prism::Visitor
- Masamune::AbstractSyntaxTree::BlockParametersVisitors
- Defined in:
- lib/masamune/abstract_syntax_tree/visitors/block_parameters_visitor.rb
Instance Attribute Summary collapse
-
#results ⇒ Object
readonly
Returns the value of attribute results.
Instance Method Summary collapse
-
#initialize ⇒ BlockParametersVisitors
constructor
A new instance of BlockParametersVisitors.
-
#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.
Constructor Details
#initialize ⇒ BlockParametersVisitors
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
#results ⇒ Object (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 |