paul-gauthier / grep-ast Goto Github PK
View Code? Open in Web Editor NEWGrep source code and see useful code context about matching lines
License: Apache License 2.0
Grep source code and see useful code context about matching lines
License: Apache License 2.0
It looks like supported by tree-sitter:
https://github.com/BonaBeavis/tree-sitter-turtle
However, when I tried to add one liner
".ttl" : "turtle" # https://en.wikipedia.org/wiki/Turtle_(syntax)
to parsers.py ( https://github.com/paul-gauthier/grep-ast/blob/main/grep_ast/parsers.py ),
when I run python setup.py docker_test
( #1 ) it failed miserably after adding this line (while "100% passed" suceeded without this line) :
Tried to add Sway support
like TTL in #2 ,
and encountered similar error when runnig pytest in docker container, otherwise seems like simple change and https://github.com/FuelLabs/tree-sitter-sway is available.
Hi @paul-gauthier , thanks for your work on aider
. I've been having a blast using it.
This project uses https://github.com/grantjenks/py-tree-sitter-languages, but that project is unmaintained and has been for several months. This forces grep-ast
to be stuck on an old tree-sitter version (0.21) and also limits the number of parsers that can be used by upstream projects (including aider). There is a hacky way to install new language parsers, but that dependency will seemingly be stuck on tree-sitter 0.21 indefinitely, which seems bad.
Another project has sprung up called tree-sitter-language-pack, however it's got a slightly different intention (large collection of grammar binaries, as opposed to small/focused one for the most popular languages only). That project is mainly an integration of this unmerged tree-sitter-languages PR with a bunch of new grammar binaries added. There's probably space for a minimal version that bundles just the top N languages and natively allows users to install their own binaries at will (so, essentially, just a version of tree-sitter-languages
with that PR merged, and some different grammar binaries).
If you want to replace tree-sitter-languages
with tree-sitter-language-pack
, I'd be happy to open a PR. Note that the source binary size is quite a bit larger:
tree-sitter-language-pack
: 35.7 MB, no platform-specific buildstree-sitter-languages
: ~9.0MB, depending on the platformA declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.