fix(jinja): remove crashing pattern

https://github.com/cathaysia/tree-sitter-jinja/issues/37
This commit is contained in:
Christian Clason
2025-07-21 11:00:40 +02:00
committed by Christian Clason
parent 6b3bf164b2
commit 8c8742871a
2 changed files with 8 additions and 27 deletions

View File

@@ -125,14 +125,14 @@
"."
(identifier)+ @variable.member)
; jinja filters
(binary_expression
(binary_operator
"|")
(unary_expression
(primary_expression
(identifier) @function.call)))
; crashes parser: https://github.com/cathaysia/tree-sitter-jinja/issues/37
; ; jinja filters
; (binary_expression
; (binary_operator
; "|")
; (unary_expression
; (primary_expression
; (identifier) @function.call)))
(inline_trans
"_" @function.builtin)

View File

@@ -1,19 +0,0 @@
{{ name|striptags|title }}
{# ^^^^ @variable #}
{# ^^^^^ @function.call #}
{# ^^^^^ @function.call #}
{{ listx|join(', ') }}
{# ^^^^^ @variable #}
{# ^^^^ @function.call #}
{# ^^^^ @string #}
{{ listx|join(str) }}
{# ^^^^^ @variable #}
{# ^^^^ @function.call #}
{# ^^^ @variable.parameter #}
{{ foo.bar|random }}
{# ^^^ @variable #}
{# ^^^ @variable.member #}
{# ^^^^^^ @function.call #}