#tree-sitter #duat #parser #incremental-parser #duat-text

tree-sitter-duat-text

Parsing for string literals in the text! family of macros from Duat

1 unstable release

new 0.1.0 Apr 30, 2025

#1291 in Parser implementations

MIT license

32KB
927 lines

tree-sitter-duat-text

Duat's text! macros grammar for tree-sitter.


lib.rs:

This crate provides DuatText 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_duat_text::LANGUAGE;
parser
    .set_language(&language.into())
    .expect("Error loading DuatText parser");
let tree = parser.parse(code, None).unwrap();
assert!(!tree.root_node().has_error());

Dependencies

~4–280KB