mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
b0d0c9f40d
This basically revertse9fca7668b
,d08da958b9
,d1fe1dcf8a
, and68eaf7b4d5
31 lines
542 B
Ruby
31 lines
542 B
Ruby
# frozen_string_literal: true
|
|
|
|
require "action_dispatch/journey/scanner"
|
|
require "action_dispatch/journey/nodes/node"
|
|
|
|
module ActionDispatch
|
|
# :stopdoc:
|
|
module Journey
|
|
class Parser < Racc::Parser
|
|
include Journey::Nodes
|
|
|
|
def self.parse(string)
|
|
new.parse string
|
|
end
|
|
|
|
def initialize
|
|
@scanner = Scanner.new
|
|
end
|
|
|
|
def parse(string)
|
|
@scanner.scan_setup(string)
|
|
do_parse
|
|
end
|
|
|
|
def next_token
|
|
@scanner.next_token
|
|
end
|
|
end
|
|
end
|
|
# :startdoc:
|
|
end
|