Class: Rubinius::ToolSets.current::ToolSet::AST::Redo

Inherits:
Break
  • Object
show all
Defined in:
lib/rubinius/ast/control_flow.rb

Instance Attribute Summary

Attributes inherited from Break

#value

Attributes inherited from Node

#line

Instance Method Summary collapse

Methods inherited from Break

#defined, #jump_error, #sexp_name

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) ⇒ Redo

Returns a new instance of Redo.



624
625
626
# File 'lib/rubinius/ast/control_flow.rb', line 624

def initialize(line)
  @line = line
end

Instance Method Details

#bytecode(g) ⇒ Object



628
629
630
631
632
633
634
635
636
637
# File 'lib/rubinius/ast/control_flow.rb', line 628

def bytecode(g)
  pos(g)

  if g.redo
    g.check_interrupts
    g.goto g.redo
  else
    jump_error g, :redo
  end
end

#to_sexpObject



639
640
641
# File 'lib/rubinius/ast/control_flow.rb', line 639

def to_sexp
  [:redo]
end