Rename to 'tree-sitter-bp'
All checks were successful
ci/woodpecker/push/check Pipeline was successful
All checks were successful
ci/woodpecker/push/check Pipeline was successful
This is really just to simplify my life and align with the Vim/NeoVim filetype name.
This commit is contained in:
parent
f6e1266493
commit
ebb642cb14
12 changed files with 24 additions and 24 deletions
|
|
@ -1,4 +1,4 @@
|
|||
//! This crate provides blueprint support for the [tree-sitter][] parsing library.
|
||||
//! This crate provides bp 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:
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
//! ```
|
||||
//! let code = "";
|
||||
//! let mut parser = tree_sitter::Parser::new();
|
||||
//! parser.set_language(tree_sitter_blueprint::language()).expect("Error loading txtpb grammar");
|
||||
//! parser.set_language(tree_sitter_bp::language()).expect("Error loading txtpb grammar");
|
||||
//! let tree = parser.parse(code, None).unwrap();
|
||||
//! ```
|
||||
//!
|
||||
|
|
@ -18,14 +18,14 @@
|
|||
use tree_sitter::Language;
|
||||
|
||||
extern "C" {
|
||||
fn tree_sitter_blueprint() -> Language;
|
||||
fn tree_sitter_bp() -> Language;
|
||||
}
|
||||
|
||||
/// Get the tree-sitter [Language][] for this grammar.
|
||||
///
|
||||
/// [Language]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Language.html
|
||||
pub fn language() -> Language {
|
||||
unsafe { tree_sitter_blueprint() }
|
||||
unsafe { tree_sitter_bp() }
|
||||
}
|
||||
|
||||
/// The content of the [`node-types.json`][] file for this grammar.
|
||||
|
|
@ -47,6 +47,6 @@ mod tests {
|
|||
let mut parser = tree_sitter::Parser::new();
|
||||
parser
|
||||
.set_language(super::language())
|
||||
.expect("Error loading blueprint language");
|
||||
.expect("Error loading bp language");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue