Class: Solargraph::Parser::ParserGem::NodeProcessors::BeginNode

Inherits:
NodeProcessor::Base show all
Defined in:
lib/solargraph/parser/parser_gem/node_processors/begin_node.rb

Instance Attribute Summary

Attributes inherited from NodeProcessor::Base

#ivars, #locals, #node, #pins, #region

Instance Method Summary collapse

Methods inherited from NodeProcessor::Base

#initialize

Constructor Details

This class inherits a constructor from Solargraph::Parser::NodeProcessor::Base

Instance Method Details

#processObject



8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/solargraph/parser/parser_gem/node_processors/begin_node.rb', line 8

def process
  # We intentionally don't create a CompoundStatement pin
  # here, as this is not necessarily a control flow block -
  # e.g., a begin...end without rescue or ensure should be
  # treated by flow sensitive typing as if the begin and end
  # didn't exist at all.  As such, we create the
  # CompoundStatement pins around the things which actually
  # result in control flow changes - like
  # if/while/rescue/etc

  process_children
end