diff options
| author | Yuan Fu | 2023-03-24 12:19:25 -0700 |
|---|---|---|
| committer | Yuan Fu | 2023-03-24 12:29:33 -0700 |
| commit | a37f19b14a6b51fa794178095cf56c112a1396e8 (patch) | |
| tree | 8790a9daf25c1a0925893a9945cdc8ba53474c45 /java/org | |
| parent | f446bfc8198f34d3fc1fa08150383865929ff61c (diff) | |
| download | emacs-a37f19b14a6b51fa794178095cf56c112a1396e8.tar.gz emacs-a37f19b14a6b51fa794178095cf56c112a1396e8.zip | |
Handle signals gracefully in tree-sitter query predicates
Before this change, predicate functions can signal, which will cause
Ftreesit_query_capture to skip freeing the query and cursor object.
We make predicate functions return the signal data rather than
directly signal.
* src/treesit.c (treesit_predicate_capture_name_to_node)
(treesit_predicate_capture_name_to_text)
(treesit_predicate_equal)
(treesit_predicate_match)
(treesit_predicate_pred)
(treesit_eval_predicates): Return signal rather than signaling
directly.
(Ftreesit_query_capture): Check for returned signal data.
Diffstat (limited to 'java/org')
0 files changed, 0 insertions, 0 deletions