|
|
|
@@ -1,20 +1,22 @@
|
|
|
|
|
; Punctuation
|
|
|
|
|
"{" @punctuation.bracket
|
|
|
|
|
"}" @punctuation.bracket
|
|
|
|
|
":" @punctuation.delimiter
|
|
|
|
|
"-" @punctuation.delimiter
|
|
|
|
|
"/" @punctuation.delimiter
|
|
|
|
|
[
|
|
|
|
|
"{"
|
|
|
|
|
"}"
|
|
|
|
|
] @punctuation.bracket
|
|
|
|
|
|
|
|
|
|
[
|
|
|
|
|
":"
|
|
|
|
|
"-"
|
|
|
|
|
"/"
|
|
|
|
|
] @punctuation.delimiter
|
|
|
|
|
|
|
|
|
|
"=" @operator
|
|
|
|
|
|
|
|
|
|
; Block and lang keywords inside their tags: the literal "block" / "lang".
|
|
|
|
|
(block_keyword) @keyword.directive
|
|
|
|
|
(lang_keyword) @keyword.directive
|
|
|
|
|
[
|
|
|
|
|
(block_keyword)
|
|
|
|
|
(lang_keyword)
|
|
|
|
|
] @keyword.directive
|
|
|
|
|
|
|
|
|
|
; Block names. Known data-block names get @function.builtin; If/IfNot
|
|
|
|
|
; toggles get @keyword.conditional (theme authors may define arbitrary
|
|
|
|
|
; If* / IfNot* names via <meta name="if:..."> so we match by prefix).
|
|
|
|
|
((block_name) @keyword.conditional
|
|
|
|
|
(#match? @keyword.conditional "^[Ii]f([Nn]ot)?[A-Z]"))
|
|
|
|
|
(block_name) @function
|
|
|
|
|
|
|
|
|
|
((block_name) @function.builtin
|
|
|
|
|
(#any-of? @function.builtin
|
|
|
|
@@ -39,9 +41,12 @@
|
|
|
|
|
"Submission" "SubmissionsEnabled" "TagPage" "Tags" "Text" "Thumbnail"
|
|
|
|
|
"Title" "TrackName" "Video" "VideoThumbnail" "VideoThumbnails"))
|
|
|
|
|
|
|
|
|
|
(block_name) @function
|
|
|
|
|
; Theme authors invent new If*/IfNot* names via <meta name="if:...">.
|
|
|
|
|
((block_name) @keyword.conditional
|
|
|
|
|
(#match? @keyword.conditional "^[Ii]f([Nn]ot)?[A-Z]"))
|
|
|
|
|
|
|
|
|
|
(variable_name) @variable
|
|
|
|
|
|
|
|
|
|
; Variable names. Known builtins get @variable.builtin, others get @variable.
|
|
|
|
|
((variable_name) @variable.builtin
|
|
|
|
|
(#any-of? @variable.builtin
|
|
|
|
|
"AccentColor" "Album" "AlbumArtURL" "Alt" "AmPm" "Answer" "Answerer"
|
|
|
|
@@ -79,22 +84,15 @@
|
|
|
|
|
"URLSafeSearchQuery" "URLSafeTag" "Username" "UserNumber" "Video"
|
|
|
|
|
"VideoEmbed" "VideoThumbnailURL" "WeekOfYear" "Year"))
|
|
|
|
|
|
|
|
|
|
(variable_name) @variable
|
|
|
|
|
|
|
|
|
|
; Size suffix on URL-style variables. Numeric forms read as numbers,
|
|
|
|
|
; named forms (HighRes, Panorama, ...) as constants.
|
|
|
|
|
(variable_modifier) @constant.builtin
|
|
|
|
|
((variable_modifier) @number
|
|
|
|
|
(#match? @number "^[0-9]+(sq)?$"))
|
|
|
|
|
(variable_modifier) @constant.builtin
|
|
|
|
|
|
|
|
|
|
; text: / color: / font: / image: prefix and its argument.
|
|
|
|
|
(variable_prefix) @keyword
|
|
|
|
|
(prefix_argument) @variable
|
|
|
|
|
|
|
|
|
|
; {lang:Translatable string}
|
|
|
|
|
(lang_tag) @string.special
|
|
|
|
|
(lang_text) @string
|
|
|
|
|
|
|
|
|
|
; Block attributes: {block:Photoset rows="3"}
|
|
|
|
|
(attribute_name) @attribute
|
|
|
|
|
(attribute_value) @string
|
|
|
|
|