search: implement fuzzy regex concatenation
Created by: rvantonder
We currently rely on query-manipulating code that turns a query like foo bar
into (foo).*(bar)
. This query-manipulating code is legacy/"old code" query processing that's pretty convoluted. We still run this logic though, even when the new parser is enabled.
This PR effectively implements all this logic in the new parser code, before it reaches the above processing. The changes effectively turn the above code into a no-op, and allows to delete all the legacy parser logic in search_results.go
down the line. More urgently, I need this logic to preprocess things for search expressions. It is prep for https://github.com/sourcegraph/sourcegraph/pull/13907.
Commits 1 and 3: just refactors. Commit 2: the main change.