Class: Minjs::ECMA262::DivOrRegexpLiteral

Inherits:
Literal
  • Object
show all
Defined in:
lib/minjs/ecma262/literal.rb

Overview

Class of psedo element.

This class means element is division punctuator or regular expression literal, but lexical parser cannot determine which of them.

Constant Summary collapse

@@instance =
self.new()

Instance Attribute Summary

Attributes inherited from Base

#parent

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Literal

#lt?, #priority, #side_effect?, #ws?

Methods inherited from Base

#add_remove_paren, #concat, #deep_dup, #replace, #to_js

Class Method Details

.getObject

get instance



49
50
51
# File 'lib/minjs/ecma262/literal.rb', line 49

def self.get
  @@instance
end

Instance Method Details

#==(obj) ⇒ Object

compare object



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

def ==(obj)
  self.class == obj.class and self.val == obj.val
end

#traverse(parent, &block) ⇒ Object

Traverses this children and itself with given block.

See Also:



38
39
# File 'lib/minjs/ecma262/literal.rb', line 38

def traverse(parent, &block)
end