10 releases (6 breaking)

0.6.4 Mar 12, 2025
0.6.3 Mar 10, 2025
0.5.0 Jan 23, 2025
0.4.0 Jan 23, 2025
0.0.1 Aug 21, 2024

#2747 in Parser implementations

Download history 14/week @ 2024-12-07 1/week @ 2024-12-14 345/week @ 2025-01-18 60/week @ 2025-01-25 3/week @ 2025-02-01 1/week @ 2025-02-22 294/week @ 2025-03-01 240/week @ 2025-03-08 49/week @ 2025-03-15

584 downloads per month

Apache-2.0

480KB
20K SLoC

C 20K SLoC Scheme 143 SLoC JavaScript 68 SLoC Rust 32 SLoC // 0.2% comments

tree-sitter-jinja

Jinja and Jinja inline grammar for tree-sitter.

[!NOTE] inline statement starts with # .


lib.rs:

This crate provides Jinja 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 = r#"
"#;
let mut parser = tree_sitter::Parser::new();
parser.set_language(&tree_sitter_jinja::language()).expect("Error loading Jinja grammar");
let tree = parser.parse(code, None).unwrap();
assert!(!tree.root_node().has_error());

Dependencies

~3–4.5MB
~82K SLoC