Class: Rubinius::ToolSet.current::TS::AST::ToplevelClassName

Inherits:
ClassName
  • Object
show all
Defined in:
lib/rubinius/ast/definitions.rb

Instance Attribute Summary

Attributes inherited from ClassName

#name, #superclass

Attributes inherited from Node

#line

Instance Method Summary collapse

Methods inherited from ClassName

#name_bytecode

Methods inherited from Node

#ascii_graph, #attributes, #children, #defined, match_arguments?, match_send?, #new_block_generator, #new_generator, #node_name, #or_bytecode, #pos, #set_child, #transform, transform, transform_comment, transform_kind, transform_kind=, transform_name, #value_defined, #visit, #walk

Constructor Details

#initialize(line, node, superclass) ⇒ ToplevelClassName

Returns a new instance of ToplevelClassName.



767
768
769
770
771
# File 'lib/rubinius/ast/definitions.rb', line 767

def initialize(line, node, superclass)
  @line = line
  @name = node.name
  @superclass = superclass
end

Instance Method Details

#bytecode(g) ⇒ Object



773
774
775
776
777
778
779
# File 'lib/rubinius/ast/definitions.rb', line 773

def bytecode(g)
  pos(g)

  name_bytecode(g)
  g.push_cpath_top
  g.send :open_class_under, 3
end

#to_sexpObject



781
782
783
# File 'lib/rubinius/ast/definitions.rb', line 781

def to_sexp
  [:colon3, @name]
end