Skip to content
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

More bindings #35

Merged
merged 4 commits into from
Sep 28, 2020
Merged

More bindings #35

merged 4 commits into from
Sep 28, 2020

Conversation

sogaiu
Copy link

@sogaiu sogaiu commented Sep 27, 2020

This PR attempts to add a few more bindings (with tests) for:

  • child_count
  • named_child_count
  • next_sibling
  • prev_sibling
  • next_named_sibling
  • prev_named_sibling
  • parent

There is also a binding for is_missing but it lacks a test as I don't have sample source for JavaScript or Python that produces that condition.

If someone has an example of that I might be able to add a test for it.

BTW, I ran the tests successfully with tree-sitter-python's tree-sitter-cli dev dependency in package.json set to something in the 0.16.x series as I failed to have the 0.17.x series (i.e. master branch) work with the tests.

See below for update.

@sogaiu
Copy link
Author

sogaiu commented Sep 28, 2020

So it looks like updating tree-sitter itself to tree-sitter/tree-sitter@5080de4 is sufficient to get the tests to pass.

I presume this is because of a change to TREE_SITTER_LANGUAGE_VERSION: https://github.com/tree-sitter/tree-sitter/blob/4c2f36a07b99732c96d474fdae30c1cf158b966e/lib/include/tree_sitter/api.h#L24

@maxbrunsfeld
Copy link
Contributor

This all looks great. And you're right about the TREE_SITTER_LANGUAGE_VERSION bump. Thanks for doing the upgrade.

@maxbrunsfeld maxbrunsfeld merged commit aa4ffe8 into tree-sitter:master Sep 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants