X-Git-Url: https://git.r.bdr.sh/rbdr/tree-sitter-api-notation/blobdiff_plain/dc87cd894bad9ad0202dcd4a89e7d0af47c53fc9..3f76f5f4a42a1b233c6c3a981cea0a4186dc6fb0:/bindings/rust/lib.rs?ds=sidebyside diff --git a/bindings/rust/lib.rs b/bindings/rust/lib.rs index ee3d344..7bc923a 100644 --- a/bindings/rust/lib.rs +++ b/bindings/rust/lib.rs @@ -1,4 +1,4 @@ -//! This crate provides apinotation language support for the [tree-sitter][] parsing library. +//! This crate provides api-notation 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: @@ -6,7 +6,7 @@ //! ``` //! let code = ""; //! let mut parser = tree_sitter::Parser::new(); -//! parser.set_language(tree_sitter_apinotation::language()).expect("Error loading apinotation grammar"); +//! parser.set_language(tree_sitter_api_notation::language()).expect("Error loading api-notation grammar"); //! let tree = parser.parse(code, None).unwrap(); //! ``` //! @@ -18,14 +18,14 @@ use tree_sitter::Language; extern "C" { - fn tree_sitter_apinotation() -> Language; + fn tree_sitter_api_notation() -> 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_apinotation() } + unsafe { tree_sitter_api_notation() } } /// 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 apinotation language"); + .expect("Error loading api-notation language"); } }