PluginProbe
Code Block Pro – Beautiful Syntax Highlighting / 1.5.2
Code Block Pro – Beautiful Syntax Highlighting v1.5.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 / dream-maker.tmLanguage.json

dream-maker.tmLanguage.json in Code Block Pro – Beautiful Syntax Highlighting 1.5.2, at build/shiki/languages/dream-maker.tmLanguage.json

637 lines 16.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 {
2 "fileTypes": ["dm", "dme"],
3 "foldingStartMarker": "(?x)\n/\\*\\*(?!\\*)\n|^(?![^{]*?//|[^{]*?/\\*(?!.*?\\*/.*?\\{)).*?\\{\\s*($|//|/\\*(?!.*?\\*/.*\\S))",
4 "foldingStopMarker": "(?<!\\*)\\*\\*/|^\\s*\\}",
5 "name": "dream-maker",
6 "patterns": [
7 {
8 "include": "#preprocessor-rule-enabled"
9 },
10 {
11 "include": "#preprocessor-rule-disabled"
12 },
13 {
14 "include": "#preprocessor-rule-other"
15 },
16 {
17 "include": "#comments"
18 },
19 {
20 "match": "(?x)\n(var)[\\/ ]\n(?:(static|global|tmp|const)\\/)?\n(?:(datum|atom(?:\\/movable)?|obj|mob|turf|area|savefile|list|client|sound|image|database|matrix|regex|exception)\\/)?\n(?:\n\t([a-zA-Z0-9_\\-$]*)\\/\n)*\n\n([A-Za-z0-9_$]*)\\b",
21 "name": "meta.initialization.dm",
22 "captures": {
23 "1": {
24 "name": "storage.type.dm"
25 },
26 "2": {
27 "name": "storage.modifier.dm"
28 },
29 "3": {
30 "name": "storage.type.dm"
31 },
32 "5": {
33 "name": "variable.other.dm"
34 }
35 }
36 },
37 {
38 "match": "\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)\\b",
39 "name": "constant.numeric.dm"
40 },
41 {
42 "match": "\\b(sleep|spawn|break|continue|do|else|for|goto|if|return|switch|while)\\b",
43 "name": "keyword.control.dm"
44 },
45 {
46 "match": "\\b(del|new)\\b",
47 "name": "keyword.other.dm"
48 },
49 {
50 "match": "\\b(proc|verb|datum|atom(/movable)?|obj|mob|turf|area|savefile|list|client|sound|image|database|matrix|regex|exception)\\b",
51 "name": "storage.type.dm"
52 },
53 {
54 "match": "\\b(as|const|global|set|static|tmp)\\b",
55 "name": "storage.modifier.dm"
56 },
57 {
58 "match": "\\b(usr|world|src|args)\\b",
59 "name": "variable.language.dm"
60 },
61 {
62 "match": "(\\?|(>|<)(=)?|\\.|:|/(=)?|~|\\+(\\+|=)?|-(-|=)?|\\*(\\*|=)?|%|>>|<<|=(=)?|!(=)?|<>|&|&&|\\^|\\||\\|\\||\\bto\\b|\\bin\\b|\\bstep\\b)",
63 "name": "keyword.operator.dm"
64 },
65 {
66 "match": "\\b([A-Z_][A-Z_0-9]*)\\b",
67 "name": "constant.language.dm"
68 },
69 {
70 "match": "\\bnull\\b",
71 "name": "constant.language.dm"
72 },
73 {
74 "begin": "{\"",
75 "beginCaptures": {
76 "0": {
77 "name": "punctuation.definition.string.begin.dm"
78 }
79 },
80 "end": "\"}",
81 "endCaptures": {
82 "0": {
83 "name": "punctuation.definition.string.end.dm"
84 }
85 },
86 "name": "string.quoted.triple.dm",
87 "patterns": [
88 {
89 "include": "#string_escaped_char"
90 },
91 {
92 "include": "#string_embedded_expression"
93 }
94 ]
95 },
96 {
97 "begin": "\"",
98 "beginCaptures": {
99 "0": {
100 "name": "punctuation.definition.string.begin.dm"
101 }
102 },
103 "end": "\"",
104 "endCaptures": {
105 "0": {
106 "name": "punctuation.definition.string.end.dm"
107 }
108 },
109 "name": "string.quoted.double.dm",
110 "patterns": [
111 {
112 "include": "#string_escaped_char"
113 },
114 {
115 "include": "#string_embedded_expression"
116 }
117 ]
118 },
119 {
120 "begin": "'",
121 "beginCaptures": {
122 "0": {
123 "name": "punctuation.definition.string.begin.dm"
124 }
125 },
126 "end": "'",
127 "endCaptures": {
128 "0": {
129 "name": "punctuation.definition.string.end.dm"
130 }
131 },
132 "name": "string.quoted.single.dm",
133 "patterns": [
134 {
135 "include": "#string_escaped_char"
136 }
137 ]
138 },
139 {
140 "begin": "(?x)\n^\\s* ((\\#)\\s*define) \\s+ # define\n((?<id>[a-zA-Z_][a-zA-Z0-9_]*)) # macro name\n(?:\n\t(\\()\n\t\t(\n\t\t\t\\s* \\g<id> \\s* # first argument\n\t\t\t((,) \\s* \\g<id> \\s*)* # additional arguments\n\t\t\t(?:\\.\\.\\.)? # varargs ellipsis?\n\t\t)\n\t(\\))\n)",
141 "beginCaptures": {
142 "1": {
143 "name": "keyword.control.directive.define.dm"
144 },
145 "2": {
146 "name": "punctuation.definition.directive.dm"
147 },
148 "3": {
149 "name": "entity.name.function.preprocessor.dm"
150 },
151 "5": {
152 "name": "punctuation.definition.parameters.begin.dm"
153 },
154 "6": {
155 "name": "variable.parameter.preprocessor.dm"
156 },
157 "8": {
158 "name": "punctuation.separator.parameters.dm"
159 },
160 "9": {
161 "name": "punctuation.definition.parameters.end.dm"
162 }
163 },
164 "end": "(?=(?://|/\\*))|(?<!\\\\)(?=\\n)",
165 "name": "meta.preprocessor.macro.dm",
166 "patterns": [
167 {
168 "include": "$base"
169 }
170 ]
171 },
172 {
173 "begin": "(?x)\n^\\s* ((\\#)\\s*define) \\s+ # define\n((?<id>[a-zA-Z_][a-zA-Z0-9_]*)) # macro name",
174 "beginCaptures": {
175 "1": {
176 "name": "keyword.control.directive.define.dm"
177 },
178 "2": {
179 "name": "punctuation.definition.directive.dm"
180 },
181 "3": {
182 "name": "variable.other.preprocessor.dm"
183 }
184 },
185 "end": "(?=(?://|/\\*))|(?<!\\\\)(?=\\n)",
186 "name": "meta.preprocessor.macro.dm",
187 "patterns": [
188 {
189 "include": "$base"
190 }
191 ]
192 },
193 {
194 "begin": "^\\s*(#\\s*(error|warn))\\b",
195 "captures": {
196 "1": {
197 "name": "keyword.control.import.error.dm"
198 }
199 },
200 "end": "$",
201 "name": "meta.preprocessor.diagnostic.dm",
202 "patterns": [
203 {
204 "match": "(?>\\\\\\s*\\n)",
205 "name": "punctuation.separator.continuation.dm"
206 }
207 ]
208 },
209 {
210 "begin": "^\\s*(?:((#)\\s*(?:elif|else|if|ifdef|ifndef))|((#)\\s*(undef|include)))\\b",
211 "beginCaptures": {
212 "1": {
213 "name": "keyword.control.directive.conditional.dm"
214 },
215 "2": {
216 "name": "punctuation.definition.directive.dm"
217 },
218 "3": {
219 "name": "keyword.control.directive.$5.dm"
220 },
221 "4": {
222 "name": "punctuation.definition.directive.dm"
223 }
224 },
225 "end": "(?=(?://|/\\*))|(?<!\\\\)(?=\\n)",
226 "name": "meta.preprocessor.dm",
227 "patterns": [
228 {
229 "match": "(?>\\\\\\s*\\n)",
230 "name": "punctuation.separator.continuation.dm"
231 }
232 ]
233 },
234 {
235 "include": "#block"
236 },
237 {
238 "begin": "(?x)\n\t\t\t\t(?: ^ # begin-of-line\n\t\t\t\t\t|\n\t\t\t\t\t\t (?: (?= \\s ) (?<!else|new|return) (?<=\\w) # or word + space before name\n\t\t\t\t\t\t\t | (?= \\s*[A-Za-z_] ) (?<!&&) (?<=[*&>]) # or type modifier before name\n\t\t\t\t\t\t )\n\t\t\t\t)\n\t\t\t\t(\\s*) (?!(while|for|do|if|else|switch|catch|enumerate|return|r?iterate)\\s*\\()\n\t\t\t\t(\n\t\t\t\t\t(?: [A-Za-z_][A-Za-z0-9_]*+ | :: )++ | # actual name\n\t\t\t\t\t(?: (?<=operator) (?: [-*&<>=+!]+ | \\(\\) | \\[\\] ) ) # if it is a C++ operator\n\t\t\t\t)\n\t\t\t\t \\s*(?=\\()",
239 "beginCaptures": {
240 "1": {
241 "name": "punctuation.whitespace.function.leading.dm"
242 },
243 "3": {
244 "name": "entity.name.function.dm"
245 },
246 "4": {
247 "name": "punctuation.definition.parameters.dm"
248 }
249 },
250 "end": "(?<=\\})|(?=#)|(;)?",
251 "name": "meta.function.dm",
252 "patterns": [
253 {
254 "include": "#comments"
255 },
256 {
257 "include": "#parens"
258 },
259 {
260 "match": "\\bconst\\b",
261 "name": "storage.modifier.dm"
262 },
263 {
264 "include": "#block"
265 }
266 ]
267 }
268 ],
269 "repository": {
270 "access": {
271 "match": "\\.[a-zA-Z_][a-zA-Z_0-9]*\\b(?!\\s*\\()",
272 "name": "variable.other.dot-access.dm"
273 },
274 "block": {
275 "begin": "\\{",
276 "end": "\\}",
277 "name": "meta.block.dm",
278 "patterns": [
279 {
280 "include": "#block_innards"
281 }
282 ]
283 },
284 "block_innards": {
285 "patterns": [
286 {
287 "include": "#preprocessor-rule-enabled-block"
288 },
289 {
290 "include": "#preprocessor-rule-disabled-block"
291 },
292 {
293 "include": "#preprocessor-rule-other-block"
294 },
295 {
296 "include": "#access"
297 },
298 {
299 "captures": {
300 "1": {
301 "name": "punctuation.whitespace.function-call.leading.dm"
302 },
303 "2": {
304 "name": "support.function.any-method.dm"
305 },
306 "3": {
307 "name": "punctuation.definition.parameters.dm"
308 }
309 },
310 "match": "(?x) (?: (?= \\s ) (?:(?<=else|new|return) | (?<!\\w)) (\\s+))?\n\t\t\t(\\b\n\t\t\t\t(?!(while|for|do|if|else|switch|catch|enumerate|return|r?iterate)\\s*\\()(?:(?!NS)[A-Za-z_][A-Za-z0-9_]*+\\b | :: )++ # actual name\n\t\t\t)\n\t\t\t \\s*(\\()",
311 "name": "meta.function-call.dm"
312 },
313 {
314 "include": "#block"
315 },
316 {
317 "include": "$base"
318 }
319 ]
320 },
321 "comments": {
322 "patterns": [
323 {
324 "captures": {
325 "1": {
326 "name": "meta.toc-list.banner.block.dm"
327 }
328 },
329 "match": "^/\\* =(\\s*.*?)\\s*= \\*/$\\n?",
330 "name": "comment.block.dm"
331 },
332 {
333 "begin": "/\\*",
334 "captures": {
335 "0": {
336 "name": "punctuation.definition.comment.dm"
337 }
338 },
339 "end": "\\*/",
340 "name": "comment.block.dm",
341 "patterns": [
342 {
343 "include": "#comments"
344 }
345 ]
346 },
347 {
348 "match": "\\*/.*\\n",
349 "name": "invalid.illegal.stray-comment-end.dm"
350 },
351 {
352 "captures": {
353 "1": {
354 "name": "meta.toc-list.banner.line.dm"
355 }
356 },
357 "match": "^// =(\\s*.*?)\\s*=\\s*$\\n?",
358 "name": "comment.line.banner.dm"
359 },
360 {
361 "begin": "//",
362 "beginCaptures": {
363 "0": {
364 "name": "punctuation.definition.comment.dm"
365 }
366 },
367 "end": "$\\n?",
368 "name": "comment.line.double-slash.dm",
369 "patterns": [
370 {
371 "match": "(?>\\\\\\s*\\n)",
372 "name": "punctuation.separator.continuation.dm"
373 }
374 ]
375 }
376 ]
377 },
378 "disabled": {
379 "begin": "^\\s*#\\s*if(n?def)?\\b.*$",
380 "comment": "eat nested preprocessor if(def)s",
381 "end": "^\\s*#\\s*endif\\b.*$",
382 "patterns": [
383 {
384 "include": "#disabled"
385 }
386 ]
387 },
388 "parens": {
389 "begin": "\\(",
390 "end": "\\)",
391 "name": "meta.parens.dm",
392 "patterns": [
393 {
394 "include": "$base"
395 }
396 ]
397 },
398 "preprocessor-rule-disabled": {
399 "begin": "^\\s*(#(if)\\s+(0)\\b).*",
400 "captures": {
401 "1": {
402 "name": "meta.preprocessor.dm"
403 },
404 "2": {
405 "name": "keyword.control.import.if.dm"
406 },
407 "3": {
408 "name": "constant.numeric.preprocessor.dm"
409 }
410 },
411 "end": "^\\s*(#\\s*(endif)\\b)",
412 "patterns": [
413 {
414 "begin": "^\\s*(#\\s*(else)\\b)",
415 "captures": {
416 "1": {
417 "name": "meta.preprocessor.dm"
418 },
419 "2": {
420 "name": "keyword.control.import.else.dm"
421 }
422 },
423 "end": "(?=^\\s*#\\s*endif\\b.*$)",
424 "patterns": [
425 {
426 "include": "$base"
427 }
428 ]
429 },
430 {
431 "begin": "",
432 "end": "(?=^\\s*#\\s*(else|endif)\\b.*$)",
433 "name": "comment.block.preprocessor.if-branch",
434 "patterns": [
435 {
436 "include": "#disabled"
437 }
438 ]
439 }
440 ]
441 },
442 "preprocessor-rule-disabled-block": {
443 "begin": "^\\s*(#(if)\\s+(0)\\b).*",
444 "captures": {
445 "1": {
446 "name": "meta.preprocessor.dm"
447 },
448 "2": {
449 "name": "keyword.control.import.if.dm"
450 },
451 "3": {
452 "name": "constant.numeric.preprocessor.dm"
453 }
454 },
455 "end": "^\\s*(#\\s*(endif)\\b)",
456 "patterns": [
457 {
458 "begin": "^\\s*(#\\s*(else)\\b)",
459 "captures": {
460 "1": {
461 "name": "meta.preprocessor.dm"
462 },
463 "2": {
464 "name": "keyword.control.import.else.dm"
465 }
466 },
467 "end": "(?=^\\s*#\\s*endif\\b.*$)",
468 "patterns": [
469 {
470 "include": "#block_innards"
471 }
472 ]
473 },
474 {
475 "begin": "",
476 "end": "(?=^\\s*#\\s*(else|endif)\\b.*$)",
477 "name": "comment.block.preprocessor.if-branch.in-block",
478 "patterns": [
479 {
480 "include": "#disabled"
481 }
482 ]
483 }
484 ]
485 },
486 "preprocessor-rule-enabled": {
487 "begin": "^\\s*(#(if)\\s+(0*1)\\b)",
488 "captures": {
489 "1": {
490 "name": "meta.preprocessor.dm"
491 },
492 "2": {
493 "name": "keyword.control.import.if.dm"
494 },
495 "3": {
496 "name": "constant.numeric.preprocessor.dm"
497 }
498 },
499 "end": "^\\s*(#\\s*(endif)\\b)",
500 "patterns": [
501 {
502 "begin": "^\\s*(#\\s*(else)\\b).*",
503 "captures": {
504 "1": {
505 "name": "meta.preprocessor.dm"
506 },
507 "2": {
508 "name": "keyword.control.import.else.dm"
509 }
510 },
511 "contentName": "comment.block.preprocessor.else-branch",
512 "end": "(?=^\\s*#\\s*endif\\b.*$)",
513 "patterns": [
514 {
515 "include": "#disabled"
516 }
517 ]
518 },
519 {
520 "begin": "",
521 "end": "(?=^\\s*#\\s*(else|endif)\\b.*$)",
522 "patterns": [
523 {
524 "include": "$base"
525 }
526 ]
527 }
528 ]
529 },
530 "preprocessor-rule-enabled-block": {
531 "begin": "^\\s*(#(if)\\s+(0*1)\\b)",
532 "captures": {
533 "1": {
534 "name": "meta.preprocessor.dm"
535 },
536 "2": {
537 "name": "keyword.control.import.if.dm"
538 },
539 "3": {
540 "name": "constant.numeric.preprocessor.dm"
541 }
542 },
543 "end": "^\\s*(#\\s*(endif)\\b)",
544 "patterns": [
545 {
546 "begin": "^\\s*(#\\s*(else)\\b).*",
547 "captures": {
548 "1": {
549 "name": "meta.preprocessor.dm"
550 },
551 "2": {
552 "name": "keyword.control.import.else.dm"
553 }
554 },
555 "contentName": "comment.block.preprocessor.else-branch.in-block",
556 "end": "(?=^\\s*#\\s*endif\\b.*$)",
557 "patterns": [
558 {
559 "include": "#disabled"
560 }
561 ]
562 },
563 {
564 "begin": "",
565 "end": "(?=^\\s*#\\s*(else|endif)\\b.*$)",
566 "patterns": [
567 {
568 "include": "#block_innards"
569 }
570 ]
571 }
572 ]
573 },
574 "preprocessor-rule-other": {
575 "begin": "^\\s*((#\\s*(if(n?def)?))\\b.*?(?:(?=(?://|/\\*))|$))",
576 "captures": {
577 "1": {
578 "name": "meta.preprocessor.dm"
579 },
580 "2": {
581 "name": "keyword.control.import.dm"
582 }
583 },
584 "end": "^\\s*((#\\s*(endif))\\b).*$",
585 "patterns": [
586 {
587 "include": "$base"
588 }
589 ]
590 },
591 "preprocessor-rule-other-block": {
592 "begin": "^\\s*(#\\s*(if(n?def)?)\\b.*?(?:(?=(?://|/\\*))|$))",
593 "captures": {
594 "1": {
595 "name": "meta.preprocessor.dm"
596 },
597 "2": {
598 "name": "keyword.control.import.dm"
599 }
600 },
601 "end": "^\\s*(#\\s*(endif)\\b).*$",
602 "patterns": [
603 {
604 "include": "#block_innards"
605 }
606 ]
607 },
608 "string_embedded_expression": {
609 "patterns": [
610 {
611 "begin": "(?<!\\\\)\\[",
612 "end": "\\]",
613 "name": "string.interpolated.dm",
614 "patterns": [
615 {
616 "include": "$self"
617 }
618 ]
619 }
620 ]
621 },
622 "string_escaped_char": {
623 "patterns": [
624 {
625 "match": "(?x)\n\\\\\n(\n\th(?:(?:er|im)self|ers|im)\n\t|([tTsS]?he) # Weird regex to match The, the, She, she and he at once.\n\t|He\n\t|[Hh]is\n\t|[aA]n?\n\t|(?:im)?proper\n\t|\\.\\.\\.\n\t|(?:icon|ref|[Rr]oman)(?=\\[) # Macros which need a [] after them.\n\t|[s<>\"n\\n \\[]\n)",
626 "name": "constant.character.escape.dm"
627 },
628 {
629 "match": "\\\\.",
630 "name": "invalid.illegal.unknown-escape.dm"
631 }
632 ]
633 }
634 },
635 "scopeName": "source.dm"
636 }
637