Search query fixup: Rename syntax.Query to syntax.ParseTree [1/3]
Created by: rvantonder
This is the base diff of #6115 and #6116.
This is a semantics preserving change.
Summary
Query
is overladed in the codebase. There are these two references, and also Zoekt queries:
- There's the parse tree, which is typed as
syntax.Query
inquery.go
with comment
// A Query contains the parse tree of a query.
- Then the validated
Query
insearchquery.go
with comment
// A Query is the parsed representation of a search query
The comments above do not refer to the same Query. The former is the parse tree, the latter a validated parse tree (we can call that the query). This PR is the first of three changes to migrate the first reference to a ParseTree
type, which simplifies everything down the line. Follow-up diffs #6115 and #6116 branch off of this one to simplify things further and they should be easy to review.
I'm pushing for these changes because I need them to implement RFC 48 while avoiding more spaghetti code <3
Test plan: This is a refactor, tests are updated.