Helper function to parse an input string
into a tree-sitter tree, using our own slightly modified
C grammar. This function won’t fail but the returned
Tree might be invalid and contain errors.
Translate the search pattern in pattern into a weggli QueryTree.
is_cpp enables C++ mode. force_query can be used to allow queries with syntax errors.
We support some basic normalization (adding { } around queries) and store the normalized form
in normalized_patterns to avoid lifetime issues.