|
26 | 26 | <key>include</key> |
27 | 27 | <string>#head</string> |
28 | 28 | </dict> |
29 | | - <dict> |
30 | | - <key>include</key> |
31 | | - <string>#query</string> |
32 | | - </dict> |
33 | | - <dict> |
34 | | - <key>include</key> |
35 | | - <string>#expr</string> |
36 | | - </dict> |
37 | 29 | <dict> |
38 | 30 | <key>include</key> |
39 | 31 | <string>#term</string> |
40 | 32 | </dict> |
41 | 33 | </array> |
42 | 34 | <key>repository</key> |
43 | 35 | <dict> |
44 | | - <key>array</key> |
45 | | - <dict> |
46 | | - <key>begin</key> |
47 | | - <string>\[</string> |
48 | | - <key>beginCaptures</key> |
49 | | - <dict> |
50 | | - <key>0</key> |
51 | | - <dict> |
52 | | - <key>name</key> |
53 | | - <string>punctuation.definition.array.begin.rego</string> |
54 | | - </dict> |
55 | | - </dict> |
56 | | - <key>end</key> |
57 | | - <string>\]</string> |
58 | | - <key>endCaptures</key> |
59 | | - <dict> |
60 | | - <key>0</key> |
61 | | - <dict> |
62 | | - <key>name</key> |
63 | | - <string>punctuation.definition.array.end.rego</string> |
64 | | - </dict> |
65 | | - </dict> |
66 | | - <key>name</key> |
67 | | - <string>meta.structure.array.rego</string> |
68 | | - <key>patterns</key> |
69 | | - <array> |
70 | | - <dict> |
71 | | - <key>include</key> |
72 | | - <string>#term</string> |
73 | | - </dict> |
74 | | - <dict> |
75 | | - <key>match</key> |
76 | | - <string>,</string> |
77 | | - <key>name</key> |
78 | | - <string>punctuation.separator.array.rego</string> |
79 | | - </dict> |
80 | | - <dict> |
81 | | - <key>match</key> |
82 | | - <string>[^\s\]]</string> |
83 | | - <key>name</key> |
84 | | - <string>invalid.illegal.expected-array-separator.rego</string> |
85 | | - </dict> |
86 | | - </array> |
87 | | - </dict> |
88 | | - <key>builtin_call</key> |
| 36 | + <key>call</key> |
89 | 37 | <dict> |
90 | 38 | <key>captures</key> |
91 | 39 | <dict> |
92 | 40 | <key>1</key> |
93 | | - <dict> |
94 | | - <key>name</key> |
95 | | - <string>punctuation.whitespace.function-call.leading.rego</string> |
96 | | - </dict> |
97 | | - <key>2</key> |
98 | 41 | <dict> |
99 | 42 | <key>name</key> |
100 | 43 | <string>support.function.any-method.rego</string> |
101 | 44 | </dict> |
102 | | - <key>3</key> |
103 | | - <dict> |
104 | | - <key>name</key> |
105 | | - <string>punctuation.definition.parameters.rego</string> |
106 | | - </dict> |
107 | 45 | </dict> |
108 | 46 | <key>match</key> |
109 | | - <string>(?x) (?:(?<!\w)(\s+))? |
110 | | - (\b |
111 | | - (?:[A-Za-z_][A-Za-z0-9_]*+\b) # actual name |
112 | | - )\s*(\()</string> |
| 47 | + <string>([a-zA-Z_][a-zA-Z0-9_]*)\(</string> |
113 | 48 | <key>name</key> |
114 | 49 | <string>meta.function-call.rego</string> |
115 | 50 | </dict> |
|
135 | 70 | <key>name</key> |
136 | 71 | <string>constant.language.rego</string> |
137 | 72 | </dict> |
138 | | - <key>emptyobject</key> |
139 | | - <dict> |
140 | | - <key>captures</key> |
141 | | - <dict> |
142 | | - <key>1</key> |
143 | | - <dict> |
144 | | - <key>name</key> |
145 | | - <string>punctuation.definition.dictionary.begin.rego</string> |
146 | | - </dict> |
147 | | - <key>2</key> |
148 | | - <dict> |
149 | | - <key>name</key> |
150 | | - <string>meta.empty-dictionary.rego</string> |
151 | | - </dict> |
152 | | - <key>3</key> |
153 | | - <dict> |
154 | | - <key>name</key> |
155 | | - <string>punctuation.definition.dictionary.end.rego</string> |
156 | | - </dict> |
157 | | - </dict> |
158 | | - <key>match</key> |
159 | | - <string>(\{)(\s*(\}))</string> |
160 | | - <key>name</key> |
161 | | - <string>meta.structure.dictionary.rego</string> |
162 | | - </dict> |
163 | | - <key>expr</key> |
164 | | - <dict> |
165 | | - <key>patterns</key> |
166 | | - <array> |
167 | | - <dict> |
168 | | - <key>include</key> |
169 | | - <string>#term</string> |
170 | | - </dict> |
171 | | - <dict> |
172 | | - <key>include</key> |
173 | | - <string>#builtin_call</string> |
174 | | - </dict> |
175 | | - <dict> |
176 | | - <key>include</key> |
177 | | - <string>#operator</string> |
178 | | - </dict> |
179 | | - </array> |
180 | | - </dict> |
181 | 73 | <key>head</key> |
182 | 74 | <dict> |
183 | 75 | <key>begin</key> |
184 | | - <string>^(default\s+)?([[:alpha:]_][[:alnum:]_]*)</string> |
| 76 | + <string>^([[:alpha:]_][[:alnum:]_]*)</string> |
185 | 77 | <key>beginCaptures</key> |
186 | 78 | <dict> |
187 | 79 | <key>1</key> |
188 | 80 | <dict> |
189 | 81 | <key>name</key> |
190 | | - <string>keyword.control.import.$1.rego</string> |
191 | | - </dict> |
192 | | - <key>2</key> |
193 | | - <dict> |
194 | | - <key>name</key> |
195 | | - <string>storage.type.function.rego</string> |
| 82 | + <string>entity.name.function.declaration</string> |
196 | 83 | </dict> |
197 | 84 | </dict> |
198 | 85 | <key>end</key> |
199 | | - <string>(=|:-)</string> |
| 86 | + <string>(=|{|\n)</string> |
200 | 87 | <key>name</key> |
201 | 88 | <string>meta.function.rego</string> |
202 | 89 | <key>patterns</key> |
|
210 | 97 | <key>keyword</key> |
211 | 98 | <dict> |
212 | 99 | <key>match</key> |
213 | | - <string>\b(?:(package|import|as|with))\b</string> |
| 100 | + <string>(^|\s+)(?:(default|not|package|import|as|with|else))\s+</string> |
214 | 101 | <key>name</key> |
215 | | - <string>keyword.control.import.$1.rego</string> |
| 102 | + <string>keyword.other.rego</string> |
216 | 103 | </dict> |
217 | 104 | <key>number</key> |
218 | 105 | <dict> |
|
240 | 127 | <key>name</key> |
241 | 128 | <string>constant.numeric.rego</string> |
242 | 129 | </dict> |
243 | | - <key>object</key> |
244 | | - <dict> |
245 | | - <key>begin</key> |
246 | | - <string>(\{)</string> |
247 | | - <key>beginCaptures</key> |
248 | | - <dict> |
249 | | - <key>1</key> |
250 | | - <dict> |
251 | | - <key>name</key> |
252 | | - <string>punctuation.definition.dictionary.begin.rego</string> |
253 | | - </dict> |
254 | | - </dict> |
255 | | - <key>end</key> |
256 | | - <string>(\})</string> |
257 | | - <key>endCaptures</key> |
258 | | - <dict> |
259 | | - <key>1</key> |
260 | | - <dict> |
261 | | - <key>name</key> |
262 | | - <string>punctuation.definition.dictionary.end.rego</string> |
263 | | - </dict> |
264 | | - </dict> |
265 | | - <key>name</key> |
266 | | - <string>meta.structure.dictionary.rego</string> |
267 | | - <key>patterns</key> |
268 | | - <array> |
269 | | - <dict> |
270 | | - <key>begin</key> |
271 | | - <string>(?<=\{|\,|^)\s*(?![\},])</string> |
272 | | - <key>contentName</key> |
273 | | - <string>meta.structure.dictionary.key.rego</string> |
274 | | - <key>end</key> |
275 | | - <string>\s*(?:(?=\})|(\:))</string> |
276 | | - <key>endCaptures</key> |
277 | | - <dict> |
278 | | - <key>1</key> |
279 | | - <dict> |
280 | | - <key>name</key> |
281 | | - <string>punctuation.separator.valuepair.dictionary.rego</string> |
282 | | - </dict> |
283 | | - </dict> |
284 | | - <key>patterns</key> |
285 | | - <array> |
286 | | - <dict> |
287 | | - <key>include</key> |
288 | | - <string>$self</string> |
289 | | - </dict> |
290 | | - </array> |
291 | | - </dict> |
292 | | - <dict> |
293 | | - <key>begin</key> |
294 | | - <string>(?<=\:|^)\s*</string> |
295 | | - <key>contentName</key> |
296 | | - <string>meta.structure.dictionary.value.rego</string> |
297 | | - <key>end</key> |
298 | | - <string>\s*(?:(?=\})|(,))</string> |
299 | | - <key>endCaptures</key> |
300 | | - <dict> |
301 | | - <key>1</key> |
302 | | - <dict> |
303 | | - <key>name</key> |
304 | | - <string>punctuation.separator.dictionary.rego</string> |
305 | | - </dict> |
306 | | - </dict> |
307 | | - <key>patterns</key> |
308 | | - <array> |
309 | | - <dict> |
310 | | - <key>include</key> |
311 | | - <string>$self</string> |
312 | | - </dict> |
313 | | - </array> |
314 | | - </dict> |
315 | | - </array> |
316 | | - </dict> |
317 | 130 | <key>operator</key> |
318 | 131 | <dict> |
319 | 132 | <key>patterns</key> |
320 | 133 | <array> |
321 | 134 | <dict> |
322 | 135 | <key>match</key> |
323 | | - <string>\b(?:not)\b</string> |
324 | | - <key>name</key> |
325 | | - <string>keyword.control.logical.$1.rego</string> |
326 | | - </dict> |
327 | | - <dict> |
328 | | - <key>match</key> |
329 | | - <string>\=|\!\=|>|<|<\=|>\=</string> |
330 | | - <key>name</key> |
331 | | - <string>keyword.control.logical.$1.rego</string> |
332 | | - </dict> |
333 | | - </array> |
334 | | - </dict> |
335 | | - <key>query</key> |
336 | | - <dict> |
337 | | - <key>name</key> |
338 | | - <string>meta.structure.query.rego</string> |
339 | | - <key>patterns</key> |
340 | | - <array> |
341 | | - <dict> |
342 | | - <key>include</key> |
343 | | - <string>#expr</string> |
344 | | - </dict> |
345 | | - <dict> |
346 | | - <key>match</key> |
347 | | - <string>,</string> |
348 | | - <key>name</key> |
349 | | - <string>punctuation.separator.query.rego</string> |
350 | | - </dict> |
351 | | - </array> |
352 | | - </dict> |
353 | | - <key>set</key> |
354 | | - <dict> |
355 | | - <key>begin</key> |
356 | | - <string>\{</string> |
357 | | - <key>beginCaptures</key> |
358 | | - <dict> |
359 | | - <key>0</key> |
360 | | - <dict> |
361 | | - <key>name</key> |
362 | | - <string>punctuation.definition.array.begin.rego</string> |
363 | | - </dict> |
364 | | - </dict> |
365 | | - <key>end</key> |
366 | | - <string>\}</string> |
367 | | - <key>endCaptures</key> |
368 | | - <dict> |
369 | | - <key>0</key> |
370 | | - <dict> |
371 | | - <key>name</key> |
372 | | - <string>punctuation.definition.array.end.rego</string> |
373 | | - </dict> |
374 | | - </dict> |
375 | | - <key>name</key> |
376 | | - <string>meta.structure.array.rego</string> |
377 | | - <key>patterns</key> |
378 | | - <array> |
379 | | - <dict> |
380 | | - <key>include</key> |
381 | | - <string>#term</string> |
382 | | - </dict> |
383 | | - <dict> |
384 | | - <key>match</key> |
385 | | - <string>,</string> |
| 136 | + <string>\=|\!\=|>|<|<\=|>\=|\+|-|\*|%|/|\||&|:\=</string> |
386 | 137 | <key>name</key> |
387 | | - <string>punctuation.separator.array.rego</string> |
388 | | - </dict> |
389 | | - <dict> |
390 | | - <key>match</key> |
391 | | - <string>[^\s\]]</string> |
392 | | - <key>name</key> |
393 | | - <string>invalid.illegal.expected-array-separator.rego</string> |
| 138 | + <string>keyword.operator.comparison.rego</string> |
394 | 139 | </dict> |
395 | 140 | </array> |
396 | 141 | </dict> |
|
460 | 205 | </dict> |
461 | 206 | <dict> |
462 | 207 | <key>include</key> |
463 | | - <string>#array</string> |
464 | | - </dict> |
465 | | - <dict> |
466 | | - <key>include</key> |
467 | | - <string>#emptyobject</string> |
468 | | - </dict> |
469 | | - <dict> |
470 | | - <key>include</key> |
471 | | - <string>#object</string> |
| 208 | + <string>#call</string> |
472 | 209 | </dict> |
473 | 210 | <dict> |
474 | 211 | <key>include</key> |
|
0 commit comments