unified-latex and tree-sitter-latex
batchor opened this issue · comments
There is another LaTeX parser called tree-sitter-latex based on tree-sitter.
I'm wondering about the similarities and differences between them, and when I should use each?
Any information and hints would be helpful. Thanks!
I didn't know about tree-sitter-latex
. What a neat project! (It wasn't around when I started unified-latex
)
Not knowing much about the project, there are the general things: tree-sitter
generates c
source, where as unified-latex
is pure JS. unified-latex
also gives tools for working with the AST and for adding custom macros, etc. AFAIK, macros for tree-sitter-latex
must be built into the grammar to be recognized.
In general tree-sitter
is made for fast, error-tolerant parsing for things like syntax highlighting. The unifiedjs
framework on the other hand is made for manipulation and transformation of ASTs from one format to another.