class Minjs::ECMA262::MultiLineComment
Class of ECMA262
MultiLineComment
Element
Attributes
comment[R]
has_lf[R]
Public Class Methods
new(comment)
click to toggle source
# File lib/minjs/ecma262/literal.rb, line 1134 def initialize(comment) @comment = comment end
Public Instance Methods
==(obj)
click to toggle source
compare object
# File lib/minjs/ecma262/literal.rb, line 1145 def ==(obj) self.class == obj.class and @comment == obj.comment end
lt?()
click to toggle source
true if literal is line terminator
If MultiLineComment has one more LineTerminator, This comment is kind of line terminator. otherwise, this comment is kind of white space.
# File lib/minjs/ecma262/literal.rb, line 1165 def lt? @comment.codepoints.each{|char| return true if line_terminator?(char) } false 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 1151 def to_js(options) "/*#{@comment}*/" 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 1141 def traverse(parent, &block) end
ws?()
click to toggle source
true if literal is white space
# File lib/minjs/ecma262/literal.rb, line 1156 def ws? !lt? end