PluginProbe
Code Block Pro – Beautiful Syntax Highlighting / 1.13.0
Code Block Pro – Beautiful Syntax Highlighting v1.13.0
1.27.1 1.27.2 1.27.3 1.27.4 1.27.5 1.27.6 1.27.7 1.28.0 1.3.0 1.4.0 1.5.0 1.5.1 1.5.2 1.6.0 1.7.0 1.8.0 1.9.0 1.9.1 1.9.2 1.9.3 trunk 1.1.0 1.10.0 1.11.0 1.11.1 All 63 releases
code-block-pro / build / shiki / languages / dart.tmLanguage.json

dart.tmLanguage.json in Code Block Pro – Beautiful Syntax Highlighting 1.13.0, at build/shiki/languages/dart.tmLanguage.json

526 lines 12.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 {
2 "name": "dart",
3 "version": "1.1.1",
4 "fileTypes": ["dart"],
5 "scopeName": "source.dart",
6 "foldingStartMarker": "\\{\\s*$",
7 "foldingStopMarker": "^\\s*\\}",
8 "patterns": [
9 {
10 "name": "meta.preprocessor.script.dart",
11 "match": "^(#!.*)$"
12 },
13 {
14 "name": "meta.declaration.dart",
15 "begin": "^\\w*\\b(library|import|part of|part|export)\\b",
16 "beginCaptures": {
17 "0": {
18 "name": "keyword.other.import.dart"
19 }
20 },
21 "end": ";",
22 "endCaptures": {
23 "0": {
24 "name": "punctuation.terminator.dart"
25 }
26 },
27 "patterns": [
28 {
29 "include": "#strings"
30 },
31 {
32 "include": "#comments"
33 },
34 {
35 "name": "keyword.other.import.dart",
36 "match": "\\b(as|show|hide)\\b"
37 },
38 {
39 "name": "keyword.control.dart",
40 "match": "\\b(if)\\b"
41 }
42 ]
43 },
44 {
45 "include": "#comments"
46 },
47 {
48 "include": "#punctuation"
49 },
50 {
51 "include": "#annotations"
52 },
53 {
54 "include": "#keywords"
55 },
56 {
57 "include": "#constants-and-special-vars"
58 },
59 {
60 "include": "#operators"
61 },
62 {
63 "include": "#strings"
64 }
65 ],
66 "repository": {
67 "dartdoc": {
68 "patterns": [
69 {
70 "match": "(\\[.*?\\])",
71 "captures": {
72 "0": {
73 "name": "variable.name.source.dart"
74 }
75 }
76 },
77 {
78 "match": "^ {4,}(?![ \\*]).*",
79 "captures": {
80 "0": {
81 "name": "variable.name.source.dart"
82 }
83 }
84 },
85 {
86 "contentName": "variable.other.source.dart",
87 "begin": "```.*?$",
88 "end": "```"
89 },
90 {
91 "match": "(`.*?`)",
92 "captures": {
93 "0": {
94 "name": "variable.other.source.dart"
95 }
96 }
97 },
98 {
99 "match": "(`.*?`)",
100 "captures": {
101 "0": {
102 "name": "variable.other.source.dart"
103 }
104 }
105 },
106 {
107 "match": "(\\* (( ).*))$",
108 "captures": {
109 "2": {
110 "name": "variable.other.source.dart"
111 }
112 }
113 }
114 ]
115 },
116 "comments": {
117 "patterns": [
118 {
119 "name": "comment.block.empty.dart",
120 "match": "/\\*\\*/",
121 "captures": {
122 "0": {
123 "name": "punctuation.definition.comment.dart"
124 }
125 }
126 },
127 {
128 "include": "#comments-doc-oldschool"
129 },
130 {
131 "include": "#comments-doc"
132 },
133 {
134 "include": "#comments-inline"
135 }
136 ]
137 },
138 "comments-doc-oldschool": {
139 "patterns": [
140 {
141 "name": "comment.block.documentation.dart",
142 "begin": "/\\*\\*",
143 "end": "\\*/",
144 "patterns": [
145 {
146 "include": "#comments-doc-oldschool"
147 },
148 {
149 "include": "#comments-block"
150 },
151 {
152 "include": "#dartdoc"
153 }
154 ]
155 }
156 ]
157 },
158 "comments-doc": {
159 "patterns": [
160 {
161 "name": "comment.block.documentation.dart",
162 "begin": "///",
163 "while": "^\\s*///",
164 "patterns": [
165 {
166 "include": "#dartdoc"
167 }
168 ]
169 }
170 ]
171 },
172 "comments-inline": {
173 "patterns": [
174 {
175 "include": "#comments-block"
176 },
177 {
178 "match": "((//).*)$",
179 "captures": {
180 "1": {
181 "name": "comment.line.double-slash.dart"
182 }
183 }
184 }
185 ]
186 },
187 "comments-block": {
188 "patterns": [
189 {
190 "name": "comment.block.dart",
191 "begin": "/\\*",
192 "end": "\\*/",
193 "patterns": [
194 {
195 "include": "#comments-block"
196 }
197 ]
198 }
199 ]
200 },
201 "annotations": {
202 "patterns": [
203 {
204 "name": "storage.type.annotation.dart",
205 "match": "@[a-zA-Z]+"
206 }
207 ]
208 },
209 "constants-and-special-vars": {
210 "patterns": [
211 {
212 "name": "constant.language.dart",
213 "match": "(?<!\\$)\\b(true|false|null)\\b(?!\\$)"
214 },
215 {
216 "name": "variable.language.dart",
217 "match": "(?<!\\$)\\b(this|super)\\b(?!\\$)"
218 },
219 {
220 "name": "constant.numeric.dart",
221 "match": "(?<!\\$)\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)\\b(?!\\$)"
222 },
223 {
224 "include": "#class-identifier"
225 },
226 {
227 "include": "#function-identifier"
228 }
229 ]
230 },
231 "class-identifier": {
232 "patterns": [
233 {
234 "match": "(?<!\\$)\\b(bool|num|int|double|dynamic)\\b(?!\\$)",
235 "name": "support.class.dart"
236 },
237 {
238 "match": "(?<!\\$)\\bvoid\\b(?!\\$)",
239 "name": "storage.type.primitive.dart"
240 },
241 {
242 "begin": "(?<![a-zA-Z0-9_$])([_$]*[A-Z][a-zA-Z0-9_$]*)\\b",
243 "end": "(?!<)",
244 "beginCaptures": {
245 "1": {
246 "name": "support.class.dart"
247 }
248 },
249 "patterns": [
250 {
251 "include": "#type-args"
252 }
253 ]
254 }
255 ]
256 },
257 "function-identifier": {
258 "patterns": [
259 {
260 "match": "([_$]*[a-z][a-zA-Z0-9_$]*)(<(?:[a-zA-Z0-9_$<>?]|,\\s*|\\s+extends\\s+)+>)?[!?]?(\\(|\\s+=>)",
261 "captures": {
262 "1": {
263 "name": "entity.name.function.dart"
264 },
265 "2": {
266 "patterns": [
267 {
268 "include": "#type-args"
269 }
270 ]
271 }
272 }
273 }
274 ]
275 },
276 "type-args": {
277 "begin": "(<)",
278 "end": "(>)",
279 "beginCaptures": {
280 "1": {
281 "name": "other.source.dart"
282 }
283 },
284 "endCaptures": {
285 "1": {
286 "name": "other.source.dart"
287 }
288 },
289 "patterns": [
290 {
291 "include": "#class-identifier"
292 },
293 {
294 "match": ","
295 },
296 {
297 "name": "keyword.declaration.dart",
298 "match": "extends"
299 }
300 ]
301 },
302 "keywords": {
303 "patterns": [
304 {
305 "name": "keyword.cast.dart",
306 "match": "(?<!\\$)\\bas\\b(?!\\$)"
307 },
308 {
309 "name": "keyword.control.catch-exception.dart",
310 "match": "(?<!\\$)\\b(try|on|catch|finally|throw|rethrow)\\b(?!\\$)"
311 },
312 {
313 "name": "keyword.control.dart",
314 "match": "(?<!\\$)\\b(break|case|continue|default|do|else|for|if|in|return|switch|while)\\b(?!\\$)"
315 },
316 {
317 "name": "keyword.control.dart",
318 "match": "(?<!\\$)\\b(sync(\\*)?|async(\\*)?|await|yield(\\*)?)\\b(?!\\$)"
319 },
320 {
321 "name": "keyword.control.dart",
322 "match": "(?<!\\$)\\bassert\\b(?!\\$)"
323 },
324 {
325 "name": "keyword.control.new.dart",
326 "match": "(?<!\\$)\\b(new)\\b(?!\\$)"
327 },
328 {
329 "name": "keyword.declaration.dart",
330 "match": "(?<!\\$)\\b(abstract|class|enum|extends|extension|external|factory|implements|get(?!\\()|mixin|native|operator|set(?!\\()|typedef|with|covariant)\\b(?!\\$)"
331 },
332 {
333 "name": "storage.modifier.dart",
334 "match": "(?<!\\$)\\b(static|final|const|required|late)\\b(?!\\$)"
335 },
336 {
337 "name": "storage.type.primitive.dart",
338 "match": "(?<!\\$)\\b(?:void|var)\\b(?!\\$)"
339 }
340 ]
341 },
342 "operators": {
343 "patterns": [
344 {
345 "name": "keyword.operator.dart",
346 "match": "(?<!\\$)\\b(is\\!?)\\b(?!\\$)"
347 },
348 {
349 "name": "keyword.operator.ternary.dart",
350 "match": "\\?|:"
351 },
352 {
353 "name": "keyword.operator.bitwise.dart",
354 "match": "(<<|>>>?|~|\\^|\\||&)"
355 },
356 {
357 "name": "keyword.operator.assignment.bitwise.dart",
358 "match": "((&|\\^|\\||<<|>>>?)=)"
359 },
360 {
361 "name": "keyword.operator.closure.dart",
362 "match": "(=>)"
363 },
364 {
365 "name": "keyword.operator.comparison.dart",
366 "match": "(==|!=|<=?|>=?)"
367 },
368 {
369 "name": "keyword.operator.assignment.arithmetic.dart",
370 "match": "(([+*/%-]|\\~)=)"
371 },
372 {
373 "name": "keyword.operator.assignment.dart",
374 "match": "(=)"
375 },
376 {
377 "name": "keyword.operator.increment-decrement.dart",
378 "match": "(\\-\\-|\\+\\+)"
379 },
380 {
381 "name": "keyword.operator.arithmetic.dart",
382 "match": "(\\-|\\+|\\*|\\/|\\~\\/|%)"
383 },
384 {
385 "name": "keyword.operator.logical.dart",
386 "match": "(!|&&|\\|\\|)"
387 }
388 ]
389 },
390 "string-interp": {
391 "patterns": [
392 {
393 "match": "\\$([a-zA-Z0-9_]+)",
394 "captures": {
395 "1": {
396 "name": "variable.parameter.dart"
397 }
398 }
399 },
400 {
401 "name": "string.interpolated.expression.dart",
402 "begin": "\\$\\{",
403 "end": "\\}",
404 "patterns": [
405 {
406 "include": "#constants-and-special-vars",
407 "name": "variable.parameter.dart"
408 },
409 {
410 "include": "#strings"
411 },
412 {
413 "name": "variable.parameter.dart",
414 "match": "[a-zA-Z0-9_]+"
415 }
416 ]
417 },
418 {
419 "name": "constant.character.escape.dart",
420 "match": "\\\\."
421 }
422 ]
423 },
424 "strings": {
425 "patterns": [
426 {
427 "name": "string.interpolated.triple.double.dart",
428 "begin": "(?<!r)\"\"\"",
429 "end": "\"\"\"(?!\")",
430 "patterns": [
431 {
432 "include": "#string-interp"
433 }
434 ]
435 },
436 {
437 "name": "string.interpolated.triple.single.dart",
438 "begin": "(?<!r)'''",
439 "end": "'''(?!')",
440 "patterns": [
441 {
442 "include": "#string-interp"
443 }
444 ]
445 },
446 {
447 "name": "string.quoted.triple.double.dart",
448 "begin": "r\"\"\"",
449 "end": "\"\"\"(?!\")"
450 },
451 {
452 "name": "string.quoted.triple.single.dart",
453 "begin": "r'''",
454 "end": "'''(?!')"
455 },
456 {
457 "name": "string.interpolated.double.dart",
458 "begin": "(?<!\\|r)\"",
459 "end": "\"",
460 "patterns": [
461 {
462 "name": "invalid.string.newline",
463 "match": "\\n"
464 },
465 {
466 "include": "#string-interp"
467 }
468 ]
469 },
470 {
471 "name": "string.quoted.double.dart",
472 "begin": "r\"",
473 "end": "\"",
474 "patterns": [
475 {
476 "name": "invalid.string.newline",
477 "match": "\\n"
478 }
479 ]
480 },
481 {
482 "name": "string.interpolated.single.dart",
483 "begin": "(?<!\\|r)'",
484 "end": "'",
485 "patterns": [
486 {
487 "name": "invalid.string.newline",
488 "match": "\\n"
489 },
490 {
491 "include": "#string-interp"
492 }
493 ]
494 },
495 {
496 "name": "string.quoted.single.dart",
497 "begin": "r'",
498 "end": "'",
499 "patterns": [
500 {
501 "name": "invalid.string.newline",
502 "match": "\\n"
503 }
504 ]
505 }
506 ]
507 },
508 "punctuation": {
509 "patterns": [
510 {
511 "name": "punctuation.comma.dart",
512 "match": ","
513 },
514 {
515 "name": "punctuation.terminator.dart",
516 "match": ";"
517 },
518 {
519 "name": "punctuation.dot.dart",
520 "match": "\\."
521 }
522 ]
523 }
524 }
525 }
526