Class: CodeTools::AST::Self

Inherits:
Node
  • Object
show all
Defined in:
lib/rubinius/code/ast/self.rb

Instance Attribute Summary

Attributes inherited from Node

#line

Instance Method Summary collapse

Methods inherited from Node

#ascii_graph, #attributes, #children, #initialize, 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, #visit, #walk

Constructor Details

This class inherits a constructor from CodeTools::AST::Node

Instance Method Details

#bytecode(g) ⇒ Object



6
7
8
9
10
# File 'lib/rubinius/code/ast/self.rb', line 6

def bytecode(g)
  pos(g)

  g.push_self
end

#defined(g) ⇒ Object



12
13
14
# File 'lib/rubinius/code/ast/self.rb', line 12

def defined(g)
  g.push_literal "self"
end

#to_sexpObject



20
21
22
# File 'lib/rubinius/code/ast/self.rb', line 20

def to_sexp
  [:self]
end

#value_defined(g, f) ⇒ Object



16
17
18
# File 'lib/rubinius/code/ast/self.rb', line 16

def value_defined(g, f)
  g.push_self
end