use tree_sitter::Language;
extern "C" {
fn tree_sitter_python() -> Language;
}
pub fn language() -> Language {
unsafe { tree_sitter_python() }
}
pub const GRAMMAR: &'static str = include_str!("../languages/tree-sitter-python/grammar.js");
pub const HIGHLIGHT_QUERY: &'static str = include_str!("../languages/tree-sitter-python/queries/highlights.scm");
pub const NODE_TYPES: &'static str = include_str!("../languages/tree-sitter-python/src/node-types.json");
pub const TAGGING_QUERY: &'static str = include_str!("../languages/tree-sitter-python/queries/tags.scm");
#[cfg(test)]
mod tests {
#[test]
fn can_load_grammar() {
let mut parser = tree_sitter::Parser::new();
parser
.set_language(super::language())
.expect("Error loading Python grammar");
}
}