#regex #parser #incremental

tree-sitter-regex

Regex grammar for the tree-sitter parsing library

1 unstable release

0.20.0 Jul 19, 2023

#151 in #parsing

Download history 257/week @ 2024-01-15 827/week @ 2024-01-22 523/week @ 2024-01-29 134/week @ 2024-02-05 177/week @ 2024-02-12 119/week @ 2024-02-19 131/week @ 2024-02-26 50/week @ 2024-03-04 1140/week @ 2024-03-18 1091/week @ 2024-03-25 1020/week @ 2024-04-01 1593/week @ 2024-04-08 1724/week @ 2024-04-15

5,554 downloads per month
Used in 2 crates

MIT license

94KB
3K SLoC

C 2.5K SLoC JavaScript 129 SLoC // 0.2% comments Scheme 43 SLoC Rust 32 SLoC // 0.4% comments

tree-sitter-regex

Build Status

Regex grammar for tree-sitter


lib.rs:

This crate provides regex 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_regex::language()).expect("Error loading regex grammar");
let tree = parser.parse(code, None).unwrap();

Dependencies

~2.8–4MB
~72K SLoC