Skip to content

Commit

Permalink
chore: update manifests and README
Browse files Browse the repository at this point in the history
  • Loading branch information
amaanq committed Aug 12, 2023
1 parent 751ff30 commit 9cbc896
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 18 deletions.
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[package]
name = "tree-sitter-bash"
description = "bash grammar for the tree-sitter parsing library"
description = "Bash grammar for tree-sitter"
version = "0.19.0"
keywords = ["incremental", "parsing", "bash"]
categories = ["parsing", "text-editors"]
repository = "https://github.com/tree-sitter/tree-sitter-bash"
edition = "2018"
edition = "2021"
license = "MIT"
authors = [
"Max Brunsfeld <[email protected]",
Expand All @@ -23,7 +23,7 @@ include = [
path = "bindings/rust/lib.rs"

[dependencies]
tree-sitter = ">= 0.19, < 0.21"
tree-sitter = "~0.20.10"

[build-dependencies]
cc = "1.0"
cc = "^1.0"
22 changes: 13 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,32 @@
tree-sitter-bash
================
# tree-sitter-bash

[![Build Status](https://travis-ci.org/tree-sitter/tree-sitter-bash.svg?branch=master)](https://travis-ci.org/tree-sitter/tree-sitter-bash)
[![Build status](https://ci.appveyor.com/api/projects/status/9mbap95nldligssx/branch/master?svg=true)](https://ci.appveyor.com/project/maxbrunsfeld/tree-sitter-bash/branch/master)
[![CI](https://github.com/tree-sitter/tree-sitter-c/actions/workflows/ci.yml/badge.svg)](https://github.com/tree-sitter/tree-sitter-c/actions/workflows/ci.yml)

Bash grammar for [tree-sitter](https://github.com/tree-sitter/tree-sitter).

### Development
## Development

Install the dependencies:

```sh
npm install
```

Build and run the tests:

```sh
npm run build
npm run test
```

Run the build and tests in watch mode:

```sh
npm run test:watch
```

#### References
### References

* [Bash man page](http://man7.org/linux/man-pages/man1/bash.1.html#SHELL_GRAMMAR)
* [Shell command language specification](http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html)
* [mvdnan/sh - a shell parser in go](https://github.com/mvdan/sh)
- [Bash man page](http://man7.org/linux/man-pages/man1/bash.1.html#SHELL_GRAMMAR)
- [Shell command language specification](http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html)
- [mvdnan/sh - a shell parser in go](https://github.com/mvdan/sh)
10 changes: 5 additions & 5 deletions bindings/rust/lib.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
//! This crate provides bash language support for the [tree-sitter][] parsing library.
//! This crate provides Bash language support for the [tree-sitter][] parsing library.
//!
//! Typically, you will use the [language][language func] function to add this language to a
//! tree-sitter [Parser][], and then use the parser to parse some code:
//!
//! ```
//! let code = "";
//! let mut parser = tree_sitter::Parser::new();
//! parser.set_language(tree_sitter_bash::language()).expect("Error loading bash grammar");
//! parser.set_language(tree_sitter_bash::language()).expect("Error loading Bash grammar");
//! let tree = parser.parse(code, None).unwrap();
//! ```
//!
Expand All @@ -31,11 +31,11 @@ pub fn language() -> Language {
/// The content of the [`node-types.json`][] file for this grammar.
///
/// [`node-types.json`]: https://tree-sitter.github.io/tree-sitter/using-parsers#static-node-types
pub const NODE_TYPES: &'static str = include_str!("../../src/node-types.json");
pub const NODE_TYPES: &str = include_str!("../../src/node-types.json");

// Uncomment these to include any queries that this grammar contains

pub const HIGHLIGHT_QUERY: &'static str = include_str!("../../queries/highlights.scm");
pub const HIGHLIGHT_QUERY: &str = include_str!("../../queries/highlights.scm");
// pub const INJECTIONS_QUERY: &'static str = include_str!("../../queries/injections.scm");
// pub const LOCALS_QUERY: &'static str = include_str!("../../queries/locals.scm");
// pub const TAGS_QUERY: &'static str = include_str!("../../queries/tags.scm");
Expand All @@ -47,6 +47,6 @@ mod tests {
let mut parser = tree_sitter::Parser::new();
parser
.set_language(super::language())
.expect("Error loading bash language");
.expect("Error loading Bash grammar");
}
}

0 comments on commit 9cbc896

Please sign in to comment.