tree-sitter-pymanifest
A tree-sitter parser for PyPA manifest files.
Python package
Installation
pip install tree-sitter-pymanifest
Usage
import tree_sitter_pymanifest as pymanifest
with open('MANIFEST.in', 'r') as mf:
# parse a MANIFEST.in file
tree = pymanifest.parse(mf.read())
# get the highlight groups
hl_groups = pymanifest.highlights(tree)
# run an arbitrary query
dir_patterns = pymanifest.query("""
(command dir_pattern: (pattern) @dir_pattern)
""", tree.root_node)
References
Editors
☑ Neovim
☐ Helix
☐ Emacs
Changelog
v0.2.1
- Drop Python 3.7 support
- Remove injections queries
- Use tree-sitter core highlight captures
v0.2.0
- Add Python package tests
v0.1.1
- Bundle queries in the package