Class: Minjs::ECMA262::ExpBitwiseNot

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

Overview

Class of the Bitwise Not operator expression element.

See Also:

Instance Attribute Summary

Attributes included from UnaryOperation

#val

Attributes inherited from Base

#parent

Instance Method Summary collapse

Methods included from UnaryOperation

#==, #add_paren, #deep_dup, #remove_paren, #replace, #side_effect?, #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) ⇒ ExpBitwiseNot

Returns a new instance of ExpBitwiseNot.



1049
1050
1051
# File 'lib/minjs/ecma262/expression.rb', line 1049

def initialize(val)
  @val = val
end

Instance Method Details

#ecma262_typeofSymbol

return results of ‘typeof’ operator.

Returns:

  • (Symbol)

    :number



1066
1067
1068
# File 'lib/minjs/ecma262/expression.rb', line 1066

def ecma262_typeof
  :number
end

#priorityFixnum

Returns expression priority.

Returns:

  • (Fixnum)

    expression priority



1059
1060
1061
# File 'lib/minjs/ecma262/expression.rb', line 1059

def priority
  PRIORITY_UNARY
end

#symObject

symbol of expression



1054
1055
1056
# File 'lib/minjs/ecma262/expression.rb', line 1054

def sym
  "~"
end