Class: CodeTools::AST::EmptyArray

Inherits:
Node
  • Object
show all
Defined in:
lib/rubinius/code/ast/literals.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, #value_defined, #visit, #walk

Constructor Details

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

Instance Method Details

#bytecode(g) ⇒ Object



45
46
47
48
49
# File 'lib/rubinius/code/ast/literals.rb', line 45

def bytecode(g)
  pos(g)

  g.make_array 0
end

#defined(g) ⇒ Object



51
52
53
# File 'lib/rubinius/code/ast/literals.rb', line 51

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

#to_sexpObject



55
56
57
# File 'lib/rubinius/code/ast/literals.rb', line 55

def to_sexp
  [:array]
end