|
1 | | -; Document and structure (from Lucee-style rules) |
2 | | -(program) @document |
3 | | -(doctype) @doctype |
| 1 | +(doctype) @constant |
4 | 2 | (entity) @constant |
5 | | -(html_text) @text |
6 | 3 |
|
7 | | -(erroneous_end_tag_name) @tag.error |
8 | | -(erroneous_cf_end_tag_name) @tag.error |
| 4 | +(erroneous_end_tag_name) @tag |
| 5 | +(erroneous_cf_end_tag_name) @tag |
9 | 6 | (attribute_name) @attribute |
10 | 7 | (cf_attribute_name) @attribute |
11 | 8 | (attribute_value) @string |
12 | | -(raw_text) @embedded |
13 | 9 | (start_tag) @tag |
14 | 10 | (end_tag) @tag |
15 | 11 | (self_closing_tag) @tag |
|
35 | 31 | (identifier) @variable |
36 | 32 |
|
37 | 33 | ; CFML scopes (variables, session, etc.) |
38 | | -(cf_scope_identifier) @namespace |
| 34 | +(cf_scope_identifier) @variable.special |
39 | 35 |
|
40 | 36 | ; Properties |
41 | 37 | ;----------- |
|
48 | 44 | ;-------------------------------- |
49 | 45 |
|
50 | 46 | (function_expression |
51 | | - name: (identifier) @function) @definition.function |
| 47 | + name: (identifier) @function) |
52 | 48 |
|
53 | 49 | (function_declaration |
54 | 50 | name: (identifier) @function) |
55 | 51 |
|
56 | 52 | (function_declaration |
57 | | - (access_type) @access_type) |
| 53 | + (access_type) @keyword) |
58 | 54 |
|
59 | 55 | (function_declaration |
60 | | - (return_type) @return_type) |
| 56 | + (return_type) @type) |
61 | 57 |
|
62 | 58 | (method_definition |
63 | 59 | name: [ |
|
77 | 73 | key: (property_identifier) @function.method |
78 | 74 | value: (arrow_function)) |
79 | 75 |
|
80 | | -(array) @expression |
| 76 | +(array) @variable |
81 | 77 |
|
82 | 78 | (cf_set_tag) @tag |
83 | 79 |
|
|
111 | 107 | ;-------------------------- |
112 | 108 |
|
113 | 109 | (call_expression |
114 | | - function: (identifier) @function.call) |
| 110 | + function: (identifier) @function) |
115 | 111 |
|
116 | 112 | (call_expression |
117 | 113 | function: (member_expression |
118 | 114 | property: [ |
119 | 115 | (property_identifier) |
120 | 116 | (private_property_identifier) |
121 | | - ] @function.method.call)) |
| 117 | + ] @function.method)) |
122 | 118 |
|
123 | 119 | ; Literals |
124 | 120 | ;--------- |
125 | | -((identifier) @variable.builtin |
126 | | - (#eq? @variable.builtin "self")) |
| 121 | +((identifier) @variable.special |
| 122 | + (#eq? @variable.special "self")) |
127 | 123 |
|
128 | | -(this) @variable.builtin |
129 | | -(super) @variable.builtin |
| 124 | +(this) @variable.special |
| 125 | +(super) @variable.special |
130 | 126 |
|
131 | 127 | (cf_var) @keyword |
132 | 128 |
|
|
138 | 134 | [ |
139 | 135 | (null) |
140 | 136 | (undefined) |
141 | | -] @constant.builtin |
| 137 | +] @constant.special |
142 | 138 |
|
143 | 139 | [ |
144 | 140 | (comment) |
145 | 141 | (cf_comment) |
146 | | -] @comment @spell |
147 | | - |
148 | | -((comment) @comment.documentation |
149 | | - (#lua-match? @comment.documentation "^/[*][*][^*].*[*]/$")) |
| 142 | +] @comment |
150 | 143 |
|
151 | | -((string_fragment) @keyword.directive |
152 | | - (#eq? @keyword.directive "use strict")) |
| 144 | +((comment) @comment.doc |
| 145 | + (#lua-match? @comment.doc "^/[*][*][^*].*[*]/$")) |
153 | 146 |
|
154 | 147 | (string) @string |
155 | 148 | (text) @string |
156 | 149 | (hash_empty) @punctuation.special |
157 | 150 |
|
158 | | -(regex_pattern) @string.regexp |
159 | | -(regex_flags) @character.special |
| 151 | +(regex_pattern) @string.regex |
| 152 | +(regex_flags) @string.special |
160 | 153 |
|
161 | 154 | (regex |
162 | | - "/" @punctuation.bracket) ; Regex delimiters |
| 155 | + "/" @punctuation.bracket) |
163 | 156 |
|
164 | 157 | (number) @number |
165 | 158 |
|
|
189 | 182 | [ |
190 | 183 | "?" |
191 | 184 | ":" |
192 | | - ] @keyword.conditional.ternary) |
| 185 | + ] @operator) |
193 | 186 |
|
194 | 187 | (elvis_expression |
195 | | - "?:" @keyword.conditional.ternary) |
| 188 | + "?:" @operator) |
196 | 189 |
|
197 | 190 | [ |
198 | 191 | "-" |
|
0 commit comments