I’ve figure out the problem. It is due to my misunderstanding of how gc works. I’ve pushed a fix. On a separate note, I also pushed the change that makes treesit-parser-list a function (rather than a variable). Yuan
In treesit-traverse-forward:Besides that, I've tested your changes and they definitely fix the segfault. Great stuff!
treesit.el:291:2: Warning: docstring has wrong usage of unescaped single quotes (use \= or different quoting)