class TypeProf::Core::AST::Node::ProgramNode
Attributes
Public Class Methods
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/ast/base.rb, line 212 def initialize(raw_node, lenv) super(raw_node, lenv) @tbl = raw_node.locals raw_body = raw_node.statements @body = AST.create_node(raw_body, lenv, false) end
Calls superclass method
TypeProf::Core::AST::Node::new
Public Instance Methods
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/ast/base.rb, line 224 def attrs = { tbl: } def install0(genv) @tbl.each {|var| @lenv.locals[var] = Source.new(genv.nil_type) } @lenv.locals[:"*self"] = lenv.cref.get_self(genv) # for toplevel return @body.lenv.locals[:"*expected_method_ret"] = Vertex.new(self) @body.install(genv) end end
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/ast/base.rb, line 226 def install0(genv) @tbl.each {|var| @lenv.locals[var] = Source.new(genv.nil_type) } @lenv.locals[:"*self"] = lenv.cref.get_self(genv) # for toplevel return @body.lenv.locals[:"*expected_method_ret"] = Vertex.new(self) @body.install(genv) end
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/ast/base.rb, line 223 def subnodes = { body: } def attrs = { tbl: } def install0(genv) @tbl.each {|var| @lenv.locals[var] = Source.new(genv.nil_type) } @lenv.locals[:"*self"] = lenv.cref.get_self(genv) # for toplevel return @body.lenv.locals[:"*expected_method_ret"] = Vertex.new(self) @body.install(genv) end end class DummyNilNode < Node def initialize(code_range, lenv) @code_range = code_range super(nil, lenv) end def code_range @code_range end def install0(genv) Source.new(genv.nil_type) end end class DummyRHSNode < Node def initialize(code_range, lenv) @code_range = code_range super(nil, lenv) end def code_range @code_range end def install0(_) Vertex.new(self) end end class DummySymbolNode def initialize(sym, code_range, ret) @sym = sym @code_range = code_range @ret = ret end attr_reader :lenv, :prev_node, :ret def boxes(_) [] end end end