Expand description
This crate provides Zo language support for the tree-sitter parsing library.
Typically, you will use the LANGUAGE constant to add this language to a tree-sitter Parser, and then use the parser to parse some code:
use tree_sitter::Parser;
let code = r#"
fun add(a: int, b: int) -> int {
a + b
}
"#;
let mut parser = Parser::new();
let language = tree_sitter_zo::LANGUAGE;
parser
.set_language(&language.into())
.expect("Error loading Zo parser");
let tree = parser.parse(code, None).unwrap();
assert!(!tree.root_node().has_error());Constantsยง
- HIGHLIGHTS_
QUERY - The syntax highlighting query for this language.
- LANGUAGE
- The tree-sitter
LanguageFnfor the Zo grammar. - LOCALS_
QUERY - The locals query for this language.
- NODE_
TYPES - The content of the [
node-types.json] file for this grammar. - TAGS_
QUERY - The symbol tagging query for this language.