Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unified-latex and tree-sitter-latex #74

Open
batchor opened this issue Feb 14, 2024 · 1 comment
Open

unified-latex and tree-sitter-latex #74

batchor opened this issue Feb 14, 2024 · 1 comment

Comments

@batchor
Copy link

batchor commented Feb 14, 2024

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!

@siefkenj
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants