Class: Minjs::ECMA262::ExpAddAssign

Inherits:
Expression show all
Includes:
AssignmentOperation
Defined in:
lib/minjs/ecma262/expression.rb

Overview

Class of ‘+=’ operator

See Also:

Instance Attribute Summary

Attributes included from AssignmentOperation

#val, #val2

Attributes inherited from Base

#parent

Instance Method Summary collapse

Methods included from AssignmentOperation

#==, #add_paren, #deep_dup, #ecma262_typeof, #reduce, #remove_paren, #replace, #to_js, #traverse

Methods inherited from Expression

#left_hand_side_exp?, #reduce, #side_effect?

Methods inherited from Base

#==, #add_remove_paren, #concat, #deep_dup, #replace, #to_js, #traverse

Constructor Details

#initialize(val, val2) ⇒ ExpAddAssign

Returns a new instance of ExpAddAssign.



2072
2073
2074
2075
# File 'lib/minjs/ecma262/expression.rb', line 2072

def initialize(val, val2)
  @val = val
  @val2 = val2
end

Instance Method Details

#priorityFixnum

Returns expression priority.

Returns:

  • (Fixnum)

    expression priority



2082
2083
2084
# File 'lib/minjs/ecma262/expression.rb', line 2082

def priority
  PRIORITY_ASSIGNMENT
end

#symObject

symbol of expression



2078
2079
2080
# File 'lib/minjs/ecma262/expression.rb', line 2078

def sym
  "+="
end