Class: ActionDispatch::Journey::Parser

Inherits:
Object
  • Object
show all
Includes:
Nodes
Defined in:
lib/action_dispatch/journey/parser.rb

Overview

:nodoc:

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeParser

Returns a new instance of Parser.



15
16
17
18
# File 'lib/action_dispatch/journey/parser.rb', line 15

def initialize
  @scanner = Scanner.new
  @next_token = nil
end

Class Method Details

.parse(string) ⇒ Object



11
12
13
# File 'lib/action_dispatch/journey/parser.rb', line 11

def self.parse(string)
  new.parse string
end

Instance Method Details

#parse(string) ⇒ Object



20
21
22
23
24
# File 'lib/action_dispatch/journey/parser.rb', line 20

def parse(string)
  @scanner.scan_setup(string)
  advance_token
  do_parse
end