-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upstreaming generation of bindings #116
Comments
Hello @amaanq ! Sure! That would be great. I would also really appreciate it if you could ping me when the work is done, so I could update the repository to use upstream grammar bindings. |
There might be a slight misunderstanding - I'm aware that CGo is used to create ffi bindings to go (in bindings.go), and that would be kept here, however, a grammar's bindings/export of its language function would functionally be upstreamed. Hopefully I didn't cause any sort of misunderstanding |
Ideally, tree-sitter will bundle binding/binding_test.go for a language, and a go.mod file, but for go.mod I'm unsure how we should format this. Here's my current take
See here for rust/js implementations (cargo.toml and package.json) https://github.com/tree-sitter/tree-sitter/tree/master/cli/src/generate/templates |
Ok, see here: |
@smacker on another note I'd like to also upstream this repo, and would of course invite you as a maintainer of that repo w/ full access (for just that repo) Having very popular bindings be upstream makes it much easier for people wanting to use them to find, and I would also like to add many new API bindings that are not here, like I've done in Python in this PR: tree-sitter/py-tree-sitter#150 Feel free to decline, there's no pressure at all! Though it'd be awesome if you were okay with this 😁 and I think there's 0 downsides with a lot of upsides :) |
It should be documented that using a parser in your project can be tricky.
|
Hi! Very cool project - I have to say that it's nice to see Go getting support for tree-sitter. I'm a member of the upstream tree-sitter org, and I'd like to include go bindings via the cli when creating/generating a grammar, though not by default. I plan to add C, Swift, and Go, and Swift/Go can be enabled in package.json with a "bindings" field or so (still working it out atm).
Would you be okay with me upstreaming this behavior? Obviously I'd be basically copying your binding.go/binding_test.go files pretty much.
Thanks!
Amaan
The text was updated successfully, but these errors were encountered: