class TypeProf::Core::AST::LocalVariableReadNode

Attributes

var[R]

Public Class Methods

new(raw_node, lenv) click to toggle source
Calls superclass method TypeProf::Core::AST::Node::new
# File typeprof-0.30.1/lib/typeprof/core/ast/variable.rb, line 4
def initialize(raw_node, lenv)
  super(raw_node, lenv)
  @var = raw_node.name
end

Public Instance Methods

attrs(= { var: }) click to toggle source
# File typeprof-0.30.1/lib/typeprof/core/ast/variable.rb, line 11
  def attrs = { var: }

  def install0(genv)
    @lenv.get_var(@var)
  end

  def retrieve_at(pos)
    yield self if code_range.include?(pos)
  end
end
install0(genv) click to toggle source
# File typeprof-0.30.1/lib/typeprof/core/ast/variable.rb, line 13
def install0(genv)
  @lenv.get_var(@var)
end
retrieve_at(pos) { |self| ... } click to toggle source
# File typeprof-0.30.1/lib/typeprof/core/ast/variable.rb, line 17
def retrieve_at(pos)
  yield self if code_range.include?(pos)
end