-
Notifications
You must be signed in to change notification settings - Fork 53
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
Update bindings & workflows #126
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, left a few notes below
Perhaps it would make sense to split out the update to |
b34b709
to
4ec526c
Compare
872c421
to
5276297
Compare
|
||
>`npm run test` | ||
>`npm x -- tree-sitter test` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we keep the scripts we can even shorten this:
>`npm x -- tree-sitter test` | |
>`npm test` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But then we will lose the node package tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then we should adapt the test
script to run tree-sitter test
(too?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather add a different script for it.
bindings/rust/README.md
Outdated
# Kotlin Grammar for Tree-sitter | ||
|
||
This crate provides a Kotlin grammar for the [tree-sitter](https://tree-sitter.github.io/tree-sitter/) parsing library. To use this crate, add it to the `[dependencies]` section of your `Cargo.toml` file: | ||
|
||
```toml | ||
tree-sitter = "0.22" | ||
tree-sitter-kotlin = "0.3.7" | ||
``` | ||
|
||
Typically, you will use the `language` function to add this grammar to a tree-sitter [`Parser`](https://docs.rs/tree-sitter/*/tree_sitter/struct.Parser.html), and then use the parser to parse some code: | ||
|
||
```rust | ||
let code = r#" | ||
data class Point( | ||
val x: Int, | ||
val y: Int | ||
) | ||
"#; | ||
let mut parser = Parser::new(); | ||
parser.set_language(&tree_sitter_kotlin::language()).expect("Error loading Kotlin grammar"); | ||
let parsed = parser.parse(code, None); | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason for removing this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's redundant. The same example is in the docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, but I still think having a README.md
on the crate is friendlier than not having one. I would like to keep it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It has the main readme like the other packages.
Add the new standard bindings introduced upstream