#tree-sitter #parser #incremental #jinja-inline

tree-sitter-jinja-inline

JinjaInline grammar for tree-sitter

8 releases (breaking)

new 0.7.1 Mar 2, 2025
0.7.0 Mar 2, 2025
0.5.0 Jan 23, 2025
0.4.0 Jan 23, 2025
0.0.1 Aug 21, 2024

#416 in Text editors

Download history 2/week @ 2024-12-04 5/week @ 2024-12-11 401/week @ 2025-01-22 2/week @ 2025-02-05 278/week @ 2025-02-26

280 downloads per month

Apache-2.0

535KB
24K SLoC

C 24K SLoC Scheme 127 SLoC Rust 29 SLoC // 0.3% comments JavaScript 22 SLoC

tree-sitter-jinja

Jinja and Jinja inline grammar for tree-sitter.

[!NOTE] inline statement starts with # .


lib.rs:

This crate provides JinjaInline 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_inline::language()).expect("Error loading JinjaInline grammar");
let tree = parser.parse(code, None).unwrap();
assert!(!tree.root_node().has_error());

Dependencies

~2.8–4.5MB
~83K SLoC