Reduce error handling logic
This commit is contained in:
parent
acd3d32c36
commit
70aee901ac
1 changed files with 1 additions and 4 deletions
|
|
@ -2291,12 +2291,9 @@ static TSQueryError ts_query__parse_pattern(
|
|||
is_immediate,
|
||||
&field_capture_quantifiers
|
||||
);
|
||||
if (e == PARENT_DONE) {
|
||||
capture_quantifiers_delete(&field_capture_quantifiers);
|
||||
return TSQueryErrorSyntax;
|
||||
}
|
||||
if (e) {
|
||||
capture_quantifiers_delete(&field_capture_quantifiers);
|
||||
if (e == PARENT_DONE) e = TSQueryErrorSyntax;
|
||||
return e;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue