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 / lua.tmLanguage.json

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

899 lines 24.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 {
2 "information_for_contributors": [
3 "This file has been converted from https://github.com/sumneko/lua.tmbundle/blob/master/Syntaxes/Lua.plist",
4 "If you want to provide a fix or improvement, please create a pull request against the original repository.",
5 "Once accepted there, we are happy to receive an update request."
6 ],
7 "version": "https://github.com/sumneko/lua.tmbundle/commit/57be7c5cf8fa173f5f39806822725e503932ab45",
8 "name": "lua",
9 "scopeName": "source.lua",
10 "patterns": [
11 {
12 "begin": "\\b(?:(local)\\s+)?(function)\\b(?![,:])",
13 "beginCaptures": {
14 "1": {
15 "name": "keyword.local.lua"
16 },
17 "2": {
18 "name": "keyword.control.lua"
19 }
20 },
21 "end": "(?<=[\\)\\-{}\\[\\]\"'])",
22 "name": "meta.function.lua",
23 "patterns": [
24 {
25 "include": "#comment"
26 },
27 {
28 "begin": "(\\()",
29 "beginCaptures": {
30 "1": {
31 "name": "punctuation.definition.parameters.begin.lua"
32 }
33 },
34 "end": "(\\))|(?=[\\-\\.{}\\[\\]\"'])",
35 "endCaptures": {
36 "1": {
37 "name": "punctuation.definition.parameters.finish.lua"
38 }
39 },
40 "name": "meta.parameter.lua",
41 "patterns": [
42 {
43 "include": "#comment"
44 },
45 {
46 "match": "[a-zA-Z_][a-zA-Z0-9_]*",
47 "name": "variable.parameter.function.lua"
48 },
49 {
50 "match": ",",
51 "name": "punctuation.separator.arguments.lua"
52 },
53 {
54 "begin": ":",
55 "beginCaptures": {
56 "0": {
57 "name": "punctuation.separator.arguments.lua"
58 }
59 },
60 "end": "(?=[\\),])",
61 "patterns": [
62 {
63 "include": "#luadoc.type"
64 }
65 ]
66 }
67 ]
68 },
69 {
70 "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b\\s*(?=:)",
71 "name": "entity.name.class.lua"
72 },
73 {
74 "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b",
75 "name": "entity.name.function.lua"
76 }
77 ]
78 },
79 {
80 "match": "(?<![\\w\\d.])0[xX][0-9A-Fa-f]+(\\.[0-9A-Fa-f]+)?([eE]-?\\d*)?([pP][-+]\\d+)?",
81 "name": "constant.numeric.float.hexadecimal.lua"
82 },
83 {
84 "match": "(?<![\\w\\d.])0[xX][0-9A-Fa-f]+(?![pPeE.0-9])",
85 "name": "constant.numeric.integer.hexadecimal.lua"
86 },
87 {
88 "match": "(?<![\\w\\d.])\\d+(\\.\\d+)?([eE]-?\\d*)?",
89 "name": "constant.numeric.float.lua"
90 },
91 {
92 "match": "(?<![\\w\\d.])\\d+(?![pPeE.0-9])",
93 "name": "constant.numeric.integer.lua"
94 },
95 {
96 "include": "#string"
97 },
98 {
99 "captures": {
100 "1": {
101 "name": "punctuation.definition.comment.lua"
102 }
103 },
104 "match": "\\A(#!).*$\\n?",
105 "name": "comment.line.shebang.lua"
106 },
107 {
108 "include": "#comment"
109 },
110 {
111 "captures": {
112 "1": {
113 "name": "keyword.control.goto.lua"
114 },
115 "2": {
116 "name": "string.tag.lua"
117 }
118 },
119 "match": "\\b(goto)\\s+([a-zA-Z_][a-zA-Z0-9_]*)"
120 },
121 {
122 "captures": {
123 "1": {
124 "name": "punctuation.section.embedded.begin.lua"
125 },
126 "2": {
127 "name": "punctuation.section.embedded.end.lua"
128 }
129 },
130 "match": "(::)\\s*[a-zA-Z_][a-zA-Z0-9_]*\\s*(::)",
131 "name": "string.tag.lua"
132 },
133 {
134 "match": "<\\s*(const|close)\\s*>",
135 "captures": {
136 "1": {
137 "name": "string.tag.lua"
138 }
139 }
140 },
141 {
142 "match": "\\<[a-zA-Z_\\*][a-zA-Z0-9_\\.\\*\\-]*\\>",
143 "name": "storage.type.generic.lua"
144 },
145 {
146 "match": "\\b(break|do|else|for|if|elseif|goto|return|then|repeat|while|until|end|in)\\b",
147 "name": "keyword.control.lua"
148 },
149 {
150 "match": "\\b(local|global)\\b",
151 "name": "keyword.local.lua"
152 },
153 {
154 "match": "\\b(function)\\b(?![,:])",
155 "name": "keyword.control.lua"
156 },
157 {
158 "match": "(?<![^.]\\.|:)\\b(false|nil(?!:)|true|_ENV|_G|_VERSION|math\\.(pi|huge|maxinteger|mininteger)|utf8\\.charpattern|io\\.(stdin|stdout|stderr)|package\\.(config|cpath|loaded|loaders|path|preload|searchers))\\b|(?<![.])\\.{3}(?!\\.)",
159 "name": "constant.language.lua"
160 },
161 {
162 "match": "(?<![^.]\\.|:)\\b(self)\\b",
163 "name": "variable.language.self.lua"
164 },
165 {
166 "match": "(?<![^.]\\.|:)\\b(assert|collectgarbage|dofile|error|getfenv|getmetatable|ipairs|load|loadfile|loadstring|module|next|pairs|pcall|print|rawequal|rawget|rawlen|rawset|require|select|setfenv|setmetatable|tonumber|tostring|type|unpack|xpcall)\\b(?!\\s*=(?!=))",
167 "name": "support.function.lua"
168 },
169 {
170 "match": "(?<![^.]\\.|:)\\b(async)\\b(?!\\s*=(?!=))",
171 "name": "entity.name.tag.lua"
172 },
173 {
174 "match": "(?<![^.]\\.|:)\\b(coroutine\\.(create|isyieldable|close|resume|running|status|wrap|yield)|string\\.(byte|char|dump|find|format|gmatch|gsub|len|lower|match|pack|packsize|rep|reverse|sub|unpack|upper)|table\\.(concat|insert|maxn|move|pack|remove|sort|unpack)|math\\.(abs|acos|asin|atan2?|ceil|cosh?|deg|exp|floor|fmod|frexp|ldexp|log|log10|max|min|modf|pow|rad|random|randomseed|sinh?|sqrt|tanh?|tointeger|type)|io\\.(close|flush|input|lines|open|output|popen|read|tmpfile|type|write)|os\\.(clock|date|difftime|execute|exit|getenv|remove|rename|setlocale|time|tmpname)|package\\.(loadlib|seeall|searchpath)|debug\\.(debug|[gs]etfenv|[gs]ethook|getinfo|[gs]etlocal|[gs]etmetatable|getregistry|[gs]etupvalue|[gs]etuservalue|set[Cc]stacklimit|traceback|upvalueid|upvaluejoin)|bit32\\.(arshift|band|bnot|bor|btest|bxor|extract|replace|lrotate|lshift|rrotate|rshift)|utf8\\.(char|codes|codepoint|len|offset))\\b(?!\\s*=(?!=))",
175 "name": "support.function.library.lua"
176 },
177 {
178 "match": "\\b(and|or|not|\\|\\||\\&\\&|\\!)\\b",
179 "name": "keyword.operator.lua"
180 },
181 {
182 "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b(?=\\s*(?:[({\"']|\\[\\[))",
183 "name": "support.function.any-method.lua"
184 },
185 {
186 "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b(?=\\s*\\??:)",
187 "name": "entity.name.class.lua"
188 },
189 {
190 "match": "(?<=[^.]\\.|:)\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b(?!\\s*=\\s*\\b(function)\\b)",
191 "name": "entity.other.attribute.lua"
192 },
193 {
194 "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b(?!\\s*=\\s*\\b(function)\\b)",
195 "name": "variable.other.lua"
196 },
197 {
198 "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b(?=\\s*=\\s*\\b(function)\\b)",
199 "name": "entity.name.function.lua"
200 },
201 {
202 "match": "\\+|-|%|#|\\*|\\/|\\^|==?|~=|!=|<=?|>=?|(?<!\\.)\\.{2}(?!\\.)",
203 "name": "keyword.operator.lua"
204 }
205 ],
206 "repository": {
207 "escaped_char": {
208 "patterns": [
209 {
210 "match": "\\\\[abfnrtv\\\\\"'\\n]",
211 "name": "constant.character.escape.lua"
212 },
213 {
214 "match": "\\\\z[\\n\\t ]*",
215 "name": "constant.character.escape.lua"
216 },
217 {
218 "match": "\\\\\\d{1,3}",
219 "name": "constant.character.escape.byte.lua"
220 },
221 {
222 "match": "\\\\x[0-9A-Fa-f][0-9A-Fa-f]",
223 "name": "constant.character.escape.byte.lua"
224 },
225 {
226 "match": "\\\\u\\{[0-9A-Fa-f]+\\}",
227 "name": "constant.character.escape.unicode.lua"
228 },
229 {
230 "match": "\\\\.",
231 "name": "invalid.illegal.character.escape.lua"
232 }
233 ]
234 },
235 "string": {
236 "patterns": [
237 {
238 "begin": "'",
239 "beginCaptures": {
240 "0": {
241 "name": "punctuation.definition.string.begin.lua"
242 }
243 },
244 "end": "'[ \\t]*|(?=\\n)",
245 "endCaptures": {
246 "0": {
247 "name": "punctuation.definition.string.end.lua"
248 }
249 },
250 "name": "string.quoted.single.lua",
251 "patterns": [
252 {
253 "include": "#escaped_char"
254 }
255 ]
256 },
257 {
258 "begin": "\"",
259 "beginCaptures": {
260 "0": {
261 "name": "punctuation.definition.string.begin.lua"
262 }
263 },
264 "end": "\"[ \\t]*|(?=\\n)",
265 "endCaptures": {
266 "0": {
267 "name": "punctuation.definition.string.end.lua"
268 }
269 },
270 "name": "string.quoted.double.lua",
271 "patterns": [
272 {
273 "include": "#escaped_char"
274 }
275 ]
276 },
277 {
278 "begin": "`",
279 "beginCaptures": {
280 "0": {
281 "name": "punctuation.definition.string.begin.lua"
282 }
283 },
284 "end": "`[ \\t]*|(?=\\n)",
285 "endCaptures": {
286 "0": {
287 "name": "punctuation.definition.string.end.lua"
288 }
289 },
290 "name": "string.quoted.double.lua"
291 },
292 {
293 "begin": "(?<=\\.cdef)\\s*(\\[(=*)\\[)",
294 "beginCaptures": {
295 "0": {
296 "name": "string.quoted.other.multiline.lua"
297 },
298 "1": {
299 "name": "punctuation.definition.string.begin.lua"
300 }
301 },
302 "contentName": "meta.embedded.lua",
303 "end": "(\\]\\2\\])[ \\t]*",
304 "endCaptures": {
305 "0": {
306 "name": "string.quoted.other.multiline.lua"
307 },
308 "1": {
309 "name": "punctuation.definition.string.end.lua"
310 }
311 },
312 "patterns": [
313 {
314 "include": "source.c"
315 }
316 ]
317 },
318 {
319 "begin": "(?<!--)\\[(=*)\\[",
320 "beginCaptures": {
321 "0": {
322 "name": "punctuation.definition.string.begin.lua"
323 }
324 },
325 "end": "\\]\\1\\][ \\t]*",
326 "endCaptures": {
327 "0": {
328 "name": "punctuation.definition.string.end.lua"
329 }
330 },
331 "name": "string.quoted.other.multiline.lua"
332 }
333 ]
334 },
335 "comment": {
336 "patterns": [
337 {
338 "begin": "(^[ \\t]+)?(?=--)",
339 "beginCaptures": {
340 "1": {
341 "name": "punctuation.whitespace.comment.leading.lua"
342 }
343 },
344 "end": "(?!\\G)((?!^)[ \\t]+\\n)?",
345 "endCaptures": {
346 "1": {
347 "name": "punctuation.whitespace.comment.trailing.lua"
348 }
349 },
350 "patterns": [
351 {
352 "begin": "--\\[(=*)\\[",
353 "beginCaptures": {
354 "0": {
355 "name": "punctuation.definition.comment.begin.lua"
356 }
357 },
358 "end": "\\]\\1\\]",
359 "endCaptures": {
360 "0": {
361 "name": "punctuation.definition.comment.end.lua"
362 }
363 },
364 "name": "comment.block.lua"
365 },
366 {
367 "begin": "----",
368 "beginCaptures": {
369 "0": {
370 "name": "punctuation.definition.comment.lua"
371 }
372 },
373 "end": "\\n",
374 "name": "comment.line.double-dash.lua"
375 },
376 {
377 "begin": "---",
378 "beginCaptures": {
379 "0": {
380 "name": "punctuation.definition.comment.lua"
381 }
382 },
383 "end": "\\n",
384 "name": "comment.line.double-dash.doc.lua",
385 "patterns": [
386 {
387 "include": "#luadoc"
388 }
389 ]
390 },
391 {
392 "begin": "--",
393 "beginCaptures": {
394 "0": {
395 "name": "punctuation.definition.comment.lua"
396 }
397 },
398 "end": "\\n",
399 "name": "comment.line.double-dash.lua"
400 }
401 ]
402 },
403 {
404 "begin": "\\/\\*",
405 "beginCaptures": {
406 "0": {
407 "name": "punctuation.definition.comment.begin.lua"
408 }
409 },
410 "end": "\\*\\/",
411 "endCaptures": {
412 "0": {
413 "name": "punctuation.definition.comment.end.lua"
414 }
415 },
416 "name": "comment.block.lua"
417 }
418 ]
419 },
420 "luadoc": {
421 "patterns": [
422 {
423 "begin": "(?<=---\\s*)@class",
424 "beginCaptures": {
425 "0": {
426 "name": "storage.type.annotation.lua"
427 }
428 },
429 "end": "(?=[\\n@#])",
430 "patterns": [
431 {
432 "match": "\\b([a-zA-Z_\\*][a-zA-Z0-9_\\.\\*\\-]*)",
433 "name": "support.class.lua"
434 },
435 {
436 "match": ":|,",
437 "name": "keyword.operator.lua"
438 }
439 ]
440 },
441 {
442 "begin": "(?<=---\\s*)@enum",
443 "beginCaptures": {
444 "0": {
445 "name": "storage.type.annotation.lua"
446 }
447 },
448 "end": "(?=[\\n@#])",
449 "patterns": [
450 {
451 "begin": "\\b([a-zA-Z_\\*][a-zA-Z0-9_\\.\\*\\-]*)",
452 "beginCaptures": {
453 "0": {
454 "name": "variable.lua"
455 }
456 },
457 "end": "(?=\\n)"
458 }
459 ]
460 },
461 {
462 "begin": "(?<=---\\s*)@type",
463 "beginCaptures": {
464 "0": {
465 "name": "storage.type.annotation.lua"
466 }
467 },
468 "end": "(?=[\\n@#])",
469 "patterns": [
470 {
471 "include": "#luadoc.type"
472 }
473 ]
474 },
475 {
476 "begin": "(?<=---\\s*)@alias",
477 "beginCaptures": {
478 "0": {
479 "name": "storage.type.annotation.lua"
480 }
481 },
482 "end": "(?=[\\n@#])",
483 "patterns": [
484 {
485 "begin": "\\b([a-zA-Z_\\*][a-zA-Z0-9_\\.\\*\\-]*)",
486 "beginCaptures": {
487 "0": {
488 "name": "variable.lua"
489 }
490 },
491 "end": "(?=[\\n#])",
492 "patterns": [
493 {
494 "include": "#luadoc.type"
495 }
496 ]
497 }
498 ]
499 },
500 {
501 "begin": "(?<=---\\s*)(@operator)\\s*(\\b[a-z]+)?",
502 "beginCaptures": {
503 "1": {
504 "name": "storage.type.annotation.lua"
505 },
506 "2": {
507 "name": "support.function.library.lua"
508 }
509 },
510 "end": "(?=[\\n@#])",
511 "patterns": [
512 {
513 "include": "#luadoc.type"
514 }
515 ]
516 },
517 {
518 "begin": "(?<=---\\s*)@cast",
519 "beginCaptures": {
520 "0": {
521 "name": "storage.type.annotation.lua"
522 }
523 },
524 "end": "(?=[\\n@#])",
525 "patterns": [
526 {
527 "begin": "\\b([a-zA-Z_\\*][a-zA-Z0-9_\\.\\*\\-]*)",
528 "beginCaptures": {
529 "0": {
530 "name": "variable.other.lua"
531 }
532 },
533 "end": "(?=\\n)",
534 "patterns": [
535 {
536 "include": "#luadoc.type"
537 },
538 {
539 "match": "([+-|])",
540 "name": "keyword.operator.lua"
541 }
542 ]
543 }
544 ]
545 },
546 {
547 "begin": "(?<=---\\s*)@param",
548 "beginCaptures": {
549 "0": {
550 "name": "storage.type.annotation.lua"
551 }
552 },
553 "end": "(?=[\\n@#])",
554 "patterns": [
555 {
556 "begin": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b(\\??)",
557 "beginCaptures": {
558 "1": {
559 "name": "entity.name.variable.lua"
560 },
561 "2": {
562 "name": "keyword.operator.lua"
563 }
564 },
565 "end": "(?=[\\n#])",
566 "patterns": [
567 {
568 "include": "#luadoc.type"
569 }
570 ]
571 }
572 ]
573 },
574 {
575 "begin": "(?<=---\\s*)@return",
576 "beginCaptures": {
577 "0": {
578 "name": "storage.type.annotation.lua"
579 }
580 },
581 "end": "(?=[\\n@#])",
582 "patterns": [
583 {
584 "match": "\\?",
585 "name": "keyword.operator.lua"
586 },
587 {
588 "include": "#luadoc.type"
589 }
590 ]
591 },
592 {
593 "begin": "(?<=---\\s*)@field",
594 "beginCaptures": {
595 "0": {
596 "name": "storage.type.annotation.lua"
597 }
598 },
599 "end": "(?=[\\n@#])",
600 "patterns": [
601 {
602 "begin": "(\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b|(\\[))(\\??)",
603 "beginCaptures": {
604 "2": {
605 "name": "entity.name.variable.lua"
606 },
607 "3": {
608 "name": "keyword.operator.lua"
609 }
610 },
611 "end": "(?=[\\n#])",
612 "patterns": [
613 {
614 "include": "#string"
615 },
616 {
617 "include": "#luadoc.type"
618 },
619 {
620 "match": "\\]",
621 "name": "keyword.operator.lua"
622 }
623 ]
624 }
625 ]
626 },
627 {
628 "begin": "(?<=---\\s*)@generic",
629 "beginCaptures": {
630 "0": {
631 "name": "storage.type.annotation.lua"
632 }
633 },
634 "end": "(?=[\\n@#])",
635 "patterns": [
636 {
637 "begin": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b",
638 "beginCaptures": {
639 "0": {
640 "name": "storage.type.generic.lua"
641 }
642 },
643 "end": "(?=\\n)|(,)",
644 "endCaptures": {
645 "0": {
646 "name": "keyword.operator.lua"
647 }
648 },
649 "patterns": [
650 {
651 "match": ":",
652 "name": "keyword.operator.lua"
653 },
654 {
655 "include": "#luadoc.type"
656 }
657 ]
658 }
659 ]
660 },
661 {
662 "begin": "(?<=---\\s*)@vararg",
663 "beginCaptures": {
664 "0": {
665 "name": "storage.type.annotation.lua"
666 }
667 },
668 "end": "(?=[\\n@#])",
669 "patterns": [
670 {
671 "include": "#luadoc.type"
672 }
673 ]
674 },
675 {
676 "begin": "(?<=---\\s*)@overload",
677 "beginCaptures": {
678 "0": {
679 "name": "storage.type.annotation.lua"
680 }
681 },
682 "end": "(?=[\\n@#])",
683 "patterns": [
684 {
685 "include": "#luadoc.type"
686 }
687 ]
688 },
689 {
690 "begin": "(?<=---\\s*)@deprecated",
691 "beginCaptures": {
692 "0": {
693 "name": "storage.type.annotation.lua"
694 }
695 },
696 "end": "(?=[\\n@#])"
697 },
698 {
699 "begin": "(?<=---\\s*)@meta",
700 "beginCaptures": {
701 "0": {
702 "name": "storage.type.annotation.lua"
703 }
704 },
705 "end": "(?=[\\n@#])"
706 },
707 {
708 "begin": "(?<=---\\s*)@private",
709 "beginCaptures": {
710 "0": {
711 "name": "storage.type.annotation.lua"
712 }
713 },
714 "end": "(?=[\\n@#])"
715 },
716 {
717 "begin": "(?<=---\\s*)@protected",
718 "beginCaptures": {
719 "0": {
720 "name": "storage.type.annotation.lua"
721 }
722 },
723 "end": "(?=[\\n@#])"
724 },
725 {
726 "begin": "(?<=---\\s*)@package",
727 "beginCaptures": {
728 "0": {
729 "name": "storage.type.annotation.lua"
730 }
731 },
732 "end": "(?=[\\n@#])"
733 },
734 {
735 "begin": "(?<=---\\s*)@version",
736 "beginCaptures": {
737 "0": {
738 "name": "storage.type.annotation.lua"
739 }
740 },
741 "end": "(?=[\\n@#])",
742 "patterns": [
743 {
744 "match": "\\b(5\\.1|5\\.2|5\\.3|5\\.4|JIT)\\b",
745 "name": "support.class.lua"
746 },
747 {
748 "match": ",|\\>|\\<",
749 "name": "keyword.operator.lua"
750 }
751 ]
752 },
753 {
754 "begin": "(?<=---\\s*)@see",
755 "beginCaptures": {
756 "0": {
757 "name": "storage.type.annotation.lua"
758 }
759 },
760 "end": "(?=[\\n@#])",
761 "patterns": [
762 {
763 "match": "\\b([a-zA-Z_\\*][a-zA-Z0-9_\\.\\*\\-]*)",
764 "name": "support.class.lua"
765 },
766 {
767 "match": "#",
768 "name": "keyword.operator.lua"
769 }
770 ]
771 },
772 {
773 "begin": "(?<=---\\s*)@diagnostic",
774 "beginCaptures": {
775 "0": {
776 "name": "storage.type.annotation.lua"
777 }
778 },
779 "end": "(?=[\\n@#])",
780 "patterns": [
781 {
782 "begin": "([a-zA-Z_\\-0-9]+)[ \\t]*(:)?",
783 "beginCaptures": {
784 "1": {
785 "name": "keyword.other.unit"
786 },
787 "2": {
788 "name": "keyword.operator.unit"
789 }
790 },
791 "end": "(?=\\n)",
792 "patterns": [
793 {
794 "match": "\\b([a-zA-Z_\\*][a-zA-Z0-9_\\-]*)",
795 "name": "support.class.lua"
796 },
797 {
798 "match": ",",
799 "name": "keyword.operator.lua"
800 }
801 ]
802 }
803 ]
804 },
805 {
806 "begin": "(?<=---\\s*)@module",
807 "beginCaptures": {
808 "0": {
809 "name": "storage.type.annotation.lua"
810 }
811 },
812 "end": "(?=[\\n@#])",
813 "patterns": [
814 {
815 "include": "#string"
816 }
817 ]
818 },
819 {
820 "match": "(?<=---\\s*)@(async|nodiscard)",
821 "name": "storage.type.annotation.lua"
822 },
823 {
824 "begin": "(?<=---)\\|\\s*[\\>\\+]?",
825 "beginCaptures": {
826 "0": {
827 "name": "storage.type.annotation.lua"
828 }
829 },
830 "end": "(?=[\\n@#])",
831 "patterns": [
832 {
833 "include": "#string"
834 }
835 ]
836 }
837 ]
838 },
839 "luadoc.type": {
840 "patterns": [
841 {
842 "begin": "\\bfun\\b",
843 "beginCaptures": {
844 "0": {
845 "name": "keyword.control.lua"
846 }
847 },
848 "end": "(?=[\\s#])",
849 "patterns": [
850 {
851 "match": "[\\(\\),:\\?][ \\t]*",
852 "name": "keyword.operator.lua"
853 },
854 {
855 "match": "([a-zA-Z_][a-zA-Z0-9_\\.\\*\\[\\]\\<\\>\\,\\-]*)(?<!,)[ \\t]*(?=\\??:)",
856 "name": "entity.name.variable.lua"
857 },
858 {
859 "include": "#luadoc.type"
860 },
861 {
862 "include": "#string"
863 }
864 ]
865 },
866 {
867 "match": "\\<[a-zA-Z_\\*][a-zA-Z0-9_\\.\\*\\-]*\\>",
868 "name": "storage.type.generic.lua"
869 },
870 {
871 "match": "\\basync\\b",
872 "name": "entity.name.tag.lua"
873 },
874 {
875 "match": "[\\{\\}\\:\\,\\?\\|\\`][ \\t]*",
876 "name": "keyword.operator.lua"
877 },
878 {
879 "begin": "(?=[a-zA-Z_\\.\\*\"'\\[])",
880 "end": "(?=[\\s\\)\\,\\?\\:\\}\\|#])",
881 "patterns": [
882 {
883 "match": "([a-zA-Z0-9_\\.\\*\\[\\]\\<\\>\\,\\-]+)(?<!,)[ \\t]*",
884 "name": "support.type.lua"
885 },
886 {
887 "match": "(\\.\\.\\.)[ \\t]*",
888 "name": "constant.language.lua"
889 },
890 {
891 "include": "#string"
892 }
893 ]
894 }
895 ]
896 }
897 }
898 }
899