forked from Aider-AI/grep-ast
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate to tree-sitter-language-pack: expand language support and add…
…ress maintenance Resolves Aider-AI#7. This commit replaces the tree-sitter language pack from grantjenks/py-tree-sitter-languages with Goldziher/tree-sitter-language-pack, significantly expanding language support and addressing maintenance issues. Key changes include: 1. Greatly increases the number of supported languages, including Swift and Svelte. 2. Resolves dependency on an unmaintained package that was forcing grep-ast to use an old tree-sitter version (0.21). 3. Unlocks the ability to use more recent tree-sitter versions. 4. Updates requirements.txt to use tree-sitter-language-pack>=0.2.0. 5. Increments the version number to 0.3.4-dev in setup.py. 6. Adds extensive test cases for parsing various languages in test_parsers.py. Notable changes: - Removed support for DOT, OCaml, ql (GitHub CodeQL), and tsq (Tree Sitter Query) due to their absence in the new pack. - Removed potentially incorrect mappings for .gomod, .sqlite, and .regex extensions. - Replaced the uncommon ".et" mapping for "embeddedtemplate" with mappings for ERB and EJS, which are common uses of embedded templates. - Re-enabled markdown as the new pack uses to a different markdown grammar that likely doesn't suffer from previous bugs.
- Loading branch information
Showing
5 changed files
with
2,138 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
tree-sitter-languages>=1.8.0 | ||
tree-sitter-language-pack>=0.2.0 | ||
pathspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.