Class: CodeTools::AST::Retry

Inherits:
Break show all
Defined in:
lib/rubinius/code/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

#block=, #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) ⇒ Retry

Returns a new instance of Retry.



660
661
662
# File 'lib/rubinius/code/ast/control_flow.rb', line 660

def initialize(line)
  @line = line
end

Instance Method Details

#bytecode(g) ⇒ Object



664
665
666
667
668
669
670
671
672
# File 'lib/rubinius/code/ast/control_flow.rb', line 664

def bytecode(g)
  pos(g)

  if g.retry
    g.goto g.retry
  else
    jump_error g, :retry
  end
end

#to_sexpObject



674
675
676
# File 'lib/rubinius/code/ast/control_flow.rb', line 674

def to_sexp
  [:retry]
end