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

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

Instance Attribute Summary collapse

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

Returns a new instance of RescueSplat.



524
525
526
527
# File 'lib/rubinius/ast/exceptions.rb', line 524

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

Instance Attribute Details

#valueObject

Returns the value of attribute value.



522
523
524
# File 'lib/rubinius/ast/exceptions.rb', line 522

def value
  @value
end

Instance Method Details

#bytecode(g, body) ⇒ Object



529
530
531
532
533
534
535
536
537
538
# File 'lib/rubinius/ast/exceptions.rb', line 529

def bytecode(g, body)
  pos(g)

  g.dup
  @value.bytecode(g)
  g.cast_array
  g.swap
  g.send :__rescue_match__, 1
  g.git body
end

#to_sexpObject



540
541
542
# File 'lib/rubinius/ast/exceptions.rb', line 540

def to_sexp
  [:splat, @value.to_sexp]
end