tree-sitter is wonderful, but it struggles if you try to parse its own output files.
In fairness, parsing a multi-megabyte C file is hard. The C# parser has a parser.c file totalling 18MiB!
The next version of difftastic will support parsing CSS and JS syntax inside HTML! This makes a huge difference to HTML files.
This support for tree-sitter sub-parsers was contributed by Sesse :)
$ tree-sitter parse -- '/home/wilfred/.emacs.d/**/*.el' --quiet --stat
Total parses: 2272; successful parses: 2271; failed parses: 1; success percentage: 99.96%
It's super easy to test a tree-sitter parser against a large corpus, and to iron out the details!
Wilfred Hughes
Shared words: sitter, parse, parser, tree
Score: 146.6