Class: Solargraph::Parser::Rubyvm::NodeProcessors::LvasgnNode
- Inherits:
-
NodeProcessor::Base
- Object
- NodeProcessor::Base
- Solargraph::Parser::Rubyvm::NodeProcessors::LvasgnNode
- Defined in:
- lib/solargraph/parser/rubyvm/node_processors/lvasgn_node.rb
Instance Attribute Summary
Attributes inherited from NodeProcessor::Base
#locals, #node, #pins, #region
Instance Method Summary collapse
Methods inherited from NodeProcessor::Base
Constructor Details
This class inherits a constructor from Solargraph::Parser::NodeProcessor::Base
Instance Method Details
#process ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/solargraph/parser/rubyvm/node_processors/lvasgn_node.rb', line 8 def process # here = get_node_start_position(node) here = Position.new(node.first_lineno - 1, node.first_column) presence = Range.new(here, region.closure.location.range.ending) loc = get_node_location(node) locals.push Solargraph::Pin::LocalVariable.new( location: loc, closure: region.closure, name: node.children[0].to_s, assignment: node.children[1], comments: comments_for(node), presence: presence ) process_children end |