add rules for each tag block, and renamed some rules
This commit is contained in:
1 parent
db3caa1672
commit
f2d3a727f6
43 files changed
+20760
-27453
No files matched your search
+4
-2
@@ -22,7 +22,9 @@
|
||||
; rather than a narrower scope in locals.scm.
|
||||
|
||||
(blocktrans_clause
|
||||
asvar: (identifier) @export.name) @export.from
|
||||
(blocktrans_block
|
||||
asvar: (identifier) @export.name)) @export.from
|
||||
|
||||
(blocktranslate_clause
|
||||
asvar: (identifier) @export.name) @export.from
|
||||
(blocktranslate_block
|
||||
asvar: (identifier) @export.name)) @export.from
|
||||
@@ -4,13 +4,13 @@
|
||||
variable: (identifier) @variable.parameter
|
||||
|
||||
|
||||
(block_clause
|
||||
(block_block
|
||||
(push_block) @type)
|
||||
|
||||
(partialdef_clause
|
||||
(partialdef_block
|
||||
(push_partial) @type)
|
||||
|
||||
(verbatim_clause
|
||||
(verbatim_block
|
||||
(push_verbatim) @type)
|
||||
|
||||
(comment_content) @comment
|
||||
@@ -192,8 +192,8 @@ tag: [
|
||||
(filter
|
||||
name: (identifier) @function.call)
|
||||
|
||||
(custom_tag
|
||||
(custom_tag_block
|
||||
tag: (identifier) @function.call)
|
||||
|
||||
(load
|
||||
(load_block
|
||||
(identifier) @function)
|
||||
+19
-19
@@ -15,42 +15,42 @@
|
||||
; heads, so that the capture is both the name to look up and the range to
|
||||
; report. A paired tag names the opening tag only.
|
||||
|
||||
(static
|
||||
(static_block
|
||||
tag: ("static") @library.static)
|
||||
|
||||
(get_static_prefix
|
||||
(get_static_prefix_block
|
||||
tag: ("get_static_prefix") @library.static)
|
||||
|
||||
(get_media_prefix
|
||||
(get_media_prefix_block
|
||||
tag: ("get_media_prefix") @library.static)
|
||||
|
||||
(blocktrans_clause
|
||||
(blocktrans_block
|
||||
tag: ("blocktrans") @library.i18n)
|
||||
|
||||
(blocktranslate_clause
|
||||
(blocktranslate_block
|
||||
tag: ("blocktranslate") @library.i18n)
|
||||
|
||||
(translate
|
||||
(translate_block
|
||||
tag: [
|
||||
("trans")
|
||||
("translate")] @library.i18n)
|
||||
|
||||
(language_clause
|
||||
(language_block
|
||||
tag: ("language") @library.i18n)
|
||||
|
||||
(get_available_languages
|
||||
(get_available_languages_block
|
||||
tag: ("get_available_languages") @library.i18n)
|
||||
|
||||
(get_current_language
|
||||
(get_current_language_block
|
||||
tag: ("get_current_language") @library.i18n)
|
||||
|
||||
(get_current_language_bidi
|
||||
(get_current_language_bidi_block
|
||||
tag: ("get_current_language_bidi") @library.i18n)
|
||||
|
||||
(get_language_info
|
||||
(get_language_info_block
|
||||
tag: ("get_language_info") @library.i18n)
|
||||
|
||||
(get_language_info_list
|
||||
(get_language_info_list_block
|
||||
tag: ("get_language_info_list") @library.i18n)
|
||||
|
||||
(filter
|
||||
@@ -60,10 +60,10 @@
|
||||
("language_name_local")
|
||||
("language_name_translated")] @library.i18n)
|
||||
|
||||
(cache_clause
|
||||
(cache_block
|
||||
tag: ("cache") @library.cache)
|
||||
|
||||
(localize_clause
|
||||
(localize_block
|
||||
tag: ("localize") @library.l10n)
|
||||
|
||||
(filter
|
||||
@@ -71,13 +71,13 @@
|
||||
("localize")
|
||||
("unlocalize")] @library.l10n)
|
||||
|
||||
(localtime_clause
|
||||
(localtime_block
|
||||
tag: ("localtime") @library.tz)
|
||||
|
||||
(timezone_clause
|
||||
(timezone_block
|
||||
tag: ("timezone") @library.tz)
|
||||
|
||||
(get_current_timezone
|
||||
(get_current_timezone_block
|
||||
tag: ("get_current_timezone") @library.tz)
|
||||
|
||||
(filter
|
||||
@@ -88,8 +88,8 @@
|
||||
|
||||
; "{% load static %}" makes every name in the library available; "{% load
|
||||
; static from staticfiles %}" makes only the names listed available.
|
||||
(load
|
||||
(load_block
|
||||
(library) @load.library)
|
||||
|
||||
(load
|
||||
(load_block
|
||||
(identifier) @load.name)
|
||||
+14
-11
@@ -1,17 +1,20 @@
|
||||
(load
|
||||
(load_block
|
||||
(identifier) @name) @definition.function
|
||||
|
||||
(partialdef_clause (push_partial) @name) @definition.method
|
||||
(partial (identifier) @name) @reference.call
|
||||
(partialdef_block (push_partial) @name) @definition.method
|
||||
(partial_block (identifier) @name) @reference.call
|
||||
|
||||
; every tag that opens a group names itself in a clause of its own, and every
|
||||
; tag that does not is a group member directly
|
||||
(template_block_groups
|
||||
[
|
||||
; a tag that opens no body names itself; a group is named by the first block of
|
||||
; its first clause, so neither its end block nor the blocks opening its later
|
||||
; clauses are references of their own
|
||||
(tag_block_group
|
||||
tag: _ @name) @reference.call
|
||||
|
||||
(tag_block_group
|
||||
.
|
||||
(_
|
||||
.
|
||||
(_
|
||||
tag: _ @name)
|
||||
(_
|
||||
(_
|
||||
tag: _ @name))] @reference.call)
|
||||
tag: _ @name))) @reference.call
|
||||
|
||||
(filter) @reference.call
|
||||
Reference in new issue
Block a user