Class: Rubinius::ToolSet.current::TS::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.



536
537
538
539
# File 'lib/rubinius/ast/exceptions.rb', line 536

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

Instance Attribute Details

#valueObject

Returns the value of attribute value.



534
535
536
# File 'lib/rubinius/ast/exceptions.rb', line 534

def value
  @value
end

Instance Method Details

#bytecode(g, body) ⇒ Object



541
542
543
544
545
546
547
548
549
550
# File 'lib/rubinius/ast/exceptions.rb', line 541

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



552
553
554
# File 'lib/rubinius/ast/exceptions.rb', line 552

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