Class: Minjs::ECMA262::StEmpty
- Defined in:
- lib/minjs/ecma262/statement.rb
Overview
Base class of ECMA262 EmptyStatement element.
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#==(obj) ⇒ Object
compare object.
-
#deep_dup ⇒ Object
duplicate object.
-
#empty? ⇒ Boolean
return true if statement can convert to empty statement.
-
#initialize ⇒ StEmpty
constructor
A new instance of StEmpty.
-
#to_js(options = {}) ⇒ Object
Returns a ECMAScript string containg the representation of element.
-
#traverse(parent) {|parent, _self| ... } ⇒ Object
Traverses this children and itself with given block.
Methods inherited from Statement
#priority, #to_exp?, #to_return?
Methods inherited from Base
#add_remove_paren, #concat, #replace
Constructor Details
#initialize ⇒ StEmpty
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_dup ⇒ Object
duplicate object
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.
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.
273 274 275 |
# File 'lib/minjs/ecma262/statement.rb', line 273 def to_js( = {}) ";;" end |
#traverse(parent) {|parent, _self| ... } ⇒ Object
Traverses this children and itself with given block.
262 263 264 |
# File 'lib/minjs/ecma262/statement.rb', line 262 def traverse(parent, &block) yield parent, self end |