Class: Minjs::ECMA262::Expression

Inherits:
Base
  • Object
show all
Defined in:
lib/minjs/ecma262/expression.rb

Overview

Base class of ECMA262 expression element

Instance Attribute Summary

Attributes inherited from Base

#parent

Instance Method Summary collapse

Methods inherited from Base

#==, #add_remove_paren, #concat, #deep_dup, #replace, #to_js, #traverse

Instance Method Details

#left_hand_side_exp?Boolean

Returns true if expression is kind of LeftHandSideExpression.

Returns:

  • (Boolean)

    true if expression is kind of LeftHandSideExpression.



46
47
48
# File 'lib/minjs/ecma262/expression.rb', line 46

def left_hand_side_exp?
  false
end

#priorityFixnum

Returns expression priority.

Returns:

  • (Fixnum)

    expression priority



51
52
53
# File 'lib/minjs/ecma262/expression.rb', line 51

def priority
  999
end

#reduce(parent) ⇒ Object

reduce expression if available

Parameters:

  • parent (Base)

    parent element



42
43
# File 'lib/minjs/ecma262/expression.rb', line 42

def reduce(parent)
end

#side_effect?Boolean

Returns:



55
56
57
# File 'lib/minjs/ecma262/expression.rb', line 55

def side_effect?
  return true
end