Class: Rubinius::AST::OpAssign1
- Defined in:
- lib/compiler/ast/operators.rb
Instance Attribute Summary collapse
-
#arguments ⇒ Object
Returns the value of attribute arguments.
-
#op ⇒ Object
Returns the value of attribute op.
-
#receiver ⇒ Object
Returns the value of attribute receiver.
-
#value ⇒ Object
Returns the value of attribute value.
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(line, receiver, arguments, op, value) ⇒ OpAssign1
constructor
A new instance of OpAssign1.
- #to_sexp ⇒ Object
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, receiver, arguments, op, value) ⇒ OpAssign1
Returns a new instance of OpAssign1.
45 46 47 48 49 50 51 52 |
# File 'lib/compiler/ast/operators.rb', line 45 def initialize(line, receiver, arguments, op, value) @line = line @receiver = receiver @op = op arguments = nil if arguments.is_a?(EmptyArray) @arguments = ActualArguments.new line, arguments @value = value end |
Instance Attribute Details
#arguments ⇒ Object
Returns the value of attribute arguments.
43 44 45 |
# File 'lib/compiler/ast/operators.rb', line 43 def arguments @arguments end |
#op ⇒ Object
Returns the value of attribute op.
43 44 45 |
# File 'lib/compiler/ast/operators.rb', line 43 def op @op end |
#receiver ⇒ Object
Returns the value of attribute receiver.
43 44 45 |
# File 'lib/compiler/ast/operators.rb', line 43 def receiver @receiver end |
#value ⇒ Object
Returns the value of attribute value.
43 44 45 |
# File 'lib/compiler/ast/operators.rb', line 43 def value @value end |
Instance Method Details
#to_sexp ⇒ Object
54 55 56 57 58 |
# File 'lib/compiler/ast/operators.rb', line 54 def to_sexp arguments = [:arglist] + @arguments.to_sexp op = @op == :or ? :"||" : :"&&" [:op_asgn1, @receiver.to_sexp, arguments, op, @value.to_sexp] end |