-//! 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:
//! ```
//! 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();
//! ```
//!
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.
let mut parser = tree_sitter::Parser::new();
parser
.set_language(super::language())
- .expect("Error loading apinotation language");
+ .expect("Error loading api-notation language");
}
}