class Solargraph::Parser::NodeProcessor::Base
def block_pin position
-
(Pin::Closure, nil)
-
Parameters:
-
position
(Solargraph::Position
) --
Other tags:
- Todo: - Candidate for deprecation
def block_pin position # @todo determine if this can return a Pin::Block pins.select{|pin| pin.is_a?(Pin::Closure) && pin.location.range.contain?(position)}.last end
def closure_pin position
-
(Pin::Closure, nil)
-
Parameters:
-
position
(Solargraph::Position
) --
Other tags:
- Todo: - Candidate for deprecation
def closure_pin position pins.select{|pin| pin.is_a?(Pin::Closure) && pin.location.range.contain?(position)}.last end
def comments_for(node)
-
(String, nil)
-
Parameters:
-
node
(Parser::AST::Node
) --
def comments_for(node) region.source.comments_for(node) end
def get_node_location(node)
-
(Solargraph::Location)
-
Parameters:
-
node
(Parser::AST::Node
) --
def get_node_location(node) range = Parser.node_range(node) Location.new(region.filename, range) end
def initialize node, region, pins, locals
-
locals
(Array
) -- -
pins
(Array
) -- -
region
(Region
) -- -
node
(Parser::AST::Node
) --
def initialize node, region, pins, locals @node = node @region = region @pins = pins @locals = locals @processed_children = false end
def named_path_pin position
-
(Pin::Closure, nil)
-
Parameters:
-
position
(Solargraph::Position
) --
def named_path_pin position pins.select{|pin| pin.is_a?(Pin::Closure) && pin.path && !pin.path.empty? && pin.location.range.contain?(position)}.last end
def process
-
(void)
-
def process process_children end
def process_children subregion = region
-
(void)
-
Parameters:
-
subregion
(Region
) --
def process_children subregion = region return if @processed_children @processed_children = true node.children.each do |child| next unless Parser.is_ast_node?(child) NodeProcessor.process(child, subregion, pins, locals) end end