Traversal and lexer for as-patterns.