https://github.com/zgornel/parsitter
Tree-sitter wrapper library
https://github.com/zgornel/parsitter
Last synced: 6 days ago
JSON representation
Tree-sitter wrapper library
- Host: GitHub
- URL: https://github.com/zgornel/parsitter
- Owner: zgornel
- License: mit
- Created: 2025-03-07T15:58:41.000Z (7 months ago)
- Default Branch: master
- Last Pushed: 2025-03-21T12:48:49.000Z (7 months ago)
- Last Synced: 2025-03-21T13:49:34.751Z (7 months ago)
- Language: Julia
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# ParSitter
A small utility to parse code, files and directories with [tree-sitter](https://tree-sitter.github.io/tree-sitter/)
## Parsing
### Files
```
$ julia parsitter.jl my_file.py --input-type code --language python --log-level debug
```
### Directories
```
$ julia parsitter.jl ~/projects/tmp/FluentPython --input-type directory --language python --log-level debug
```
### Inline codeThis works,
```
$ julia parsitter.jl 'def foo():pass' --input-type code --language python --log-level debug
```
If escape chars are present, use the `--escape-chars` option:
```
$ julia parsitter.jl 'def foo():\n\tpass' --input-type code --escape-chars --language python --log-level debug
```The library is still very experimental.