Class: Minjs::ECMA262::ExpPostInc
- Inherits:
-
Expression
- Object
- Base
- Expression
- Minjs::ECMA262::ExpPostInc
- Includes:
- UnaryOperation
- Defined in:
- lib/minjs/ecma262/expression.rb
Overview
Class of the Postfix increment operator expression element.
Instance Attribute Summary
Attributes included from UnaryOperation
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(val) ⇒ ExpPostInc
constructor
A new instance of ExpPostInc.
-
#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) ⇒ ExpPostInc
Returns a new instance of ExpPostInc.
797 798 799 |
# File 'lib/minjs/ecma262/expression.rb', line 797 def initialize(val) @val = val end |
Instance Method Details
#priority ⇒ Fixnum
Returns expression priority.
807 808 809 |
# File 'lib/minjs/ecma262/expression.rb', line 807 def priority PRIORITY_POSTFIX end |
#sym ⇒ Object
symbol of expression
802 803 804 |
# File 'lib/minjs/ecma262/expression.rb', line 802 def sym "++" end |
#to_js(options = {}) ⇒ Object
Returns a ECMAScript string containg the representation of element.
813 814 815 |
# File 'lib/minjs/ecma262/expression.rb', line 813 def to_js( = {}) concat , @val, sym end |