fix(lib): allow error nodes to match when they are child nodes
This commit is contained in:
parent
9fdf7213d4
commit
8387101a61
2 changed files with 28 additions and 1 deletions
|
|
@ -1338,7 +1338,12 @@ static void ts_query__perform_analysis(
|
|||
// Determine if this hypothetical child node would match the current step
|
||||
// of the query pattern.
|
||||
bool does_match = false;
|
||||
if (visible_symbol) {
|
||||
|
||||
// ERROR nodes can appear anywhere, so if the step is
|
||||
// looking for an ERROR node, consider it potentially matchable.
|
||||
if (step->symbol == ts_builtin_sym_error) {
|
||||
does_match = true;
|
||||
} else if (visible_symbol) {
|
||||
does_match = true;
|
||||
if (step->symbol == WILDCARD_SYMBOL) {
|
||||
if (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue