Better syntax errors for the search query language
Currently, the only error we can raise in case of syntax errors is "Invalid query", which is not helpful for users.
We should find a way to turn tree-sitter's partial ASTs into proper errors, so users know what to fix in their query.
Migrated from T3926 (view on Phabricator)