Closed diocletiann closed 1 year ago
I actually had this on my private to-do list for quite some time already, but didn't get to doing it yet. With commit 0277d5203c53156a23be965cae14c48f0d4062fa I added a new method called process_tree
to Processor
which can be used for incremental parsing. The implementation is based on the linked PR. Just be aware that when using this method, you will have to do handle the parsing and language injections yourself.
This is great, thanks!
Thought you might be interested in this, would be a solid performance improvement on large files if the consumer keeps their tree updated like an editor might want to do. https://github.com/tree-sitter/tree-sitter/pull/2200