Skip to content

Commit

Permalink
0.20.0
Browse files Browse the repository at this point in the history
  • Loading branch information
amaanq committed Aug 18, 2023
1 parent 26cf636 commit c0f5797
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 13 deletions.
19 changes: 7 additions & 12 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
[package]
name = "tree-sitter-bash"
description = "Bash grammar for tree-sitter"
version = "0.19.0"
version = "0.20.0"
authors = ["Max Brunsfeld <[email protected]"]
license = "MIT"
readme = "bindings/rust/README.md"
keywords = ["incremental", "parsing", "bash"]
categories = ["parsing", "text-editors"]
repository = "https://github.com/tree-sitter/tree-sitter-bash"
edition = "2021"
license = "MIT"
authors = [
"Max Brunsfeld <[email protected]",
]
autoexamples = false

build = "bindings/rust/build.rs"
include = [
"bindings/rust/*",
"grammar.js",
"queries/*",
"src/*",
]
include = ["bindings/rust/*", "grammar.js", "queries/*", "src/*"]

[lib]
path = "bindings/rust/lib.rs"
Expand All @@ -26,4 +21,4 @@ path = "bindings/rust/lib.rs"
tree-sitter = "~0.20.10"

[build-dependencies]
cc = "^1.0"
cc = "~1.0.82"
35 changes: 35 additions & 0 deletions bindings/rust/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# tree-sitter-bash

This crate provides a Bash grammar for the [tree-sitter][] parsing library.
To use this crate, add it to the `[dependencies]` section of your `Cargo.toml`
file. (Note that you will probably also need to depend on the
[`tree-sitter`][tree-sitter crate] crate to use the parsed result in any useful
way.)

```toml
[dependencies]
tree-sitter = "0.20.10"
tree-sitter-bash = "0.20.0"
```

Typically, you will use the [language][language func] function to add this
grammar to a tree-sitter [Parser][], and then use the parser to parse some code:

```rust
let code = r#"
echo "Hello, world!"
echo "Goodbye, world!"
"#;
let mut parser = Parser::new();
parser.set_language(tree_sitter_bash::language()).expect("Error loading Bash grammar");
let parsed = parser.parse(code, None);
```

If you have any questions, please reach out to us in the [tree-sitter
discussions] page.

[language func]: https://docs.rs/tree-sitter-bash/*/tree_sitter_bash/fn.language.html
[Parser]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Parser.html
[tree-sitter]: https://tree-sitter.github.io/
[tree-sitter crate]: https://crates.io/crates/tree-sitter
[tree-sitter discussions]: https://github.com/tree-sitter/tree-sitter/discussions
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tree-sitter-bash",
"version": "0.19.0",
"version": "0.20.0",
"description": "Bash grammar for tree-sitter",
"main": "bindings/node",
"keywords": [
Expand Down

0 comments on commit c0f5797

Please sign in to comment.