Class: CodeTools::AST::SplatArray

Inherits:
SplatAssignment show all
Defined in:
lib/rubinius/code/ast/variables.rb

Instance Attribute Summary

Attributes inherited from SplatAssignment

#value

Attributes inherited from Node

#line

Instance Method Summary collapse

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, value, size) ⇒ SplatArray

Returns a new instance of SplatArray.



362
363
364
365
366
# File 'lib/rubinius/code/ast/variables.rb', line 362

def initialize(line, value, size)
  @line = line
  @value = value
  @size = size
end

Instance Method Details

#bytecode(g) ⇒ Object



368
369
370
371
372
373
374
# File 'lib/rubinius/code/ast/variables.rb', line 368

def bytecode(g)
  pos(g)

  g.make_array @size

  @value.bytecode(g)
end

#to_sexpObject



376
377
378
# File 'lib/rubinius/code/ast/variables.rb', line 376

def to_sexp
  @value.to_sexp
end