1 unstable release

0.1.0 Mar 10, 2023

#103 in #query-language

Download history 40/week @ 2024-03-13 44/week @ 2024-03-20 48/week @ 2024-03-27 48/week @ 2024-04-03 112/week @ 2024-04-10 40/week @ 2024-04-17 28/week @ 2024-04-24 16/week @ 2024-05-01 26/week @ 2024-05-08 90/week @ 2024-05-15 36/week @ 2024-05-22 42/week @ 2024-05-29 67/week @ 2024-06-05 53/week @ 2024-06-12 23/week @ 2024-06-19 44/week @ 2024-06-26

196 downloads per month
Used in 4 crates (3 directly)

Apache-2.0

165KB
6.5K SLoC

C 6.5K SLoC JavaScript 129 SLoC // 0.0% comments Rust 31 SLoC // 0.5% comments

tree-sitter-query

A tree-sitter parser for tree-sitter query files (scheme-like).


lib.rs:

This crate provides query language support for the tree-sitter parsing library.

Typically, you will use the language 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_javascript::language()).expect("Error loading query grammar");
let tree = parser.parse(code, None).unwrap();

Dependencies

~2.7–4MB
~71K SLoC