Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yijunyu/tree-sitter-parsers
https://github.com/yijunyu/tree-sitter-parsers
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/yijunyu/tree-sitter-parsers
- Owner: yijunyu
- Created: 2021-08-22T08:49:44.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-11-19T06:45:00.000Z (about 2 years ago)
- Last Synced: 2024-10-01T14:27:01.145Z (3 months ago)
- Language: C
- Size: 31 MB
- Stars: 6
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Tree-sitter parsers
The package ```tree-sitter-parsers``` preinstalls tree-sitter parsers as shared libraries into your ```$HOME/.tree-sitter/tree-sitter-parsers-$(uname)``` folder.
Usage:
```python
import tree_sitter_parsers
```## Development
### preparation of source code
The source code are extracted from official nodejs packages by the following script:
```bash
#!/bin/bash
for l in bash c cpp c-sharp css elm go html java javascript kotlin lua php python ruby rust scala solidity verilog yaml; do
npm pack tree-sitter-$l
done
for l in *.tgz; do
f=${l/.tgz/}
mkdir -p $f
tar xvfz $l --strip-components=1 -C $f
done
```
Here we can support more programming languages.### testing
The script below tests the package:
```bash
rm -rf dist/*
python3 setup.py sdist bdist_wheel
pip uninstall tree_sitter_parsers -y
pip install dist/tree_sitter_parsers-*-py3-none-any.whl
rm -rf ~/.tree-sitter
python3 -c "import tree_sitter_parsers"
```### deployment
The script below uploads the package into Pypi archive:
```bash
twine upload dist/tree_sitter_parsers-*
pip uninstall tree_sitter_parsers -y
pip install tree_sitter_parsers
```