tm-grammars 1.26.0 → 1.27.1
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/NOTICE +474 -3
- package/README.md +34 -31
- package/grammars/apex.json +1 -1
- package/grammars/blade.json +91 -16
- package/grammars/c3.json +1982 -0
- package/grammars/csharp.json +132 -19
- package/grammars/fortran-fixed-form.json +37 -0
- package/grammars/fortran-free-form.json +178 -49
- package/grammars/gn.json +155 -0
- package/grammars/go.json +3 -0
- package/grammars/kusto.json +1 -1
- package/grammars/latex.json +51 -10
- package/grammars/lean.json +0 -4
- package/grammars/lua.json +28 -5
- package/grammars/luau.json +2 -2
- package/grammars/markdown-nix.json +2 -2
- package/grammars/markdown-vue.json +1 -1
- package/grammars/marko.json +8 -8
- package/grammars/mermaid.json +68 -4
- package/grammars/mojo.json +1 -1
- package/grammars/moonbit.json +393 -0
- package/grammars/php.json +5 -1
- package/grammars/proto.json +5 -5
- package/grammars/r.json +325 -669
- package/grammars/razor.json +134 -19
- package/grammars/svelte.json +13 -2
- package/grammars/vue-directives.json +1 -1
- package/grammars/vue-interpolations.json +1 -1
- package/grammars/vue.json +269 -29
- package/index.js +213 -157
- package/package.json +1 -1
|
@@ -0,0 +1,393 @@
|
|
|
1
|
+
{
|
|
2
|
+
"displayName": "MoonBit",
|
|
3
|
+
"fileTypes": [
|
|
4
|
+
"mbt"
|
|
5
|
+
],
|
|
6
|
+
"name": "moonbit",
|
|
7
|
+
"patterns": [
|
|
8
|
+
{
|
|
9
|
+
"include": "#strings"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"include": "#comments"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"include": "#constants"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"include": "#keywords"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"include": "#functions"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"include": "#support"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"include": "#attribute"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"include": "#types"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"include": "#modules"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"include": "#variables"
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"repository": {
|
|
40
|
+
"attribute": {
|
|
41
|
+
"patterns": [
|
|
42
|
+
{
|
|
43
|
+
"captures": {
|
|
44
|
+
"1": {
|
|
45
|
+
"name": "keyword.control.directive"
|
|
46
|
+
},
|
|
47
|
+
"2": {
|
|
48
|
+
"patterns": [
|
|
49
|
+
{
|
|
50
|
+
"include": "#strings"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"match": "[ .0-9A-Z_a-z]+",
|
|
54
|
+
"name": "entity.name.tag"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"match": "=",
|
|
58
|
+
"name": "keyword.operator.attribute.moonbit"
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"match": "(#[a-z][ .0-9A-Z_a-z]*)(.*)"
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
"comments": {
|
|
68
|
+
"patterns": [
|
|
69
|
+
{
|
|
70
|
+
"match": "//[^/].*",
|
|
71
|
+
"name": "comment.line"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"begin": "///",
|
|
75
|
+
"name": "comment.block.documentation.moonbit",
|
|
76
|
+
"patterns": [
|
|
77
|
+
{
|
|
78
|
+
"begin": "\\s*```",
|
|
79
|
+
"beginCaptures": {
|
|
80
|
+
"0": {
|
|
81
|
+
"name": "markup.fenced_code.block.markdown"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"end": "\\s*```",
|
|
85
|
+
"endCaptures": {
|
|
86
|
+
"0": {
|
|
87
|
+
"name": "markup.fenced_code.block.markdown"
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"name": "meta.embedded.line.moonbit",
|
|
91
|
+
"patterns": [
|
|
92
|
+
{
|
|
93
|
+
"include": "$self"
|
|
94
|
+
}
|
|
95
|
+
]
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"match": ".*",
|
|
99
|
+
"name": "comment.block.documentation.moonbit"
|
|
100
|
+
}
|
|
101
|
+
],
|
|
102
|
+
"while": "///"
|
|
103
|
+
}
|
|
104
|
+
]
|
|
105
|
+
},
|
|
106
|
+
"constants": {
|
|
107
|
+
"patterns": [
|
|
108
|
+
{
|
|
109
|
+
"match": "\\b\\d([_\\d])*(?!\\.)((U)?(L)?|N?)\\b",
|
|
110
|
+
"name": "constant.numeric.moonbit"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"match": "(?<=\\.)\\d((?=\\.)|\\b)",
|
|
114
|
+
"name": "constant.numeric.moonbit"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"match": "\\b\\d+(?=\\.\\.)",
|
|
118
|
+
"name": "constant.numeric.moonbit"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"match": "\\b\\d[_\\d]*\\.[_\\d]*([Ee][-+]?\\d[_\\d]*\\b)?",
|
|
122
|
+
"name": "constant.numeric.moonbit"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"match": "\\b0[Oo][0-7][0-7]*((U)?(L)?|N?)\\b",
|
|
126
|
+
"name": "constant.numeric.moonbit"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"match": "\\b0[Xx][A-Fa-f\\d][A-F_a-f\\d]*(([LU]|UL|N)\\b|\\.[A-F_a-f\\d]*([Pp][-+]?[A-F_a-f\\d]+\\b)?)?",
|
|
130
|
+
"name": "constant.numeric.moonbit"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"match": "\\b(true|false)\\b",
|
|
134
|
+
"name": "constant.language.moonbit"
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
},
|
|
138
|
+
"escape": {
|
|
139
|
+
"patterns": [
|
|
140
|
+
{
|
|
141
|
+
"match": "\\\\[\"'0\\\\bnrt]",
|
|
142
|
+
"name": "constant.character.escape.moonbit"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"match": "\\\\x\\h{2}",
|
|
146
|
+
"name": "constant.character.escape.moonbit"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"match": "\\\\o[0-3][0-7]{2}",
|
|
150
|
+
"name": "constant.character.escape.moonbit"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"match": "\\\\u\\h{4}",
|
|
154
|
+
"name": "constant.character.escape.unicode.moonbit"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"match": "\\\\u\\{\\h*}",
|
|
158
|
+
"name": "constant.character.escape.unicode.moonbit"
|
|
159
|
+
}
|
|
160
|
+
]
|
|
161
|
+
},
|
|
162
|
+
"functions": {
|
|
163
|
+
"patterns": [
|
|
164
|
+
{
|
|
165
|
+
"captures": {
|
|
166
|
+
"1": {
|
|
167
|
+
"name": "keyword.moonbit"
|
|
168
|
+
},
|
|
169
|
+
"2": {
|
|
170
|
+
"name": "entity.name.type.moonbit"
|
|
171
|
+
},
|
|
172
|
+
"3": {
|
|
173
|
+
"name": "entity.name.function.moonbit"
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
"match": "\\b(fn)\\b\\s*(?:([A-Z][0-9A-Z_a-z]*)::)?([0-9_a-z][0-9A-Z_a-z]*)?\\b"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"begin": "(?!\\bfn\\s+)(?:\\.|::)?([0-9_a-z][0-9A-Z_a-z]*([!?]|!!)?)\\s*(\\()",
|
|
180
|
+
"beginCaptures": {
|
|
181
|
+
"1": {
|
|
182
|
+
"name": "entity.name.function.moonbit"
|
|
183
|
+
},
|
|
184
|
+
"2": {
|
|
185
|
+
"name": "punctuation.brackets.round.moonbit"
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
"end": "\\)",
|
|
189
|
+
"endCaptures": {
|
|
190
|
+
"0": {
|
|
191
|
+
"name": "punctuation.brackets.round.moonbit"
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
"name": "meta.function.call.moonbit",
|
|
195
|
+
"patterns": [
|
|
196
|
+
{
|
|
197
|
+
"include": "#comments"
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"include": "#constants"
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"include": "#keywords"
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
"include": "#functions"
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"include": "#support"
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"include": "#types"
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"include": "#modules"
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"include": "#strings"
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"include": "#variables"
|
|
222
|
+
}
|
|
223
|
+
]
|
|
224
|
+
}
|
|
225
|
+
]
|
|
226
|
+
},
|
|
227
|
+
"interpolation": {
|
|
228
|
+
"patterns": [
|
|
229
|
+
{
|
|
230
|
+
"begin": "\\\\\\{",
|
|
231
|
+
"beginCaptures": {
|
|
232
|
+
"0": {
|
|
233
|
+
"name": "punctuation.section.embedded.begin.moonbit"
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
"contentName": "source.moonbit",
|
|
237
|
+
"end": "}",
|
|
238
|
+
"endCaptures": {
|
|
239
|
+
"0": {
|
|
240
|
+
"name": "punctuation.section.embedded.end.moonbit"
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
"name": "meta.embedded.line.moonbit",
|
|
244
|
+
"patterns": [
|
|
245
|
+
{
|
|
246
|
+
"include": "$self"
|
|
247
|
+
}
|
|
248
|
+
]
|
|
249
|
+
}
|
|
250
|
+
]
|
|
251
|
+
},
|
|
252
|
+
"keywords": {
|
|
253
|
+
"patterns": [
|
|
254
|
+
{
|
|
255
|
+
"match": "\\b(async)\\b",
|
|
256
|
+
"name": "keyword.control.moonbit.async"
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
"match": "\\b(guard|if|while|break|continue|return|try|catch|except|raise|noraise|match|lexmatch|using|else|as|in|is|loop|for|async|defer)\\b",
|
|
260
|
+
"name": "keyword.control.moonbit"
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
"match": "\\b(type!|lexmatch\\?|(type|typealias|let|const|enum|struct|import|trait|traitalias|derive|test|impl|with|fnalias|recur|suberror|letrec|and)\\b)",
|
|
264
|
+
"name": "keyword.moonbit"
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"match": "\\b(mut|pub|priv|readonly|extern)\\b",
|
|
268
|
+
"name": "storage.modifier.moonbit"
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
"match": "->",
|
|
272
|
+
"name": "storage.type.function.arrow.moonbit"
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"match": "=>",
|
|
276
|
+
"name": "storage.type.function.arrow.moonbit"
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
"match": "=",
|
|
280
|
+
"name": "keyword.operator.assignment.moonbit"
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"match": "\\|>",
|
|
284
|
+
"name": "keyword.operator.other.moonbit"
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"match": "(===?|!=|>=|<=|(?<!-)(?<!\\|)>(?!>)|<(?!<))",
|
|
288
|
+
"name": "keyword.operator.comparison.moonbit"
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
"match": "(\\bnot\\b|&&|\\|\\|)",
|
|
292
|
+
"name": "keyword.operator.logical.moonbit"
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"match": "(\\|(?!\\|)(?!>)|&(?!&)|\\^|<<|>>)",
|
|
296
|
+
"name": "keyword.operator.bitwise.moonbit"
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
"match": "(\\+|-(?!>)|[%*/])",
|
|
300
|
+
"name": "keyword.operator.math.moonbit"
|
|
301
|
+
}
|
|
302
|
+
]
|
|
303
|
+
},
|
|
304
|
+
"modules": {
|
|
305
|
+
"patterns": [
|
|
306
|
+
{
|
|
307
|
+
"match": "@[A-Za-z][/-9A-Z_a-z]*",
|
|
308
|
+
"name": "entity.name.namespace.moonbit"
|
|
309
|
+
}
|
|
310
|
+
]
|
|
311
|
+
},
|
|
312
|
+
"strings": {
|
|
313
|
+
"patterns": [
|
|
314
|
+
{
|
|
315
|
+
"captures": {
|
|
316
|
+
"1": {
|
|
317
|
+
"name": "keyword.operator.other.moonbit"
|
|
318
|
+
}
|
|
319
|
+
},
|
|
320
|
+
"match": "(#\\|).*",
|
|
321
|
+
"name": "string.line"
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
"captures": {
|
|
325
|
+
"1": {
|
|
326
|
+
"name": "keyword.operator.other.moonbit"
|
|
327
|
+
},
|
|
328
|
+
"2": {
|
|
329
|
+
"patterns": [
|
|
330
|
+
{
|
|
331
|
+
"include": "#escape"
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
"include": "#interpolation"
|
|
335
|
+
}
|
|
336
|
+
]
|
|
337
|
+
}
|
|
338
|
+
},
|
|
339
|
+
"match": "(\\$\\|)(.*)",
|
|
340
|
+
"name": "string.line"
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
"begin": "'",
|
|
344
|
+
"end": "'",
|
|
345
|
+
"name": "string.quoted.single.moonbit",
|
|
346
|
+
"patterns": [
|
|
347
|
+
{
|
|
348
|
+
"include": "#escape"
|
|
349
|
+
}
|
|
350
|
+
]
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
"begin": "\"",
|
|
354
|
+
"end": "\"",
|
|
355
|
+
"name": "string.quoted.double.moonbit",
|
|
356
|
+
"patterns": [
|
|
357
|
+
{
|
|
358
|
+
"include": "#escape"
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
"include": "#interpolation"
|
|
362
|
+
}
|
|
363
|
+
]
|
|
364
|
+
}
|
|
365
|
+
]
|
|
366
|
+
},
|
|
367
|
+
"support": {
|
|
368
|
+
"patterns": [
|
|
369
|
+
{
|
|
370
|
+
"match": "\\b(Eq|Compare|Hash|Show|Default|ToJson|FromJson)\\b",
|
|
371
|
+
"name": "support.class.moonbit"
|
|
372
|
+
}
|
|
373
|
+
]
|
|
374
|
+
},
|
|
375
|
+
"types": {
|
|
376
|
+
"patterns": [
|
|
377
|
+
{
|
|
378
|
+
"match": "\\b(?<!@)[A-Z][0-9A-Z_a-z]*((\\?)+|\\b)",
|
|
379
|
+
"name": "entity.name.type.moonbit"
|
|
380
|
+
}
|
|
381
|
+
]
|
|
382
|
+
},
|
|
383
|
+
"variables": {
|
|
384
|
+
"patterns": [
|
|
385
|
+
{
|
|
386
|
+
"match": "\\b(?<!\\.|::)[_a-z][0-9A-Z_a-z]*\\b",
|
|
387
|
+
"name": "variable.other.moonbit"
|
|
388
|
+
}
|
|
389
|
+
]
|
|
390
|
+
}
|
|
391
|
+
},
|
|
392
|
+
"scopeName": "source.moonbit"
|
|
393
|
+
}
|
package/grammars/php.json
CHANGED
|
@@ -977,9 +977,13 @@
|
|
|
977
977
|
"name": "keyword.operator.arithmetic.php"
|
|
978
978
|
},
|
|
979
979
|
{
|
|
980
|
-
"match": "(?i)(!|&&|\\|\\|)|\\b(and|or|xor
|
|
980
|
+
"match": "(?i)(!|&&|\\|\\|)|\\b(and|or|xor)\\b",
|
|
981
981
|
"name": "keyword.operator.logical.php"
|
|
982
982
|
},
|
|
983
|
+
{
|
|
984
|
+
"match": "(?i)\\bas\\b",
|
|
985
|
+
"name": "keyword.operator.as.php"
|
|
986
|
+
},
|
|
983
987
|
{
|
|
984
988
|
"include": "#function-call"
|
|
985
989
|
},
|
package/grammars/proto.json
CHANGED
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"include": "#comments"
|
|
72
72
|
},
|
|
73
73
|
{
|
|
74
|
-
"begin": "([A-Za-z][0-9A-Z_a-z]*)\\s*(=)\\s*(0[Xx]\\h
|
|
74
|
+
"begin": "([A-Za-z][0-9A-Z_a-z]*)\\s*(=)\\s*(-?0[Xx]\\h+|-?[0-9]+)",
|
|
75
75
|
"beginCaptures": {
|
|
76
76
|
"1": {
|
|
77
77
|
"name": "variable.other.proto"
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
]
|
|
99
99
|
},
|
|
100
100
|
"field": {
|
|
101
|
-
"begin": "\\s*(optional|repeated|required)?\\s
|
|
101
|
+
"begin": "\\s*(optional|repeated|required)?\\s*(\\.?[.\\w]+)\\s+(\\w+)\\s*(=)\\s*(0[Xx]\\h+|[0-9]+)",
|
|
102
102
|
"beginCaptures": {
|
|
103
103
|
"1": {
|
|
104
104
|
"name": "storage.modifier.proto"
|
|
@@ -150,7 +150,7 @@
|
|
|
150
150
|
]
|
|
151
151
|
},
|
|
152
152
|
"ident": {
|
|
153
|
-
"match": "[A-Za-z][0-9A-Z_a-z]*",
|
|
153
|
+
"match": "\\.?[A-Za-z][.0-9A-Z_a-z]*",
|
|
154
154
|
"name": "entity.name.class.proto"
|
|
155
155
|
},
|
|
156
156
|
"import": {
|
|
@@ -202,7 +202,7 @@
|
|
|
202
202
|
]
|
|
203
203
|
},
|
|
204
204
|
"mapfield": {
|
|
205
|
-
"begin": "\\s*(map)\\s*(<)\\s*([.\\w]+)\\s*,\\s*([.\\w]+)\\s*(>)\\s+(\\w+)\\s*(=)\\s*(\\d+)",
|
|
205
|
+
"begin": "\\s*(map)\\s*(<)\\s*(\\.?[.\\w]+)\\s*,\\s*(\\.?[.\\w]+)\\s*(>)\\s+(\\w+)\\s*(=)\\s*(\\d+)",
|
|
206
206
|
"beginCaptures": {
|
|
207
207
|
"1": {
|
|
208
208
|
"name": "storage.type.proto"
|
|
@@ -470,7 +470,7 @@
|
|
|
470
470
|
"name": "storage.type.proto"
|
|
471
471
|
},
|
|
472
472
|
"string": {
|
|
473
|
-
"match": "(
|
|
473
|
+
"match": "([\"'])(?:\\\\.|[^\\\\])*?\\1",
|
|
474
474
|
"name": "string.quoted.double.proto"
|
|
475
475
|
},
|
|
476
476
|
"subMsgOption": {
|