Class: MarshalParser::Parser

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

Defined Under Namespace

Modules: Annotatable Classes: ArrayNode, BigIntegerNode, ClassNode, FalseNode, FloatNode, HashNode, HashWithDefaultValueNode, IntegerNode, ModuleNode, NilNode, Node, ObjectExtendedNode, ObjectLinkNode, ObjectNode, ObjectWithDumpMethodNode, ObjectWithIVarsNode, ObjectWithMarshalDumpMethod, RegexpNode, StringNode, StructNode, SubclassNode, SymbolLinkNode, SymbolNode, TrueNode, VersionNode

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Assertable

#assert

Constructor Details

#initialize(lexer) ⇒ Parser

Returns a new instance of Parser.



12
13
14
15
16
# File 'lib/marshal-parser/parser.rb', line 12

def initialize(lexer)
  @lexer = lexer
  @index = 0
  @symbols = []
end

Instance Attribute Details

#symbolsObject (readonly)

Returns the value of attribute symbols.



10
11
12
# File 'lib/marshal-parser/parser.rb', line 10

def symbols
  @symbols
end

Instance Method Details

#parseObject



18
19
20
21
# File 'lib/marshal-parser/parser.rb', line 18

def parse
  version_node = build_ast_node
  build_ast_node
end