Class: MarshalParser::Parser::NilNode

Inherits:
Node
  • Object
show all
Defined in:
lib/marshal-parser/parser.rb

Instance Method Summary collapse

Methods inherited from Node

#attributes, #children, #decoded_value, #literal_token, #tokens

Methods included from Assertable

#assert

Constructor Details

#initialize(token) ⇒ NilNode

Returns a new instance of NilNode.



456
457
458
459
460
# File 'lib/marshal-parser/parser.rb', line 456

def initialize(token)
  super()
  assert_token_type token, Lexer::NIL
  @token = token
end

Instance Method Details

#always_leaf?Boolean

Returns:

  • (Boolean)


466
467
468
# File 'lib/marshal-parser/parser.rb', line 466

def always_leaf?
  true
end

#child_entitiesObject



462
463
464
# File 'lib/marshal-parser/parser.rb', line 462

def child_entities
  [@token]
end