Class: Klue::Langcraft::Parser

Inherits:
Object
  • Object
show all
Defined in:
lib/klue/langcraft/tokenizer-old-needs-revisit/parser.rb

Overview

Parser class

Instance Method Summary collapse

Constructor Details

#initialize(tokens, schema) ⇒ Parser

Returns a new instance of Parser.



7
8
9
10
11
# File 'lib/klue/langcraft/tokenizer-old-needs-revisit/parser.rb', line 7

def initialize(tokens, schema)
  @tokens = tokens
  @schema = schema
  @position = 0
end

Instance Method Details

#parseObject



13
14
15
# File 'lib/klue/langcraft/tokenizer-old-needs-revisit/parser.rb', line 13

def parse
  parse_node(@schema['definition'])
end