To explore the usefulness of Tree-sitter, check out this comprehensive blog post and the official repository.
Before getting started, make sure to read the official documentation.
-
Review the
grammar.js
file to understand its structure. Refer to the parser creation guide for detailed instructions. -
For every change made to
grammar.js
, ensure you add corresponding tests in thetest/corpus/
directory. See how to write tests by going through the testing part of the docs. -
Look at how the parsers for python and lua are written, going through them is extremely helpful.