What does HackerNews think of tree-sitter?
An incremental parsing system for programming tools
The idea is to sync changes in the text to a tree structure, then have all the structure manipulation functions built on top of it. See the gif here for a visual representation: https://github.com/nvim-treesitter/playground
This should enable us to create better, faster parsers for popular languages where the Emacs-support so far has not been that great.
So yeah I second that. Emacs 29 is going to be a great release!
Not to discredit Wilfred (it looks like he's taken over the project as the maintainer), but, based on the historical contributions [1], it looks like it was originally developed by Max Brunsfeld, who also created Tree-sitter. [2]
[1]: https://github.com/Wilfred/difftastic/graphs/contributors
[2]: https://github.com/tree-sitter/tree-sitter
[3]: https://github.com/Wilfred/difftastic/commit/958033924a2dea7...
For some languages, yes. https://news.ycombinator.com/item?id=26227214
> If yes, are the libraries open-source?
They are! tree-sitter itself is open-source [1], as are all of the language parsers we've listed on the homepage [2]. The syntax highlighting support is documented here [3].
[1] https://github.com/tree-sitter/tree-sitter
[2] https://tree-sitter.github.io/tree-sitter/#available-parsers
[3] https://tree-sitter.github.io/tree-sitter/syntax-highlightin...
> Robust enough to provide useful results even in the presence of syntax errors
Especially when it comes to human-generated input (but even outside of that) it is beneficial to have a representation for unauthorized states, so long as you can easily detect that that's what you're representing. That allows you to better report errors, or try to mitigate them.
In other words, don't forget to have an https://wiki.c2.com/?EscapeHatch
The tree-sitter framework provides a pretty good engine for syntax highlight: