@mirascript/textmate 0.1.82 → 0.1.84
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.c8rc.json +6 -0
- package/ava.config.js +4 -0
- package/dist/grammar.d.ts +14 -0
- package/dist/grammar.d.ts.map +1 -0
- package/dist/grammar.js +1129 -0
- package/dist/grammar.js.map +1 -0
- package/dist/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -8
- package/dist/index.js.map +1 -0
- package/dist/language.d.ts +18 -0
- package/dist/language.d.ts.map +1 -0
- package/dist/language.js +15 -0
- package/dist/language.js.map +1 -0
- package/dist/mirascript-doc.tmLanguage.json +477 -86
- package/dist/mirascript-template.tmLanguage.json +422 -277
- package/dist/mirascript.tmLanguage.json +426 -272
- package/package.json +11 -13
- package/src/grammar.ts +1157 -0
- package/src/index.ts +10 -0
- package/src/language.ts +21 -0
- package/tests/_engine.ts +53 -0
- package/tests/grammar/documentation-comments.ts +157 -0
- package/tests/grammar/documentation-mode.ts +372 -0
- package/tests/grammar/language.ts +59 -0
- package/tests/grammar/strings.ts +35 -0
- package/tests/js-compatibility.ts +22 -0
- package/tests/language.ts +9 -0
- package/tests/tsconfig.json +3 -0
- package/tsconfig.json +11 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "https://
|
|
2
|
+
"$schema": "https://www.schemastore.org/tmlanguage.json",
|
|
3
3
|
"name": "mirascript-doc",
|
|
4
4
|
"scopeName": "source.mira.doc",
|
|
5
5
|
"patterns": [
|
|
@@ -7,9 +7,184 @@
|
|
|
7
7
|
"include": "#doc"
|
|
8
8
|
}
|
|
9
9
|
],
|
|
10
|
+
"injections": {
|
|
11
|
+
"L:comment.block.documentation.mira -markup.fenced_code.block.mira -meta.documentation.inline.mira": {
|
|
12
|
+
"patterns": [
|
|
13
|
+
{
|
|
14
|
+
"include": "#documentation"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
10
19
|
"repository": {
|
|
20
|
+
"documentation": {
|
|
21
|
+
"patterns": [
|
|
22
|
+
{
|
|
23
|
+
"include": "#documentation-mirascript-fence"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"include": "#documentation-other-fence"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"include": "#documentation-line"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"include": "#documentation-fragment"
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
"documentation-inline": {
|
|
37
|
+
"patterns": [
|
|
38
|
+
{
|
|
39
|
+
"name": "storage.type.class.documentation.mira",
|
|
40
|
+
"match": "@(param|returns)\\b"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": "markup.bold.documentation.mira",
|
|
44
|
+
"match": "\\*\\*[^*]+\\*\\*"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"name": "markup.italic.documentation.mira",
|
|
48
|
+
"match": "\\*[^*]+\\*"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"name": "constant.character.escape.documentation.mira",
|
|
52
|
+
"match": "\\\\\\*"
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
"documentation-line": {
|
|
57
|
+
"patterns": [
|
|
58
|
+
{
|
|
59
|
+
"match": "^(?!\\s*\\*/)(\\s*\\*\\s?)(.*?)(?=\\*/|$)",
|
|
60
|
+
"captures": {
|
|
61
|
+
"1": {
|
|
62
|
+
"name": "comment.block.documentation.mira"
|
|
63
|
+
},
|
|
64
|
+
"2": {
|
|
65
|
+
"name": "meta.documentation.inline.mira",
|
|
66
|
+
"patterns": [
|
|
67
|
+
{
|
|
68
|
+
"include": "#documentation-inline"
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
},
|
|
76
|
+
"documentation-fragment": {
|
|
77
|
+
"patterns": [
|
|
78
|
+
{
|
|
79
|
+
"match": "(?!\\*/)(.+?)(?=\\*/|$)",
|
|
80
|
+
"captures": {
|
|
81
|
+
"1": {
|
|
82
|
+
"name": "meta.documentation.inline.mira",
|
|
83
|
+
"patterns": [
|
|
84
|
+
{
|
|
85
|
+
"include": "#documentation-inline"
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
},
|
|
93
|
+
"documentation-mirascript-fence": {
|
|
94
|
+
"patterns": [
|
|
95
|
+
{
|
|
96
|
+
"name": "markup.fenced_code.block.mira",
|
|
97
|
+
"begin": "^(\\s*\\*\\s?)(\\x60{3,})\\s*((?i:mirascript|MiraScript|mira|Mira))?\\s*$",
|
|
98
|
+
"beginCaptures": {
|
|
99
|
+
"1": {
|
|
100
|
+
"name": "comment.block.documentation.mira"
|
|
101
|
+
},
|
|
102
|
+
"2": {
|
|
103
|
+
"name": "punctuation.definition.markdown.mira"
|
|
104
|
+
},
|
|
105
|
+
"3": {
|
|
106
|
+
"name": "fenced_code.block.language.mira"
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"end": "^(?:(\\s*\\*\\s?)(\\2\\x60*)\\s*$)|(?=\\*/)",
|
|
110
|
+
"endCaptures": {
|
|
111
|
+
"1": {
|
|
112
|
+
"name": "comment.block.documentation.mira"
|
|
113
|
+
},
|
|
114
|
+
"2": {
|
|
115
|
+
"name": "punctuation.definition.markdown.mira"
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"patterns": [
|
|
119
|
+
{
|
|
120
|
+
"name": "meta.embedded.block.mira",
|
|
121
|
+
"contentName": "source.mira",
|
|
122
|
+
"begin": "^(?!\\s*\\*\\s*\\x60{3,}\\s*$)(?!.*\\*/)(\\s*\\*\\s?)",
|
|
123
|
+
"beginCaptures": {
|
|
124
|
+
"1": {
|
|
125
|
+
"name": "comment.block.documentation.mira"
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"while": "^(?!\\s*\\*\\s*\\x60{3,}\\s*$)(?!.*\\*/)(\\s*\\*\\s?)",
|
|
129
|
+
"whileCaptures": {
|
|
130
|
+
"1": {
|
|
131
|
+
"name": "comment.block.documentation.mira"
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"patterns": [
|
|
135
|
+
{
|
|
136
|
+
"include": "source.mira#source"
|
|
137
|
+
}
|
|
138
|
+
]
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"name": "comment.block.documentation.mira",
|
|
142
|
+
"match": "^(?!\\s*\\*/)(\\s*\\*\\s?)"
|
|
143
|
+
}
|
|
144
|
+
]
|
|
145
|
+
}
|
|
146
|
+
]
|
|
147
|
+
},
|
|
148
|
+
"documentation-other-fence": {
|
|
149
|
+
"patterns": [
|
|
150
|
+
{
|
|
151
|
+
"name": "markup.fenced_code.block.mira",
|
|
152
|
+
"contentName": "markup.raw.block.mira",
|
|
153
|
+
"begin": "^(\\s*\\*\\s?)(\\x60{3,})\\s*(\\S+)(?:\\s+.*)?\\s*$",
|
|
154
|
+
"beginCaptures": {
|
|
155
|
+
"1": {
|
|
156
|
+
"name": "comment.block.documentation.mira"
|
|
157
|
+
},
|
|
158
|
+
"2": {
|
|
159
|
+
"name": "punctuation.definition.markdown.mira"
|
|
160
|
+
},
|
|
161
|
+
"3": {
|
|
162
|
+
"name": "fenced_code.block.language.mira"
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
"end": "^(?:(\\s*\\*\\s?)(\\2\\x60*)\\s*$)|(?=\\*/)",
|
|
166
|
+
"endCaptures": {
|
|
167
|
+
"1": {
|
|
168
|
+
"name": "comment.block.documentation.mira"
|
|
169
|
+
},
|
|
170
|
+
"2": {
|
|
171
|
+
"name": "punctuation.definition.markdown.mira"
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
"patterns": [
|
|
175
|
+
{
|
|
176
|
+
"name": "comment.block.documentation.mira",
|
|
177
|
+
"match": "^(?!\\s*\\*/)(\\s*\\*\\s?)"
|
|
178
|
+
}
|
|
179
|
+
]
|
|
180
|
+
}
|
|
181
|
+
]
|
|
182
|
+
},
|
|
11
183
|
"doc": {
|
|
12
184
|
"patterns": [
|
|
185
|
+
{
|
|
186
|
+
"include": "#tag"
|
|
187
|
+
},
|
|
13
188
|
{
|
|
14
189
|
"include": "#global-value"
|
|
15
190
|
},
|
|
@@ -19,17 +194,20 @@
|
|
|
19
194
|
{
|
|
20
195
|
"include": "#inline-parameter"
|
|
21
196
|
},
|
|
197
|
+
{
|
|
198
|
+
"include": "#properties"
|
|
199
|
+
},
|
|
22
200
|
{
|
|
23
201
|
"include": "#inline-label"
|
|
24
202
|
},
|
|
25
203
|
{
|
|
26
|
-
"include": "#
|
|
204
|
+
"include": "#binding-value"
|
|
27
205
|
},
|
|
28
206
|
{
|
|
29
|
-
"include": "#
|
|
207
|
+
"include": "#bindings"
|
|
30
208
|
},
|
|
31
209
|
{
|
|
32
|
-
"include": "#
|
|
210
|
+
"include": "#function-signatures"
|
|
33
211
|
},
|
|
34
212
|
{
|
|
35
213
|
"include": "#generic-types"
|
|
@@ -41,23 +219,49 @@
|
|
|
41
219
|
"include": "#return-type"
|
|
42
220
|
},
|
|
43
221
|
{
|
|
44
|
-
"include": "#
|
|
222
|
+
"include": "#tag-comment"
|
|
45
223
|
},
|
|
46
224
|
{
|
|
47
225
|
"include": "source.mira"
|
|
48
226
|
}
|
|
49
227
|
]
|
|
50
228
|
},
|
|
229
|
+
"tag": {
|
|
230
|
+
"patterns": [
|
|
231
|
+
{
|
|
232
|
+
"name": "meta.documentation.tag.mira",
|
|
233
|
+
"contentName": "meta.documentation.tag.content.mira",
|
|
234
|
+
"begin": "(<)(?=(?:module|function|extern)(?:[ \\t]+[^>\\r\\n]*[^>\\s])?>)",
|
|
235
|
+
"beginCaptures": {
|
|
236
|
+
"1": {
|
|
237
|
+
"name": "punctuation.definition.tag.begin.mira"
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
"end": "(>)",
|
|
241
|
+
"endCaptures": {
|
|
242
|
+
"1": {
|
|
243
|
+
"name": "punctuation.definition.tag.end.mira"
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
"patterns": [
|
|
247
|
+
{
|
|
248
|
+
"include": "#tag-content"
|
|
249
|
+
}
|
|
250
|
+
]
|
|
251
|
+
}
|
|
252
|
+
]
|
|
253
|
+
},
|
|
51
254
|
"global-value": {
|
|
52
255
|
"patterns": [
|
|
53
256
|
{
|
|
257
|
+
"name": "meta.documentation.global-value.mira",
|
|
54
258
|
"begin": "^(\\x00)?(\\(global\\))(\\s+)((?:_+|@+|\\$+|\\p{XID_Start})\\p{XID_Continue}*)(\\s*)(=)",
|
|
55
259
|
"beginCaptures": {
|
|
56
260
|
"2": {
|
|
57
261
|
"name": "entity.name.label.mira"
|
|
58
262
|
},
|
|
59
263
|
"4": {
|
|
60
|
-
"name": "variable.other.
|
|
264
|
+
"name": "variable.other.mira"
|
|
61
265
|
},
|
|
62
266
|
"6": {
|
|
63
267
|
"name": "keyword.operator.assignment.mira"
|
|
@@ -171,6 +375,53 @@
|
|
|
171
375
|
}
|
|
172
376
|
]
|
|
173
377
|
},
|
|
378
|
+
"binding-value": {
|
|
379
|
+
"patterns": [
|
|
380
|
+
{
|
|
381
|
+
"begin": "(?<!\\p{XID_Continue})(let)(\\s+)(mut)(\\s+)((?:_+|@+|\\$+|\\p{XID_Start})\\p{XID_Continue}*)(\\s*)(=)",
|
|
382
|
+
"beginCaptures": {
|
|
383
|
+
"1": {
|
|
384
|
+
"name": "keyword.declaration.variable.mira"
|
|
385
|
+
},
|
|
386
|
+
"3": {
|
|
387
|
+
"name": "keyword.declaration.mutable.mira"
|
|
388
|
+
},
|
|
389
|
+
"5": {
|
|
390
|
+
"name": "variable.other.readwrite.mira"
|
|
391
|
+
},
|
|
392
|
+
"7": {
|
|
393
|
+
"name": "keyword.operator.assignment.mira"
|
|
394
|
+
}
|
|
395
|
+
},
|
|
396
|
+
"end": "$",
|
|
397
|
+
"patterns": [
|
|
398
|
+
{
|
|
399
|
+
"include": "#doc-value"
|
|
400
|
+
}
|
|
401
|
+
]
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
"begin": "(?<!\\p{XID_Continue})(let|const)(\\s+)((?:_+|@+|\\$+|\\p{XID_Start})\\p{XID_Continue}*)(\\s*)(=)",
|
|
405
|
+
"beginCaptures": {
|
|
406
|
+
"1": {
|
|
407
|
+
"name": "keyword.declaration.variable.mira"
|
|
408
|
+
},
|
|
409
|
+
"3": {
|
|
410
|
+
"name": "variable.other.constant.mira"
|
|
411
|
+
},
|
|
412
|
+
"5": {
|
|
413
|
+
"name": "keyword.operator.assignment.mira"
|
|
414
|
+
}
|
|
415
|
+
},
|
|
416
|
+
"end": "$",
|
|
417
|
+
"patterns": [
|
|
418
|
+
{
|
|
419
|
+
"include": "#doc-value"
|
|
420
|
+
}
|
|
421
|
+
]
|
|
422
|
+
}
|
|
423
|
+
]
|
|
424
|
+
},
|
|
174
425
|
"function-signatures": {
|
|
175
426
|
"patterns": [
|
|
176
427
|
{
|
|
@@ -192,19 +443,98 @@
|
|
|
192
443
|
"properties": {
|
|
193
444
|
"patterns": [
|
|
194
445
|
{
|
|
195
|
-
"
|
|
446
|
+
"name": "meta.documentation.field.mira",
|
|
447
|
+
"begin": "^(\\x00)?(?:(\\(field\\))(\\s+))?((?:(?:_+|@+|\\$+|\\p{XID_Start})\\p{XID_Continue}*|\\d+|\"(?:\\\\.|[^\"\\\\\\r\\n])*\"|'(?:\\\\.|[^'\\\\\\r\\n])*'))(\\s*)(\\??:)(?=[ \\t]*/\\*[ \\t]*<extern[ \\t]+(?:(?:async[ \\t]+)?function\\*?)(?:[ \\t]+[^>\\r\\n]*[^>\\s])?>[ \\t]*\\*/)",
|
|
196
448
|
"beginCaptures": {
|
|
197
|
-
"
|
|
449
|
+
"2": {
|
|
450
|
+
"name": "entity.name.label.mira"
|
|
451
|
+
},
|
|
452
|
+
"4": {
|
|
453
|
+
"name": "entity.name.function.mira"
|
|
454
|
+
},
|
|
455
|
+
"6": {
|
|
456
|
+
"name": "punctuation.separator.type.mira"
|
|
457
|
+
}
|
|
458
|
+
},
|
|
459
|
+
"end": "$",
|
|
460
|
+
"patterns": [
|
|
461
|
+
{
|
|
462
|
+
"include": "#tag-comment"
|
|
463
|
+
},
|
|
464
|
+
{
|
|
465
|
+
"include": "#tag"
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
"include": "#doc-record-value"
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
"include": "#doc-array-value"
|
|
472
|
+
},
|
|
473
|
+
{
|
|
474
|
+
"include": "#type-context"
|
|
475
|
+
}
|
|
476
|
+
]
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
"name": "meta.documentation.field.mira",
|
|
480
|
+
"begin": "^(\\x00)?(?:(\\(field\\))(\\s+))?((?:(?:_+|@+|\\$+|\\p{XID_Start})\\p{XID_Continue}*|\\d+|\"(?:\\\\.|[^\"\\\\\\r\\n])*\"|'(?:\\\\.|[^'\\\\\\r\\n])*'))(\\s*)(\\??:)(?=[ \\t]*/\\*[ \\t]*<extern[ \\t]+class(?:[ \\t]+[^>\\r\\n]*[^>\\s])?>[ \\t]*\\*/)",
|
|
481
|
+
"beginCaptures": {
|
|
482
|
+
"2": {
|
|
483
|
+
"name": "entity.name.label.mira"
|
|
484
|
+
},
|
|
485
|
+
"4": {
|
|
486
|
+
"name": "entity.name.type.mira"
|
|
487
|
+
},
|
|
488
|
+
"6": {
|
|
489
|
+
"name": "punctuation.separator.type.mira"
|
|
490
|
+
}
|
|
491
|
+
},
|
|
492
|
+
"end": "$",
|
|
493
|
+
"patterns": [
|
|
494
|
+
{
|
|
495
|
+
"include": "#tag-comment"
|
|
496
|
+
},
|
|
497
|
+
{
|
|
498
|
+
"include": "#tag"
|
|
499
|
+
},
|
|
500
|
+
{
|
|
501
|
+
"include": "#doc-record-value"
|
|
502
|
+
},
|
|
503
|
+
{
|
|
504
|
+
"include": "#doc-array-value"
|
|
505
|
+
},
|
|
506
|
+
{
|
|
507
|
+
"include": "#type-context"
|
|
508
|
+
}
|
|
509
|
+
]
|
|
510
|
+
},
|
|
511
|
+
{
|
|
512
|
+
"name": "meta.documentation.field.mira",
|
|
513
|
+
"begin": "^(\\x00)?(?:(\\(field\\))(\\s+))?((?:(?:_+|@+|\\$+|\\p{XID_Start})\\p{XID_Continue}*|\\d+|\"(?:\\\\.|[^\"\\\\\\r\\n])*\"|'(?:\\\\.|[^'\\\\\\r\\n])*'))(\\s*)(\\??:)",
|
|
514
|
+
"beginCaptures": {
|
|
515
|
+
"2": {
|
|
516
|
+
"name": "entity.name.label.mira"
|
|
517
|
+
},
|
|
518
|
+
"4": {
|
|
198
519
|
"name": "variable.other.property.mira"
|
|
199
520
|
},
|
|
200
|
-
"
|
|
521
|
+
"6": {
|
|
201
522
|
"name": "punctuation.separator.type.mira"
|
|
202
523
|
}
|
|
203
524
|
},
|
|
204
525
|
"end": "$",
|
|
205
526
|
"patterns": [
|
|
206
527
|
{
|
|
207
|
-
"include": "#
|
|
528
|
+
"include": "#tag-comment"
|
|
529
|
+
},
|
|
530
|
+
{
|
|
531
|
+
"include": "#tag"
|
|
532
|
+
},
|
|
533
|
+
{
|
|
534
|
+
"include": "#doc-record-value"
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
"include": "#doc-array-value"
|
|
208
538
|
},
|
|
209
539
|
{
|
|
210
540
|
"include": "#type-context"
|
|
@@ -216,17 +546,20 @@
|
|
|
216
546
|
"doc-value": {
|
|
217
547
|
"patterns": [
|
|
218
548
|
{
|
|
219
|
-
"include": "#
|
|
549
|
+
"include": "#tag-properties"
|
|
220
550
|
},
|
|
221
551
|
{
|
|
222
|
-
"include": "#
|
|
552
|
+
"include": "#tag-comment"
|
|
223
553
|
},
|
|
224
554
|
{
|
|
225
|
-
"include": "#
|
|
555
|
+
"include": "#tag"
|
|
226
556
|
},
|
|
227
557
|
{
|
|
228
558
|
"include": "#doc-record-value"
|
|
229
559
|
},
|
|
560
|
+
{
|
|
561
|
+
"include": "#doc-array-value"
|
|
562
|
+
},
|
|
230
563
|
{
|
|
231
564
|
"include": "source.mira"
|
|
232
565
|
}
|
|
@@ -255,10 +588,33 @@
|
|
|
255
588
|
}
|
|
256
589
|
]
|
|
257
590
|
},
|
|
258
|
-
"
|
|
591
|
+
"doc-array-value": {
|
|
592
|
+
"patterns": [
|
|
593
|
+
{
|
|
594
|
+
"begin": "\\[",
|
|
595
|
+
"beginCaptures": {
|
|
596
|
+
"0": {
|
|
597
|
+
"name": "punctuation.section.brackets.begin.mira"
|
|
598
|
+
}
|
|
599
|
+
},
|
|
600
|
+
"end": "\\]",
|
|
601
|
+
"endCaptures": {
|
|
602
|
+
"0": {
|
|
603
|
+
"name": "punctuation.section.brackets.end.mira"
|
|
604
|
+
}
|
|
605
|
+
},
|
|
606
|
+
"patterns": [
|
|
607
|
+
{
|
|
608
|
+
"include": "#doc-value"
|
|
609
|
+
}
|
|
610
|
+
]
|
|
611
|
+
}
|
|
612
|
+
]
|
|
613
|
+
},
|
|
614
|
+
"tag-properties": {
|
|
259
615
|
"patterns": [
|
|
260
616
|
{
|
|
261
|
-
"match": "((?:_+|@+|\\$+|\\p{XID_Start})\\p{XID_Continue}*)(\\s*)(:)(
|
|
617
|
+
"match": "((?:(?:_+|@+|\\$+|\\p{XID_Start})\\p{XID_Continue}*|\\d+|\"(?:\\\\.|[^\"\\\\\\r\\n])*\"|'(?:\\\\.|[^'\\\\\\r\\n])*'))(\\s*)(:)(?=[ \\t]*/\\*[ \\t]*<extern[ \\t]+(?:(?:async[ \\t]+)?function\\*?)(?:[ \\t]+[^>\\r\\n]*[^>\\s])?>[ \\t]*\\*/)",
|
|
262
618
|
"captures": {
|
|
263
619
|
"1": {
|
|
264
620
|
"name": "entity.name.function.mira"
|
|
@@ -267,13 +623,9 @@
|
|
|
267
623
|
"name": "punctuation.separator.key-value.mira"
|
|
268
624
|
}
|
|
269
625
|
}
|
|
270
|
-
}
|
|
271
|
-
]
|
|
272
|
-
},
|
|
273
|
-
"extern-class-properties": {
|
|
274
|
-
"patterns": [
|
|
626
|
+
},
|
|
275
627
|
{
|
|
276
|
-
"match": "((?:_+|@+|\\$+|\\p{XID_Start})\\p{XID_Continue}*)(\\s*)(:)(
|
|
628
|
+
"match": "((?:(?:_+|@+|\\$+|\\p{XID_Start})\\p{XID_Continue}*|\\d+|\"(?:\\\\.|[^\"\\\\\\r\\n])*\"|'(?:\\\\.|[^'\\\\\\r\\n])*'))(\\s*)(:)(?=[ \\t]*/\\*[ \\t]*<extern[ \\t]+class(?:[ \\t]+[^>\\r\\n]*[^>\\s])?>[ \\t]*\\*/)",
|
|
277
629
|
"captures": {
|
|
278
630
|
"1": {
|
|
279
631
|
"name": "entity.name.type.mira"
|
|
@@ -285,82 +637,125 @@
|
|
|
285
637
|
}
|
|
286
638
|
]
|
|
287
639
|
},
|
|
288
|
-
"
|
|
640
|
+
"tag-comment": {
|
|
289
641
|
"patterns": [
|
|
290
642
|
{
|
|
291
643
|
"name": "comment.block.mira",
|
|
292
|
-
"contentName": "meta.documentation.
|
|
293
|
-
"begin": "
|
|
644
|
+
"contentName": "meta.documentation.tag.mira",
|
|
645
|
+
"begin": "(/\\*)([ \\t]*)(<)(?=(?:module|function|extern)(?:[ \\t]+[^>\\r\\n]*[^>\\s])?>[ \\t]*\\*/)",
|
|
294
646
|
"beginCaptures": {
|
|
295
|
-
"
|
|
647
|
+
"1": {
|
|
296
648
|
"name": "punctuation.definition.comment.begin.mira"
|
|
649
|
+
},
|
|
650
|
+
"3": {
|
|
651
|
+
"name": "punctuation.definition.tag.begin.mira"
|
|
297
652
|
}
|
|
298
653
|
},
|
|
299
|
-
"end": "
|
|
654
|
+
"end": "(>)([ \\t]*)(\\*/)",
|
|
300
655
|
"endCaptures": {
|
|
301
|
-
"
|
|
656
|
+
"1": {
|
|
657
|
+
"name": "punctuation.definition.tag.end.mira"
|
|
658
|
+
},
|
|
659
|
+
"3": {
|
|
302
660
|
"name": "punctuation.definition.comment.end.mira"
|
|
303
661
|
}
|
|
304
662
|
},
|
|
305
663
|
"patterns": [
|
|
306
664
|
{
|
|
307
|
-
"
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
},
|
|
321
|
-
"7": {
|
|
322
|
-
"name": "entity.name.function.mira"
|
|
323
|
-
}
|
|
324
|
-
}
|
|
665
|
+
"include": "#tag-content"
|
|
666
|
+
}
|
|
667
|
+
]
|
|
668
|
+
}
|
|
669
|
+
]
|
|
670
|
+
},
|
|
671
|
+
"tag-content": {
|
|
672
|
+
"patterns": [
|
|
673
|
+
{
|
|
674
|
+
"match": "(extern)([ \\t]+)(?:(async)([ \\t]+))?(function)(\\*)?(?:([ \\t]+)([^>\\r\\n]*[^>\\s]))?(?=>)",
|
|
675
|
+
"captures": {
|
|
676
|
+
"1": {
|
|
677
|
+
"name": "keyword.declaration.extern.mira"
|
|
325
678
|
},
|
|
326
|
-
{
|
|
327
|
-
"
|
|
328
|
-
"captures": {
|
|
329
|
-
"1": {
|
|
330
|
-
"name": "storage.modifier.extern.mira"
|
|
331
|
-
},
|
|
332
|
-
"3": {
|
|
333
|
-
"name": "keyword.declaration.class.mira"
|
|
334
|
-
},
|
|
335
|
-
"4": {
|
|
336
|
-
"name": "entity.name.type.mira"
|
|
337
|
-
}
|
|
338
|
-
}
|
|
679
|
+
"3": {
|
|
680
|
+
"name": "keyword.js"
|
|
339
681
|
},
|
|
340
|
-
{
|
|
341
|
-
"
|
|
342
|
-
"captures": {
|
|
343
|
-
"1": {
|
|
344
|
-
"name": "storage.modifier.extern.mira"
|
|
345
|
-
},
|
|
346
|
-
"2": {
|
|
347
|
-
"name": "entity.name.type.mira"
|
|
348
|
-
}
|
|
349
|
-
}
|
|
682
|
+
"5": {
|
|
683
|
+
"name": "keyword.js"
|
|
350
684
|
},
|
|
351
|
-
{
|
|
352
|
-
"name": "
|
|
353
|
-
"match": "(?:_+|@+|\\$+|\\p{XID_Start})\\p{XID_Continue}*"
|
|
685
|
+
"6": {
|
|
686
|
+
"name": "keyword.operator.generator.js"
|
|
354
687
|
},
|
|
355
|
-
{
|
|
356
|
-
"name": "
|
|
357
|
-
|
|
688
|
+
"8": {
|
|
689
|
+
"name": "entity.name.function.js"
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
},
|
|
693
|
+
{
|
|
694
|
+
"match": "(extern)([ \\t]+)(class)(?:([ \\t]+)([^>\\r\\n]*[^>\\s]))?(?=>)",
|
|
695
|
+
"captures": {
|
|
696
|
+
"1": {
|
|
697
|
+
"name": "keyword.declaration.extern.mira"
|
|
358
698
|
},
|
|
359
|
-
{
|
|
360
|
-
"name": "
|
|
361
|
-
|
|
699
|
+
"3": {
|
|
700
|
+
"name": "keyword.js"
|
|
701
|
+
},
|
|
702
|
+
"5": {
|
|
703
|
+
"name": "entity.name.type.js"
|
|
362
704
|
}
|
|
363
|
-
|
|
705
|
+
}
|
|
706
|
+
},
|
|
707
|
+
{
|
|
708
|
+
"match": "(extern)([ \\t]+)([^>\\r\\n]*[^>\\s])(\\()(\\d[\\d_]*(?:\\.[\\d_]+)?(?:[eE][+-]?[\\d_]*\\d)?)(\\))(?=>)",
|
|
709
|
+
"captures": {
|
|
710
|
+
"1": {
|
|
711
|
+
"name": "keyword.declaration.extern.mira"
|
|
712
|
+
},
|
|
713
|
+
"3": {
|
|
714
|
+
"name": "entity.name.type.js"
|
|
715
|
+
},
|
|
716
|
+
"4": {
|
|
717
|
+
"name": "punctuation.section.parens.begin.mira"
|
|
718
|
+
},
|
|
719
|
+
"5": {
|
|
720
|
+
"name": "constant.numeric.mira"
|
|
721
|
+
},
|
|
722
|
+
"6": {
|
|
723
|
+
"name": "punctuation.section.parens.end.mira"
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
},
|
|
727
|
+
{
|
|
728
|
+
"match": "(extern)(?:([ \\t]+)([^>\\r\\n]*[^>\\s]))?(?=>)",
|
|
729
|
+
"captures": {
|
|
730
|
+
"1": {
|
|
731
|
+
"name": "keyword.declaration.extern.mira"
|
|
732
|
+
},
|
|
733
|
+
"3": {
|
|
734
|
+
"name": "entity.name.type.js"
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
},
|
|
738
|
+
{
|
|
739
|
+
"match": "(module)(?:([ \\t]+)([^>\\r\\n]*[^>\\s]))?(?=>)",
|
|
740
|
+
"captures": {
|
|
741
|
+
"1": {
|
|
742
|
+
"name": "keyword.declaration.module.mira"
|
|
743
|
+
},
|
|
744
|
+
"3": {
|
|
745
|
+
"name": "entity.name.namespace.mira"
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
},
|
|
749
|
+
{
|
|
750
|
+
"match": "(function)(?:([ \\t]+)([^>\\r\\n]*[^>\\s]))?(?=>)",
|
|
751
|
+
"captures": {
|
|
752
|
+
"1": {
|
|
753
|
+
"name": "keyword.declaration.function.mira"
|
|
754
|
+
},
|
|
755
|
+
"3": {
|
|
756
|
+
"name": "entity.name.function.mira"
|
|
757
|
+
}
|
|
758
|
+
}
|
|
364
759
|
}
|
|
365
760
|
]
|
|
366
761
|
},
|
|
@@ -370,7 +765,7 @@
|
|
|
370
765
|
"match": "(?<!\\p{XID_Continue})(type)(\\s*)(\\()(\\s*)((?:_+|@+|\\$+|\\p{XID_Start})\\p{XID_Continue}*)(\\s*)(\\))",
|
|
371
766
|
"captures": {
|
|
372
767
|
"1": {
|
|
373
|
-
"name": "
|
|
768
|
+
"name": "support.type.type.mira"
|
|
374
769
|
},
|
|
375
770
|
"3": {
|
|
376
771
|
"name": "punctuation.section.parens.begin.mira"
|
|
@@ -521,7 +916,7 @@
|
|
|
521
916
|
"name": "keyword.declaration.mutable.mira"
|
|
522
917
|
},
|
|
523
918
|
"5": {
|
|
524
|
-
"name": "variable.
|
|
919
|
+
"name": "variable.emphasis.mira"
|
|
525
920
|
},
|
|
526
921
|
"7": {
|
|
527
922
|
"name": "punctuation.separator.type.mira"
|
|
@@ -553,7 +948,7 @@
|
|
|
553
948
|
"match": "\\.\\."
|
|
554
949
|
},
|
|
555
950
|
{
|
|
556
|
-
"name": "variable.
|
|
951
|
+
"name": "variable.emphasis.mira",
|
|
557
952
|
"match": "(?:_+|@+|\\$+|\\p{XID_Start})\\p{XID_Continue}*"
|
|
558
953
|
},
|
|
559
954
|
{
|
|
@@ -652,11 +1047,7 @@
|
|
|
652
1047
|
},
|
|
653
1048
|
{
|
|
654
1049
|
"name": "support.type.builtin.mira",
|
|
655
|
-
"match": "(?<!\\p{XID_Continue})(?:unknown|boolean|number|string|record|extern|module|never|array|any|nil)(?!\\p{XID_Continue})"
|
|
656
|
-
},
|
|
657
|
-
{
|
|
658
|
-
"name": "constant.language.boolean.mira",
|
|
659
|
-
"match": "(?<!\\p{XID_Continue})(?:true|false)(?!\\p{XID_Continue})"
|
|
1050
|
+
"match": "(?<!\\p{XID_Continue})(?:unknown|boolean|number|string|record|extern|module|never|false|array|true|any|nil)(?!\\p{XID_Continue})"
|
|
660
1051
|
},
|
|
661
1052
|
{
|
|
662
1053
|
"name": "keyword.operator.type.mira",
|