#cql #parser #incremental

bin+lib tree-sitter-cql

cql grammar for the tree-sitter parsing library

3 unstable releases

0.1.1 Jun 24, 2022
0.1.0 May 20, 2022
0.0.1 Apr 29, 2022

#295 in Text editors

Download history 159/week @ 2023-12-07 127/week @ 2023-12-14 201/week @ 2023-12-21 6/week @ 2023-12-28 359/week @ 2024-01-04 130/week @ 2024-01-11 134/week @ 2024-01-18 263/week @ 2024-01-25 232/week @ 2024-02-01 373/week @ 2024-02-08 312/week @ 2024-02-15 314/week @ 2024-02-22 201/week @ 2024-02-29 170/week @ 2024-03-07 243/week @ 2024-03-14 218/week @ 2024-03-21

891 downloads per month
Used in 2 crates (via cql3-parser)

MIT license

720KB
22K SLoC

C 21K SLoC JavaScript 865 SLoC Rust 164 SLoC // 0.3% comments

Usage

Add the following line to Cargo.toml.

tree-sitter-cql = "0.0.1"

Regenerate

  1. Make changes to grammar.js
  2. Run cargo install tree-sitter-cli
  3. Ensure that .cargo/bin is in your $PATH
  4. Install nodejs. Possibly pacman -Syu nodejs or apt-get install nodejs.
  5. 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
~71K SLoC