add cache

This commit is contained in:
danhanson committed 2026-09-07 15:20:21 -05:00
1 parent 7e71c5e3ae
commit 709a33f52d
8 files changed
+40910 -35539

No files matched your search

+14
View File
@@ -247,6 +247,7 @@ const NAMES_INSIDE_A_TAG_GROUP = [
"empty",
"endautoescape",
"endblock",
"endcache",
"endcomment",
"endfilter",
"endfor",
@@ -378,6 +379,7 @@ const django = grammar({
choice(
$.autoescape_group,
$.block_group,
$.cache_group,
$.comment_group,
$.csp_nonce_attr,
$.csrf_token,
@@ -461,6 +463,18 @@ const django = grammar({
optional($.template),
block("endblock", $.pop_block),
),
cache_group: ($) =>
seq(
block(
"cache",
part($.filtered_value),
part(choice($.identifier, $.string)),
repeat(part($.filtered_value)),
optional(part(seq("using=", $.filtered_value))),
),
optional($.template),
block("endcache"),
),
comment_group: ($) =>
seq(
block("comment", optional(part($.string))),