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

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

Instance Attribute Summary

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

Returns a new instance of EmptySplat.



407
408
409
410
# File 'lib/rubinius/ast/variables.rb', line 407

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

Instance Method Details

#bytecode(g) ⇒ Object



412
413
414
415
416
417
418
# File 'lib/rubinius/ast/variables.rb', line 412

def bytecode(g)
  return if @size == 0

  pos(g)

  g.make_array @size
end

#to_sexpObject



420
421
422
# File 'lib/rubinius/ast/variables.rb', line 420

def to_sexp
  [:splat]
end