class TypeProf::Core::AST::StatementsNode::MultiWriteNode::MatchWriteNode::DefinedNode::SplatNode::ForNode

Attributes

body[R]
expr[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/misc.rb, line 190
def initialize(raw_node, lenv)
  super(raw_node, lenv)
  # XXX: tentative implementation
  # raw_node.index
  @expr = AST.create_node(raw_node.collection, lenv)
  @body = raw_node.statements ? AST.create_node(raw_node.statements, lenv) : DummyNilNode.new(TypeProf::CodeRange.new(code_range.last, code_range.last), lenv)
end

Public Instance Methods

install0(genv) click to toggle source
# File typeprof-0.30.1/lib/typeprof/core/ast/misc.rb, line 202
def install0(genv)
  @expr.install(genv)
  @body.install(genv)
  Source.new(genv.nil_type)
end
subnodes(= { expr:, body: }) click to toggle source
# File typeprof-0.30.1/lib/typeprof/core/ast/misc.rb, line 200
  def subnodes = { expr:, body: }

  def install0(genv)
    @expr.install(genv)
    @body.install(genv)
    Source.new(genv.nil_type)
  end
end