PluginProbe
Code Block Pro – Beautiful Syntax Highlighting / 1.27.2
Code Block Pro – Beautiful Syntax Highlighting v1.27.2
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.27.2, at build/shiki/languages/dart.tmLanguage.json

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