class Minjs::ECMA262::LineTerminator

Class of ECMA262 LineTerminator element

Every LineTerminator characters in source elements is converted to this class object.

This class is singleton and representation string is u000A.

@see www.ecma-international.org/ecma-262 ECMA262 7.3

Public Class Methods

get() click to toggle source

get instance

# File lib/minjs/ecma262/literal.rb, line 132
def self.get
  @@instance
end

Public Instance Methods

==(obj) click to toggle source

compare object

# File lib/minjs/ecma262/literal.rb, line 119
def ==(obj)
  self.class == obj.class
end
lt?() click to toggle source

true if literal is line terminator

# File lib/minjs/ecma262/literal.rb, line 114
def lt?
  true
end
to_js(options = {}) click to toggle source

Returns a ECMAScript string containg the representation of element. @see Base#to_js

# File lib/minjs/ecma262/literal.rb, line 125
def to_js(options = {})
  "\n"
end
traverse(parent, &block) click to toggle source

Traverses this children and itself with given block.

@see Base#traverse

# File lib/minjs/ecma262/literal.rb, line 110
def traverse(parent, &block)
end