|
21 | 21 | { |
22 | 22 | "include": "#separator" |
23 | 23 | }, |
| 24 | + { |
| 25 | + "include": "#loop_identifier" |
| 26 | + }, |
24 | 27 | { |
25 | 28 | "include": "#comments" |
26 | 29 | }, |
|
79 | 82 | "begin": "(\\$\\()", |
80 | 83 | "beginCaptures": { |
81 | 84 | "1": { |
82 | | - "name": "keyword.variable.substitutor.nss" |
| 85 | + "name": "constant.character.nss" |
83 | 86 | } |
84 | 87 | }, |
85 | 88 | "end": "(\\))", |
86 | 89 | "endCaptures": { |
87 | 90 | "1": { |
88 | | - "name": "keyword.variable.substitutor.nss" |
| 91 | + "name": "constant.character.nss" |
89 | 92 | } |
90 | 93 | }, |
91 | 94 | "patterns": [ |
|
106 | 109 | }, |
107 | 110 | { |
108 | 111 | "match": "\\|+|(?<!@.*|=)=", |
109 | | - "name": "keyword.variable.substitutor.nss" |
| 112 | + "name": "constant.character.nss" |
110 | 113 | }, |
111 | 114 | { |
112 | 115 | "include": "#variable" |
|
123 | 126 | ] |
124 | 127 | }, |
125 | 128 | "parameter": { |
126 | | - "match": "(\\$\\[)(.+?)(\\|.*?)?(?:(\\s//.+$)|(\\]))", |
| 129 | + "match": "(\\$\\[)(.+?)(\\|(.*?))?(?:(\\s//.+$)|(\\]))", |
127 | 130 | "captures": { |
128 | 131 | "1": { |
129 | | - "name": "keyword.variable.substitutor.nss" |
| 132 | + "name": "constant.character.nss" |
130 | 133 | }, |
131 | 134 | "2": { |
132 | 135 | "name": "keyword.control.variable.attribute.nss" |
133 | 136 | }, |
134 | 137 | "3": { |
135 | | - "name": "invalid.illegal.nss" |
| 138 | + "name": "constant.character.nss" |
136 | 139 | }, |
137 | 140 | "4": { |
138 | | - "name": "comment.inline.nss" |
| 141 | + "name": "constant.character.escape.default_argument.nss" |
139 | 142 | }, |
140 | 143 | "5": { |
141 | | - "name": "keyword.variable.substitutor.nss" |
| 144 | + "name": "comment.inline.nss" |
| 145 | + }, |
| 146 | + "6": { |
| 147 | + "name": "constant.character.nss" |
142 | 148 | } |
143 | 149 | } |
144 | 150 | }, |
| 151 | + "loop_identifier": { |
| 152 | + "match": "\\$i|\\$v\\[?|(?<=\\$v\\[[^\\]]*?)\\]", |
| 153 | + "name": "keyword.variable.identifier.loop.nss" |
| 154 | + }, |
145 | 155 | "comments": { |
146 | 156 | "patterns": [ |
147 | 157 | { |
148 | | - "match": "(?<!:)//.*$", |
| 158 | + "match": "##!.*", |
| 159 | + "name": "comment.block.documentation" |
| 160 | + }, |
| 161 | + { |
| 162 | + "match": "(?<![a-z]+:)//.*$", |
149 | 163 | "name": "comment.inline.nss" |
150 | 164 | }, |
| 165 | + { |
| 166 | + "match": "(/\\*/)(.*?)(/\\*/)", |
| 167 | + "captures": { |
| 168 | + "1": { |
| 169 | + "name": "comment.static.nss" |
| 170 | + }, |
| 171 | + "2": { |
| 172 | + "name": "markup.italic.content.nss" |
| 173 | + }, |
| 174 | + "3": { |
| 175 | + "name": "comment.static.nss" |
| 176 | + } |
| 177 | + } |
| 178 | + }, |
| 179 | + { |
| 180 | + "match": "(/\\*\\[|\\]\\*/)", |
| 181 | + "name": "comment.block.css" |
| 182 | + }, |
151 | 183 | { |
152 | 184 | "match": "/\\*.*?\\*/", |
153 | 185 | "name": "comment.block.css" |
|
156 | 188 | }, |
157 | 189 | "css": { |
158 | 190 | "patterns": [ |
| 191 | + { |
| 192 | + "match": "[a-z]+://\\w+(\\.\\w+)+(/\\S+?)?(?!\\))", |
| 193 | + "name": "markup.underline.link" |
| 194 | + }, |
159 | 195 | { |
160 | 196 | "match": "([^@{}]*){", |
161 | 197 | "captures": { |
|
201 | 237 | }, |
202 | 238 | { |
203 | 239 | "match": "!\\s*important", |
204 | | - "name": "string.regexp" |
| 240 | + "name": "string.regexp.important.css" |
205 | 241 | } |
206 | 242 | ] |
207 | 243 | }, |
|
216 | 252 | "name": "keyword.constant.logic.nss" |
217 | 253 | }, |
218 | 254 | { |
219 | | - "match": "[-:;,.+~^*/!%(){}a-zA-Z]", |
220 | | - "name": "entity.constant.character" |
| 255 | + "match": "(?<=\\d\\s*)(em|rem|en|ex|px|pt|pc|cm|mm|m|ft|in|%)\\b", |
| 256 | + "name": "constant.numeric.unit.css" |
| 257 | + }, |
| 258 | + { |
| 259 | + "match": "\\d+e\\d+", |
| 260 | + "name": "constant.numeric.css" |
221 | 261 | }, |
222 | 262 | { |
223 | | - "match": "[0-9]", |
| 263 | + "match": "0x[0-9a-f]*\\.?[0-9a-f]+|0b[01]*\\.?[01]+|0o[0-7]*\\.?[0-7]+|[0-9]*\\.?[0-9]+", |
224 | 264 | "name": "constant.numeric.css" |
| 265 | + }, |
| 266 | + { |
| 267 | + "match": "[-:;,.+~^*/!%(){}a-zA-Z]", |
| 268 | + "name": "entity.constant.character" |
225 | 269 | } |
226 | 270 | ] |
227 | 271 | } |
|
0 commit comments