4 ms·
Tree-sitter appears to be ultra-focused on producing valid syntax trees really fast. This is great for e.g. syntax highlighting, but suboptimal in cases where y
by strogonoff 4y ago
Tree-sitter appears to be ultra-focused on producing valid syntax trees really fast. This is great for e.g. syntax highlighting, but suboptimal in cases where you are writing a reference parser for your custom language and want to provide very useful error descriptions. Chumsky seems to be more suited for the latter (and also has a part of tutorial about precedence[0], so it seems to deal at least with that case).
This overview of parser tradeoffs may be helpful: https://blog.jez.io/tree-sitter-limitations/ https://blog.jez.io/tree-sitter-limitations/.
[0] https://github.com/zesterer/chumsky/blob/master/tutorial.md#parsing-binary-operators https://github.com/zesterer/chumsky/blob/master/tutorial.md#...