Skip to content

Commit c0f5797

Browse files
committed
0.20.0
1 parent 26cf636 commit c0f5797

File tree

3 files changed

+43
-13
lines changed

3 files changed

+43
-13
lines changed

Cargo.toml

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,18 @@
11
[package]
22
name = "tree-sitter-bash"
33
description = "Bash grammar for tree-sitter"
4-
version = "0.19.0"
4+
version = "0.20.0"
5+
authors = ["Max Brunsfeld <[email protected]"]
6+
license = "MIT"
7+
readme = "bindings/rust/README.md"
58
keywords = ["incremental", "parsing", "bash"]
69
categories = ["parsing", "text-editors"]
710
repository = "https://github.com/tree-sitter/tree-sitter-bash"
811
edition = "2021"
9-
license = "MIT"
10-
authors = [
11-
"Max Brunsfeld <[email protected]",
12-
]
12+
autoexamples = false
1313

1414
build = "bindings/rust/build.rs"
15-
include = [
16-
"bindings/rust/*",
17-
"grammar.js",
18-
"queries/*",
19-
"src/*",
20-
]
15+
include = ["bindings/rust/*", "grammar.js", "queries/*", "src/*"]
2116

2217
[lib]
2318
path = "bindings/rust/lib.rs"
@@ -26,4 +21,4 @@ path = "bindings/rust/lib.rs"
2621
tree-sitter = "~0.20.10"
2722

2823
[build-dependencies]
29-
cc = "^1.0"
24+
cc = "~1.0.82"

bindings/rust/README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# tree-sitter-bash
2+
3+
This crate provides a Bash grammar for the [tree-sitter][] parsing library.
4+
To use this crate, add it to the `[dependencies]` section of your `Cargo.toml`
5+
file. (Note that you will probably also need to depend on the
6+
[`tree-sitter`][tree-sitter crate] crate to use the parsed result in any useful
7+
way.)
8+
9+
```toml
10+
[dependencies]
11+
tree-sitter = "0.20.10"
12+
tree-sitter-bash = "0.20.0"
13+
```
14+
15+
Typically, you will use the [language][language func] function to add this
16+
grammar to a tree-sitter [Parser][], and then use the parser to parse some code:
17+
18+
```rust
19+
let code = r#"
20+
echo "Hello, world!"
21+
echo "Goodbye, world!"
22+
"#;
23+
let mut parser = Parser::new();
24+
parser.set_language(tree_sitter_bash::language()).expect("Error loading Bash grammar");
25+
let parsed = parser.parse(code, None);
26+
```
27+
28+
If you have any questions, please reach out to us in the [tree-sitter
29+
discussions] page.
30+
31+
[language func]: https://docs.rs/tree-sitter-bash/*/tree_sitter_bash/fn.language.html
32+
[Parser]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Parser.html
33+
[tree-sitter]: https://tree-sitter.github.io/
34+
[tree-sitter crate]: https://crates.io/crates/tree-sitter
35+
[tree-sitter discussions]: https://github.com/tree-sitter/tree-sitter/discussions

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tree-sitter-bash",
3-
"version": "0.19.0",
3+
"version": "0.20.0",
44
"description": "Bash grammar for tree-sitter",
55
"main": "bindings/node",
66
"keywords": [

0 commit comments

Comments
 (0)