-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make predicate w. missing capture return true
If a predicate in a query references a capture that was not matched because it was optional in the query, return true rather than throw an error. In other words, if the capture was not found, ignore the predicate entirely. This matches the behavior of tree-sitter CLI and the playground. It is not a common case but we have run into the issue matching Kotlin functions where the return type of a function is optional in the grammar requiring us to do additional filtering in the app code after the query.
- Loading branch information
Showing
2 changed files
with
86 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters