tree-sitter-python
tree-sitter-python copied to clipboard
Swift Package Manager & C Bindings including Makefile
Swift Package Manager
Swift's package manager can build C/C++ sources and use headers to expose functions to Swift. The standard tree-sitter parser project layout just requires a little extra configuration to make it happy.
Grammars with SPM support to this date:
- https://github.com/tree-sitter/tree-sitter-javascript
- https://github.com/tree-sitter/tree-sitter-php
- https://github.com/tree-sitter/tree-sitter-c
- https://github.com/tree-sitter/tree-sitter-java
- https://github.com/tree-sitter/tree-sitter-rust
C Bindings & Makefile
This change adds a Makefile and bindings to more easily build static/dynamic libraries for use in C-based languages. The implementation is intended to be as generic as possible, to make for easier adoption and diffing.
This comes from discussion in the main tree-sitter repo https://github.com/tree-sitter/tree-sitter/issues/1488.
@maxbrunsfeld Sorry to be a bother, but how's this one looking?
Is there anything that's holding this up?
@tausbn Is this something that you all are looking at doing? I would love to help get this merged or answer any questions as adding SPM supports allows the swift community to also use it.
hey @aryx can you look at this one for python?
imo the swift bindings are fine but the Makefile is a bit unnecessary
I have no objections to removing the Makefile. It does make it much easier to use the parser from C, but most C clients have long-since come up with their own non-standardized solutions. Should anyone ever take up this task again, it could be done in a separate PR.
@amaanq Luke should have fixed everything that you requested, could you review this and make sure everything looks good to you?
@amaanq Luke should have fixed everything that you requested, could you review this and make sure everything looks good to you?
One more thing, just the changes to the gitignore aren't needed now