Class: Rubinius::AST::OpAssignAnd

Inherits:
Node
  • Object
show all
Defined in:
lib/compiler/ast/operators.rb

Direct Known Subclasses

OpAssignOr

Instance Attribute Summary collapse

Attributes inherited from Node

#line

Instance Method Summary collapse

Methods inherited from Node

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

Constructor Details

#initialize(line, left, right) ⇒ OpAssignAnd

Returns a new instance of OpAssignAnd.



82
83
84
85
86
# File 'lib/compiler/ast/operators.rb', line 82

def initialize(line, left, right)
  @line = line
  @left = left
  @right = right
end

Instance Attribute Details

#leftObject

Returns the value of attribute left.



80
81
82
# File 'lib/compiler/ast/operators.rb', line 80

def left
  @left
end

#rightObject

Returns the value of attribute right.



80
81
82
# File 'lib/compiler/ast/operators.rb', line 80

def right
  @right
end

Instance Method Details

#sexp_nameObject



88
89
90
# File 'lib/compiler/ast/operators.rb', line 88

def sexp_name
  :op_asgn_and
end

#to_sexpObject



92
93
94
# File 'lib/compiler/ast/operators.rb', line 92

def to_sexp
  [sexp_name, @left.to_sexp, @right.to_sexp]
end