class Minjs::ECMA262::StContinue

Base class of ECMA262 ContinueStatement element.

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

Attributes

exp[R]

Public Class Methods

new(exp = nil) click to toggle source
# File lib/minjs/ecma262/statement.rb, line 1011
def initialize(exp = nil)
  @exp = exp
end

Public Instance Methods

==(obj) click to toggle source

compare object

# File lib/minjs/ecma262/statement.rb, line 1028
def ==(obj)
  self.class == obj.class and
    @exp == obj.exp
end
deep_dup() click to toggle source

duplicate object @see Base#deep_dup

# File lib/minjs/ecma262/statement.rb, line 1017
def deep_dup
  self.class.new(@exp ? @exp.deep_dup : nil)
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/statement.rb, line 1035
def to_js(options = {})
  if @exp
    concat options, :continue, @exp, ";"
  else
    concat options, :continue, ";"
  end
end
traverse(parent) { |parent, self| ... } click to toggle source

Traverses this children and itself with given block.

# File lib/minjs/ecma262/statement.rb, line 1022
def traverse(parent, &block)
  @exp.traverse(self, &block) if @exp
  yield parent, self
end