Class: Minjs::ECMA262::ExpPostDec
- Inherits:
-
Expression
- Object
- Base
- Expression
- Minjs::ECMA262::ExpPostDec
- Includes:
- UnaryOperation
- Defined in:
- lib/minjs/ecma262/expression.rb
Overview
Class of the Postfix decrement operator expression element.
Instance Attribute Summary
Attributes included from UnaryOperation
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(val) ⇒ ExpPostDec
constructor
A new instance of ExpPostDec.
-
#priority ⇒ Fixnum
Expression priority.
-
#sym ⇒ Object
symbol of expression.
-
#to_js(options = {}) ⇒ Object
Returns a ECMAScript string containg the representation of element.
Methods included from UnaryOperation
#==, #add_paren, #deep_dup, #remove_paren, #replace, #side_effect?, #traverse
Methods inherited from Expression
#left_hand_side_exp?, #reduce, #side_effect?
Methods inherited from Base
#==, #add_remove_paren, #concat, #deep_dup, #replace, #traverse
Constructor Details
#initialize(val) ⇒ ExpPostDec
Returns a new instance of ExpPostDec.
823 824 825 |
# File 'lib/minjs/ecma262/expression.rb', line 823 def initialize(val) @val = val end |
Instance Method Details
#priority ⇒ Fixnum
Returns expression priority.
833 834 835 |
# File 'lib/minjs/ecma262/expression.rb', line 833 def priority PRIORITY_POSTFIX end |
#sym ⇒ Object
symbol of expression
828 829 830 |
# File 'lib/minjs/ecma262/expression.rb', line 828 def sym "--" end |
#to_js(options = {}) ⇒ Object
Returns a ECMAScript string containg the representation of element.
839 840 841 |
# File 'lib/minjs/ecma262/expression.rb', line 839 def to_js( = {}) concat , @val, sym end |