Class: CodeTools::AST::OpAssignOr

Inherits:
OpAssignAnd show all
Defined in:
lib/rubinius/code/ast/operators.rb

Instance Attribute Summary

Attributes inherited from OpAssignAnd

#left, #right

Attributes inherited from Node

#line

Instance Method Summary collapse

Methods inherited from OpAssignAnd

#defined, #initialize, #to_sexp

Methods inherited from Node

#ascii_graph, #attributes, #children, #defined, #initialize, match_arguments?, match_send?, #new_block_generator, #new_generator, #node_name, #or_bytecode, #pos, #set_child, #to_sexp, #transform, transform, transform_comment, transform_kind, transform_kind=, transform_name, #value_defined, #visit, #walk

Constructor Details

This class inherits a constructor from CodeTools::AST::OpAssignAnd

Instance Method Details

#bytecode(g) ⇒ Object



463
464
465
466
467
468
469
470
471
# File 'lib/rubinius/code/ast/operators.rb', line 463

def bytecode(g)
  pos(g)

  g.state.push_op_asgn
  @left.or_bytecode(g) do
    g.state.pop_op_asgn
    @right.bytecode(g)
  end
end

#sexp_nameObject



473
474
475
# File 'lib/rubinius/code/ast/operators.rb', line 473

def sexp_name
  :op_asgn_or
end