Class: Minjs::ECMA262::ExpOr

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

Overview

Class of the Bitwise Or 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) ⇒ ExpOr

Returns a new instance of ExpOr.



1762
1763
1764
1765
# File 'lib/minjs/ecma262/expression.rb', line 1762

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

Instance Method Details

#ecma262_typeofSymbol

return results of ‘typeof’ operator.

Returns:

  • (Symbol)

    :number



1780
1781
1782
# File 'lib/minjs/ecma262/expression.rb', line 1780

def ecma262_typeof
  :number
end

#priorityFixnum

Returns expression priority.

Returns:

  • (Fixnum)

    expression priority



1773
1774
1775
# File 'lib/minjs/ecma262/expression.rb', line 1773

def priority
  PRIORITY_BITWISE_OR
end

#symObject

symbol of expression



1768
1769
1770
# File 'lib/minjs/ecma262/expression.rb', line 1768

def sym
  "|"
end