Class: Minjs::ECMA262::ExpRShift

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

Overview

Class of the Right Shift 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) ⇒ ExpRShift

Returns a new instance of ExpRShift.



1363
1364
1365
1366
# File 'lib/minjs/ecma262/expression.rb', line 1363

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

Instance Method Details

#ecma262_typeofSymbol

return results of ‘typeof’ operator.

Returns:

  • (Symbol)

    :number



1381
1382
1383
# File 'lib/minjs/ecma262/expression.rb', line 1381

def ecma262_typeof
  :number
end

#priorityFixnum

Returns expression priority.

Returns:

  • (Fixnum)

    expression priority



1374
1375
1376
# File 'lib/minjs/ecma262/expression.rb', line 1374

def priority
  PRIORITY_SHIFT
end

#symObject

symbol of expression



1369
1370
1371
# File 'lib/minjs/ecma262/expression.rb', line 1369

def sym
  ">>"
end