]> git.eshelyaron.com Git - emacs.git/commit
Allow tree-sitter to notify parse-tree changes
authorYuan Fu <casouri@gmail.com>
Tue, 15 Nov 2022 10:16:11 +0000 (02:16 -0800)
committerYuan Fu <casouri@gmail.com>
Tue, 15 Nov 2022 10:16:11 +0000 (02:16 -0800)
commit34e50dc4a23505dce0499f120477e2e1a1327432
treea2b38e7fee7a74c9af19d78886f313155aa4853f
parent06db8015ea05cc17efb16684de23533ee315be61
Allow tree-sitter to notify parse-tree changes

* src/treesit.c (treesit_call_after_change_functions): New function.
(treesit_ensure_parsed): Call treesit_call_after_change_functions
right after re-parse.
(make_treesit_parser): Initialize after_change_functions.
(Ftreesit_parser_notifiers)
(Ftreesit_parser_add_notifier)
(Ftreesit_parser_remove_notifier): New functions.
* src/treesit.h (Lisp_TS_Parser): New field after_change_functions.
src/treesit.c
src/treesit.h