Class: Masamune::AbstractSyntaxTree::ParametersVisitor
- Inherits:
-
Prism::Visitor
- Object
- Prism::Visitor
- Masamune::AbstractSyntaxTree::ParametersVisitor
- Defined in:
- lib/masamune/abstract_syntax_tree/visitors/parameters_visitor.rb
Instance Attribute Summary collapse
-
#results ⇒ Object
readonly
Returns the value of attribute results.
Instance Method Summary collapse
-
#initialize ⇒ ParametersVisitor
constructor
A new instance of ParametersVisitor.
-
#visit_parameters_node(node) ⇒ Object
Since parameters nodes can house multiple variables in one node, we don’t have to check for a token_value.
Constructor Details
#initialize ⇒ ParametersVisitor
Returns a new instance of ParametersVisitor.
6 7 8 |
# File 'lib/masamune/abstract_syntax_tree/visitors/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/parameters_visitor.rb', line 4 def results @results end |
Instance Method Details
#visit_parameters_node(node) ⇒ Object
Since 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/parameters_visitor.rb', line 12 def visit_parameters_node(node) results << node super end |