6 releases (breaking)

new 0.5.0 Jan 23, 2025
0.4.0 Jan 23, 2025
0.3.0 Jan 23, 2025
0.2.0 Jan 22, 2025
0.0.1 Aug 21, 2024

#400 in Text editors

Download history 4/week @ 2024-12-04 11/week @ 2024-12-11 591/week @ 2025-01-22

591 downloads per month

Apache-2.0

505KB
19K SLoC

C 19K SLoC Scheme 143 SLoC JavaScript 60 SLoC Rust 29 SLoC // 0.3% comments

tree-sitter-jinja

tree-sitter grammar for Jinja.

[!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–4MB
~80K SLoC