Tweak impossible pattern error messages

This commit is contained in:
Max Brunsfeld 2020-08-20 13:24:42 -07:00
parent 4301110c12
commit 9daec9cb22
10 changed files with 19 additions and 17 deletions

View file

@ -1903,7 +1903,7 @@ TSQuery *ts_query_new(
if (self->language->version >= TREE_SITTER_LANGUAGE_VERSION_WITH_STATE_COUNT) {
if (!ts_query__analyze_patterns(self, error_offset)) {
*error_type = TSQueryErrorPattern;
*error_type = TSQueryErrorStructure;
ts_query_delete(self);
return NULL;
}