4 releases (2 breaking)
0.2.0 | May 9, 2024 |
---|---|
0.1.2 |
|
0.1.1 | Jun 24, 2022 |
0.1.0 | May 20, 2022 |
0.0.1 | Apr 29, 2022 |
#2781 in Parser implementations
946 downloads per month
Used in 2 crates
(via cql3-parser)
730KB
23K
SLoC
Usage
Add the following line to Cargo.toml
.
tree-sitter-cql = "0.0.1"
Regenerate
- Make changes to grammar.js
- Run
cargo install tree-sitter-cli
- Ensure that
.cargo/bin
is in your $PATH - Install nodejs. Possibly
pacman -Syu nodejs
orapt-get install nodejs
. - Run
tree-sitter generate
lib.rs
:
This crate provides cql 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_cql::language()).expect("Error loading cql grammar");
let tree = parser.parse(code, None).unwrap();
Dependencies
~2.8–4MB
~76K SLoC