Class: MarshalParser::Parser::Node

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

Instance Method Summary collapse

Methods included from Assertable

#assert

Instance Method Details

#always_leaf?Boolean

Returns:

  • (Boolean)


287
288
289
# File 'lib/marshal-parser/parser.rb', line 287

def always_leaf?
  false
end

#attributesObject



283
284
285
# File 'lib/marshal-parser/parser.rb', line 283

def attributes
  {}
end

#child_entitiesObject



263
264
265
# File 'lib/marshal-parser/parser.rb', line 263

def child_entities
  raise "Not implemented"
end

#childrenObject



271
272
273
# File 'lib/marshal-parser/parser.rb', line 271

def children
  child_entities.grep(Node)
end

#decoded_valueObject



275
276
277
# File 'lib/marshal-parser/parser.rb', line 275

def decoded_value
  nil
end

#literal_tokenObject



279
280
281
# File 'lib/marshal-parser/parser.rb', line 279

def literal_token
  nil
end

#tokensObject



267
268
269
# File 'lib/marshal-parser/parser.rb', line 267

def tokens
  child_entities.grep(Lexer::Token)
end