Class: Minjs::ECMA262::ExpStrictNotEq
- Inherits:
-
Expression
- Object
- Base
- Expression
- Minjs::ECMA262::ExpStrictNotEq
- Includes:
- BinaryOperation
- Defined in:
- lib/minjs/ecma262/expression.rb
Overview
Class of the Strict Does-not-equals operator expression element.
Instance Attribute Summary
Attributes included from BinaryOperation
Attributes inherited from Base
Instance Method Summary collapse
-
#ecma262_typeof ⇒ Symbol
return results of ‘typeof’ operator.
-
#initialize(val, val2) ⇒ ExpStrictNotEq
constructor
A new instance of ExpStrictNotEq.
-
#priority ⇒ Fixnum
Expression priority.
-
#reduce(parent) ⇒ Object
reduce expression if available.
-
#sym ⇒ Object
symbol of expression.
Methods included from BinaryOperation
#==, #add_paren, #deep_dup, #remove_paren, #replace, #to_js, #traverse
Methods inherited from Expression
#left_hand_side_exp?, #side_effect?
Methods inherited from Base
#==, #add_remove_paren, #concat, #deep_dup, #replace, #to_js, #traverse
Constructor Details
#initialize(val, val2) ⇒ ExpStrictNotEq
Returns a new instance of ExpStrictNotEq.
1670 1671 1672 1673 |
# File 'lib/minjs/ecma262/expression.rb', line 1670 def initialize(val, val2) @val = val @val2 = val2 end |
Instance Method Details
#ecma262_typeof ⇒ Symbol
return results of ‘typeof’ operator.
1697 1698 1699 |
# File 'lib/minjs/ecma262/expression.rb', line 1697 def ecma262_typeof :boolean end |
#priority ⇒ Fixnum
Returns expression priority.
1681 1682 1683 |
# File 'lib/minjs/ecma262/expression.rb', line 1681 def priority PRIORITY_EQUALITY end |
#reduce(parent) ⇒ Object
reduce expression if available
1687 1688 1689 1690 1691 1692 |
# File 'lib/minjs/ecma262/expression.rb', line 1687 def reduce(parent) if @val.respond_to?(:ecma262_typeof) and @val2.respond_to?(:ecma262_typeof) and (t = @val.ecma262_typeof) == @val2.ecma262_typeof and !t.nil? parent.replace(self, ExpNotEq.new(@val, @val2)) end end |
#sym ⇒ Object
symbol of expression
1676 1677 1678 |
# File 'lib/minjs/ecma262/expression.rb', line 1676 def sym "!==" end |