X-Git-Url: https://git.r.bdr.sh/rbdr/tree-sitter-api-notation/blobdiff_plain/dc87cd894bad9ad0202dcd4a89e7d0af47c53fc9..b95c61865da09bf2e98eeb62c82c914f21e36903:/bindings/rust/lib.rs diff --git a/bindings/rust/lib.rs b/bindings/rust/lib.rs index ee3d344..0bbddda 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"); } }