In this PR, we've moved the syntax tree's cache of nodes from JS into C++. This allows us to use weak references in the cache, so that we'll only maintain pointers to nodes that are retained elsewhere. This way, when we edit the syntax tree, we'll know which syntax nodes we need to update.
In this PR, we've moved the syntax tree's cache of nodes from JS into C++. This allows us to use weak references in the cache, so that we'll only maintain pointers to nodes that are retained elsewhere. This way, when we edit the syntax tree, we'll know which syntax nodes we need to update.
🍐'd with @queerviolet
Fixes https://github.com/tree-sitter/node-tree-sitter/issues/17