2 stable releases
1.0.2 | Feb 23, 2025 |
---|
#2345 in Parser implementations
261 downloads per month
Used in tjq
330KB
13K
SLoC
tree-sitter-jq
Jq language grammar for tree-sitter.
References
lib.rs
:
This crate provides Jq 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:
let code = r#"
"#;
let mut parser = tree_sitter::Parser::new();
let language = tree_sitter_jq::LANGUAGE;
parser
.set_language(&language.into())
.expect("Error loading Jq parser");
let tree = parser.parse(code, None).unwrap();
assert!(!tree.root_node().has_error());
Dependencies
~4–310KB