class Minjs::ECMA262::Null
Every Null
literal in source elements is converted to this class object.
This
class is singleton
@see www.ecma-international.org/ecma-262 ECMA262
7.8.1
Public Class Methods
get instance
# File lib/minjs/ecma262/literal.rb, line 223 def self.get @@instance end
Private Class Methods
# File lib/minjs/ecma262/literal.rb, line 187 def initialize(val) @val = :null end
Public Instance Methods
compare object
# File lib/minjs/ecma262/literal.rb, line 205 def ==(obj) self.class == obj.class end
duplicate object @see Base#deep_dup
# File lib/minjs/ecma262/literal.rb, line 193 def deep_dup self #not dup end
return results of ‘typeof’ operator.
@return [Symbol] :boolean
# File lib/minjs/ecma262/literal.rb, line 266 def ecma262_typeof :boolean end
@return [Boolean] true if expression is kind of LeftHandSideExpression.
# File lib/minjs/ecma262/literal.rb, line 216 def left_hand_side_exp? true end
Returns results of ToBoolean()
Returns true or false if trivial, otherwise nil.
@return [Boolean]
@see www.ecma-international.org/ecma-262 ECMA262
9.2
# File lib/minjs/ecma262/literal.rb, line 235 def to_ecma262_boolean false end
Returns results of ToNumber()
Returns number if value is trivial, otherwise nil.
@return [Numeric]
@see www.ecma-international.org/ecma-262 ECMA262
9.3
# File lib/minjs/ecma262/literal.rb, line 259 def to_ecma262_number 0 end
Returns results of ToString()
Returns string if value is trivial, otherwise nil.
@return [Numeric]
@see www.ecma-international.org/ecma-262 ECMA262
9.8
# File lib/minjs/ecma262/literal.rb, line 247 def to_ecma262_string "null" end
Returns a ECMAScript string containg the representation of element. @see Base#to_js
# File lib/minjs/ecma262/literal.rb, line 211 def to_js(options = {}) "null" end
Traverses this children and itself with given block.
@see Base#traverse
# File lib/minjs/ecma262/literal.rb, line 200 def traverse(parent, &block) yield parent, self end