Class: Minjs::ECMA262::StEmpty

Inherits:
Statement show all
Defined in:
lib/minjs/ecma262/statement.rb

Overview

Base class of ECMA262 EmptyStatement element.

See Also:

Instance Attribute Summary

Attributes inherited from Base

#parent

Instance Method Summary collapse

Methods inherited from Statement

#priority, #to_exp?, #to_return?

Methods inherited from Base

#add_remove_paren, #concat, #replace

Constructor Details

#initializeStEmpty

Returns a new instance of StEmpty.



252
253
# File 'lib/minjs/ecma262/statement.rb', line 252

def initialize()
end

Instance Method Details

#==(obj) ⇒ Object

compare object



267
268
269
# File 'lib/minjs/ecma262/statement.rb', line 267

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

#deep_dupObject

duplicate object

See Also:



257
258
259
# File 'lib/minjs/ecma262/statement.rb', line 257

def deep_dup
  self.class.new()
end

#empty?Boolean

return true if statement can convert to empty statement.

Returns:



278
279
280
# File 'lib/minjs/ecma262/statement.rb', line 278

def empty?
  true
end

#to_js(options = {}) ⇒ Object

Returns a ECMAScript string containg the representation of element.

See Also:



273
274
275
# File 'lib/minjs/ecma262/statement.rb', line 273

def to_js(options = {})
  ";;"
end

#traverse(parent) {|parent, _self| ... } ⇒ Object

Traverses this children and itself with given block.

Yields:

Yield Parameters:



262
263
264
# File 'lib/minjs/ecma262/statement.rb', line 262

def traverse(parent, &block)
  yield parent, self
end