12 releases (7 breaking)

0.7.0 Jun 25, 2025
0.6.4 Mar 12, 2025
0.0.1 Aug 21, 2024

#538 in Text editors

Download history 171/week @ 2025-03-12 157/week @ 2025-04-16 4/week @ 2025-04-23 7/week @ 2025-05-07 2/week @ 2025-05-14 138/week @ 2025-06-25

138 downloads per month

Apache-2.0

485KB
21K SLoC

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

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());

tree-sitter-jinja

PyPI - Version PyPI - Version Crates.io Version Crates.io Version

Jinja and Jinja inline grammar for tree-sitter.

[!NOTE] inline statement starts with # .

Dependencies

~2.9–4.5MB
~81K SLoC