class ActionDispatch::Journey::Scanner
def scan
def scan case # / when text = @ss.scan(/\//) [:SLASH, text] when text = @ss.scan(/\*\w+/) [:STAR, text] when text = @ss.scan(/\(/) [:LPAREN, text] when text = @ss.scan(/\)/) [:RPAREN, text] when text = @ss.scan(/\|/) [:OR, text] when text = @ss.scan(/\./) [:DOT, text] when text = @ss.scan(/:\w+/) [:SYMBOL, text] when text = @ss.scan(/[\w%\-~]+/) [:LITERAL, text] # any char when text = @ss.scan(/./) [:LITERAL, text] end end