method
scan
v4.2.9 -
Show latest stable
- Class:
ActionDispatch::Journey::Scanner
scan()private
No documentation available.
# File actionpack/lib/action_dispatch/journey/scanner.rb, line 35
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.tr('\', '')]
# any char
when text = @ss.scan(/./)
[:LITERAL, text]
end
end