Class: Minjs::ECMA262::ExpDiv

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

Overview

Class of the Division operator expression element.

See Also:

Instance Attribute Summary

Attributes included from BinaryOperation

#val, #val2

Attributes inherited from Base

#parent

Instance Method Summary collapse

Methods included from BinaryOperation

#==, #add_paren, #deep_dup, #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) ⇒ ExpDiv

Returns a new instance of ExpDiv.



1196
1197
1198
1199
# File 'lib/minjs/ecma262/expression.rb', line 1196

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

Instance Method Details

#priorityFixnum

Returns expression priority.

Returns:

  • (Fixnum)

    expression priority



1206
1207
1208
# File 'lib/minjs/ecma262/expression.rb', line 1206

def priority
  PRIORITY_MULTIPLICATIVE
end

#symObject

symbol of expression



1202
1203
1204
# File 'lib/minjs/ecma262/expression.rb', line 1202

def sym
  "/"
end