class TypeProf::Core::AST::ArrayPatternNode::HashPatternNode::FindPatternNode::AltPatternNode::CapturePatternNode::IfPatternNode

Attributes

body[R]
cond[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/pattern.rb, line 106
def initialize(raw_node, lenv)
  super(raw_node, lenv)
  @cond = AST.create_node(raw_node.predicate, lenv)
  raise if raw_node.statements.type != :statements_node
  raise if raw_node.statements.body.size != 1
  @body = AST.create_pattern_node(raw_node.statements.body[0], lenv)
  raise if raw_node.subsequent
end

Public Instance Methods

install0(genv) click to toggle source
# File typeprof-0.30.1/lib/typeprof/core/ast/pattern.rb, line 119
def install0(genv)
  @cond.install(genv)
  @body.install(genv)
end
subnodes(= { cond:, body: }) click to toggle source
# File typeprof-0.30.1/lib/typeprof/core/ast/pattern.rb, line 117
  def subnodes = { cond:, body: }

  def install0(genv)
    @cond.install(genv)
    @body.install(genv)
  end
end