tm-grammars 1.1.4 → 1.2.0
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 +12 -0
- package/README.md +1 -0
- package/grammars/move.json +1069 -0
- package/index.js +11 -0
- package/package.json +1 -1
package/NOTICE
CHANGED
|
@@ -4271,6 +4271,18 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
4271
4271
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
4272
4272
|
THE SOFTWARE.
|
|
4273
4273
|
|
|
4274
|
+
=========================================================================================================
|
|
4275
|
+
Files: move.json
|
|
4276
|
+
License: https://raw.githubusercontent.com/damirka/move-syntax/main/LICENSE
|
|
4277
|
+
SPDX: MIT
|
|
4278
|
+
---------------------------------------------------------------------------------------------------------
|
|
4279
|
+
Copyright 2021 Damir Shamanaev
|
|
4280
|
+
|
|
4281
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4282
|
+
|
|
4283
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
4284
|
+
|
|
4285
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
4274
4286
|
=========================================================================================================
|
|
4275
4287
|
Files: narrat.json
|
|
4276
4288
|
License: https://raw.githubusercontent.com/liana-p/narrat-syntax-highlighting-vscode/main/LICENSE
|
package/README.md
CHANGED
|
@@ -122,6 +122,7 @@ import { grammars } from 'tm-grammars'
|
|
|
122
122
|
| `mdx` | | [wooorm/markdown-tm-language](https://github.com/wooorm/markdown-tm-language/blob/371d61df9ddc3850e12aabe61b602d02e259e8a4/source.mdx.tmLanguage) | [MIT](https://raw.githubusercontent.com/wooorm/markdown-tm-language/main/license) | `tsx` `toml` `yaml` `c` `clojure` `coffee` `cpp` `csharp` `css` `diff` `docker` `elixir` `elm` `erlang` `go` `graphql` `haskell` `html` `ini` `java` `javascript` `json` `julia` `kotlin` `less` `lua` `make` `markdown` `objective-c` `perl` `python` `r` `ruby` `rust` `scala` `scss` `shellscript` `shellsession` `sql` `xml` `swift` `typescript` | 120.76 kB |
|
|
123
123
|
| `mermaid` | | [bpruitt-goddard/vscode-mermaid-syntax-highlight](https://github.com/bpruitt-goddard/vscode-mermaid-syntax-highlight/blob/8b62f487cb7a89afcd152febfbf47f5d4787657f/syntaxes/mermaid.tmLanguage.yaml) | [MIT](https://raw.githubusercontent.com/bpruitt-goddard/vscode-mermaid-syntax-highlight/master/LICENSE) | | 19.88 kB |
|
|
124
124
|
| `mojo` | | [modularml/mojo-syntax](https://github.com/modularml/mojo-syntax/blob/a2241dda06d9a20503394c3affa606114d007049/syntaxes/mojo.syntax.json) | [MIT](https://raw.githubusercontent.com/modularml/mojo-syntax/main/LICENSE) | | 72.95 kB |
|
|
125
|
+
| `move` | | [damirka/move-syntax](https://github.com/damirka/move-syntax/blob/de9244e81505ff9154dc9422dbce434ac86fb981/syntaxes/move.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/damirka/move-syntax/main/LICENSE) | | 13.82 kB |
|
|
125
126
|
| `narrat` | `nar` | [liana-p/narrat-syntax-highlighting-vscode](https://github.com/liana-p/narrat-syntax-highlighting-vscode/blob/00d4b410338fc50ca0ce77a1f7e873c1fb66d376/syntaxes/narrat.tmLanguage.yaml) | [MIT](https://raw.githubusercontent.com/liana-p/narrat-syntax-highlighting-vscode/main/LICENSE) | | 3.41 kB |
|
|
126
127
|
| `nextflow` | `nf` | [nextflow-io/vscode-language-nextflow](https://github.com/nextflow-io/vscode-language-nextflow/blob/7eeb9be8d01556b7c51c59307275c2f720f2ddf4/syntaxes/nextflow.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/nextflow-io/vscode-language-nextflow/master/LICENSE.md) | | 4.40 kB |
|
|
127
128
|
| `nginx` | | [hangxingliu/vscode-nginx-conf-hint](https://github.com/hangxingliu/vscode-nginx-conf-hint/blob/0582d5b71a31ff893b3587996b233f22239fba57/src/syntax/nginx.tmLanguage) | [GPL-3.0](https://raw.githubusercontent.com/hangxingliu/vscode-nginx-conf-hint/main/LICENSE) | `lua` | 32.83 kB |
|
|
@@ -0,0 +1,1069 @@
|
|
|
1
|
+
{
|
|
2
|
+
"displayName": "Move",
|
|
3
|
+
"name": "move",
|
|
4
|
+
"patterns": [
|
|
5
|
+
{
|
|
6
|
+
"include": "#address"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"include": "#comments"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"include": "#module"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"include": "#script"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"include": "#macros"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"repository": {
|
|
22
|
+
"address": {
|
|
23
|
+
"begin": "\\b(address)\\b",
|
|
24
|
+
"beginCaptures": {
|
|
25
|
+
"1": {
|
|
26
|
+
"name": "storage.modifier.type.address.keyword.move"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"comment": "Address block",
|
|
30
|
+
"end": "(?<=})",
|
|
31
|
+
"name": "meta.address_block.move",
|
|
32
|
+
"patterns": [
|
|
33
|
+
{
|
|
34
|
+
"include": "#comments"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"begin": "(?<=address)",
|
|
38
|
+
"comment": "Address value/const",
|
|
39
|
+
"end": "(?=[{])",
|
|
40
|
+
"name": "meta.address.definition.move",
|
|
41
|
+
"patterns": [
|
|
42
|
+
{
|
|
43
|
+
"include": "#comments"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"include": "#address_literal"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"comment": "Named Address",
|
|
50
|
+
"match": "\\b(\\w+)\\b",
|
|
51
|
+
"name": "entity.name.type.move"
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"include": "#module"
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
},
|
|
60
|
+
"address_literal": {
|
|
61
|
+
"patterns": [
|
|
62
|
+
{
|
|
63
|
+
"comment": "16-byte (or shorter) hex address in Libra",
|
|
64
|
+
"match": "\\b(0x[A-Fa-f0-9][A-Fa-f0-9]{,31})\\b",
|
|
65
|
+
"name": "support.constant.diem.address.move"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"comment": "Bech32 with wallet1 prefix - Dfinance format",
|
|
69
|
+
"match": "\\b(wallet1\\w{38})",
|
|
70
|
+
"name": "support.constant.dfinance.address.move"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"comment": "Named address parameter (as build flag)",
|
|
74
|
+
"match": "\\s([@]\\w+)\\b",
|
|
75
|
+
"name": "support.constant.named.address.move"
|
|
76
|
+
}
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
"as": {
|
|
80
|
+
"comment": "Keyword as",
|
|
81
|
+
"match": "\\b(as)\\b",
|
|
82
|
+
"name": "keyword.control.move"
|
|
83
|
+
},
|
|
84
|
+
"as-import": {
|
|
85
|
+
"comment": "Keyword as in import statement",
|
|
86
|
+
"match": "\\b(as)\\b",
|
|
87
|
+
"name": "meta.import_as.move"
|
|
88
|
+
},
|
|
89
|
+
"assert": {
|
|
90
|
+
"comment": "Assert built-in",
|
|
91
|
+
"match": "\\b(assert)\\b",
|
|
92
|
+
"name": "support.function.assert.move"
|
|
93
|
+
},
|
|
94
|
+
"block": {
|
|
95
|
+
"begin": "{",
|
|
96
|
+
"comment": "Block expression or definition",
|
|
97
|
+
"end": "}",
|
|
98
|
+
"name": "meta.block.move",
|
|
99
|
+
"patterns": [
|
|
100
|
+
{
|
|
101
|
+
"include": "#comments"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"include": "#as"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"include": "#mut"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"include": "#let"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"include": "#types"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"include": "#assert"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"include": "#literals"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"include": "#control"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"include": "#move_copy"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"include": "#resource_methods"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"include": "#module_access"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"include": "#fun_call"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"include": "#block"
|
|
138
|
+
}
|
|
139
|
+
]
|
|
140
|
+
},
|
|
141
|
+
"block-comments": {
|
|
142
|
+
"comment": "Supported since https://github.com/diem/diem/pull/3714",
|
|
143
|
+
"patterns": [
|
|
144
|
+
{
|
|
145
|
+
"begin": "/\\*[\\*!](?![\\*/])",
|
|
146
|
+
"comment": "Block documentation comment",
|
|
147
|
+
"end": "\\*/",
|
|
148
|
+
"name": "comment.block.documentation.move"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"begin": "/\\*",
|
|
152
|
+
"comment": "Block comment",
|
|
153
|
+
"end": "\\*/",
|
|
154
|
+
"name": "comment.block.move"
|
|
155
|
+
}
|
|
156
|
+
]
|
|
157
|
+
},
|
|
158
|
+
"comments": {
|
|
159
|
+
"name": "meta.comments.move",
|
|
160
|
+
"patterns": [
|
|
161
|
+
{
|
|
162
|
+
"include": "#line-comments"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"include": "#block-comments"
|
|
166
|
+
}
|
|
167
|
+
]
|
|
168
|
+
},
|
|
169
|
+
"const": {
|
|
170
|
+
"begin": "\\b(const)\\b",
|
|
171
|
+
"beginCaptures": {
|
|
172
|
+
"1": {
|
|
173
|
+
"name": "storage.modifier.const.move"
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
"end": ";",
|
|
177
|
+
"name": "meta.const.move",
|
|
178
|
+
"patterns": [
|
|
179
|
+
{
|
|
180
|
+
"include": "#comments"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"include": "#primitives"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"include": "#vector"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"include": "#literals"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"match": "\\b([\\w_]+)\\b",
|
|
193
|
+
"name": "constant.other.move"
|
|
194
|
+
}
|
|
195
|
+
]
|
|
196
|
+
},
|
|
197
|
+
"control": {
|
|
198
|
+
"comment": "Control flow",
|
|
199
|
+
"match": "\\b(return|while|loop|if|else|break|continue|abort)\\b",
|
|
200
|
+
"name": "keyword.control.move"
|
|
201
|
+
},
|
|
202
|
+
"entry_fun": {
|
|
203
|
+
"begin": "\\b(entry)\\b",
|
|
204
|
+
"beginCaptures": {
|
|
205
|
+
"1": {
|
|
206
|
+
"name": "storage.modifier.entry.move"
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
"comment": "entry fun name() {}",
|
|
210
|
+
"end": "(?<=})",
|
|
211
|
+
"name": "meta.entry_fun.move",
|
|
212
|
+
"patterns": [
|
|
213
|
+
{
|
|
214
|
+
"include": "#comments"
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"comment": "entry native function",
|
|
218
|
+
"match": "\\b(native)\\b",
|
|
219
|
+
"name": "storage.modifier.native.move"
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
"comment": "entry public function",
|
|
223
|
+
"match": "\\b(public)\\b",
|
|
224
|
+
"name": "storage.modifier.public.move"
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"include": "#fun"
|
|
228
|
+
}
|
|
229
|
+
]
|
|
230
|
+
},
|
|
231
|
+
"friend": {
|
|
232
|
+
"begin": "\\b(friend)\\b",
|
|
233
|
+
"beginCaptures": {
|
|
234
|
+
"1": {
|
|
235
|
+
"name": "storage.modifier.type.move"
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
"end": ";",
|
|
239
|
+
"name": "meta.friend.move",
|
|
240
|
+
"patterns": [
|
|
241
|
+
{
|
|
242
|
+
"include": "#comments"
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"include": "#address_literal"
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"comment": "Name of the imported module",
|
|
249
|
+
"match": "\\b(\\w+)\\b",
|
|
250
|
+
"name": "entity.name.type.module.move"
|
|
251
|
+
}
|
|
252
|
+
]
|
|
253
|
+
},
|
|
254
|
+
"fun": {
|
|
255
|
+
"patterns": [
|
|
256
|
+
{
|
|
257
|
+
"include": "#fun_signature"
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"include": "#fun_body"
|
|
261
|
+
}
|
|
262
|
+
]
|
|
263
|
+
},
|
|
264
|
+
"fun_body": {
|
|
265
|
+
"begin": "{",
|
|
266
|
+
"comment": "Function body",
|
|
267
|
+
"end": "}",
|
|
268
|
+
"name": "meta.fun_body.move",
|
|
269
|
+
"patterns": [
|
|
270
|
+
{
|
|
271
|
+
"include": "#comments"
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"include": "#import"
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
"include": "#as"
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
"include": "#mut"
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"include": "#let"
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
"include": "#types"
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
"include": "#assert"
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
"include": "#literals"
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"include": "#control"
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
"include": "#move_copy"
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
"include": "#resource_methods"
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
"include": "#self_access"
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"include": "#module_access"
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"include": "#fun_call"
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
"include": "#block"
|
|
314
|
+
}
|
|
315
|
+
]
|
|
316
|
+
},
|
|
317
|
+
"fun_call": {
|
|
318
|
+
"begin": "\\b(\\w+)\\s*(?:<[\\w\\s,]+>)?\\s*[(]",
|
|
319
|
+
"beginCaptures": {
|
|
320
|
+
"1": {
|
|
321
|
+
"name": "entity.name.function.call.move"
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
"comment": "Function call",
|
|
325
|
+
"end": "[)]",
|
|
326
|
+
"name": "meta.fun_call.move",
|
|
327
|
+
"patterns": [
|
|
328
|
+
{
|
|
329
|
+
"include": "#comments"
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
"include": "#resource_methods"
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
"include": "#self_access"
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
"include": "#module_access"
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
"include": "#move_copy"
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
"include": "#literals"
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
"include": "#fun_call"
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
"include": "#block"
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
"include": "#mut"
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"include": "#as"
|
|
357
|
+
}
|
|
358
|
+
]
|
|
359
|
+
},
|
|
360
|
+
"fun_signature": {
|
|
361
|
+
"begin": "\\b(fun)\\b",
|
|
362
|
+
"beginCaptures": {
|
|
363
|
+
"1": {
|
|
364
|
+
"name": "storage.modifier.fun.move"
|
|
365
|
+
}
|
|
366
|
+
},
|
|
367
|
+
"comment": "Function signature",
|
|
368
|
+
"end": "(?=[;{])",
|
|
369
|
+
"name": "meta.fun_signature.move",
|
|
370
|
+
"patterns": [
|
|
371
|
+
{
|
|
372
|
+
"include": "#comments"
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
"include": "#module_access"
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
"include": "#types"
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
"include": "#mut"
|
|
382
|
+
},
|
|
383
|
+
{
|
|
384
|
+
"begin": "(?<=fun)",
|
|
385
|
+
"comment": "Function name",
|
|
386
|
+
"end": "(?=[<(])",
|
|
387
|
+
"name": "meta.function_name.move",
|
|
388
|
+
"patterns": [
|
|
389
|
+
{
|
|
390
|
+
"include": "#comments"
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
"match": "\\b(\\w+)\\b",
|
|
394
|
+
"name": "entity.name.function.move"
|
|
395
|
+
}
|
|
396
|
+
]
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
"include": "#type_param"
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
"begin": "[(]",
|
|
403
|
+
"comment": "Parentheses",
|
|
404
|
+
"end": "[)]",
|
|
405
|
+
"name": "meta.parentheses.move",
|
|
406
|
+
"patterns": [
|
|
407
|
+
{
|
|
408
|
+
"include": "#comments"
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
"include": "#self_access"
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
"include": "#module_access"
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
"include": "#types"
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
"include": "#mut"
|
|
421
|
+
}
|
|
422
|
+
]
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
"comment": "Keyword acquires",
|
|
426
|
+
"match": "\\b(acquires)\\b",
|
|
427
|
+
"name": "storage.modifier"
|
|
428
|
+
}
|
|
429
|
+
]
|
|
430
|
+
},
|
|
431
|
+
"import": {
|
|
432
|
+
"begin": "\\b(use)\\b",
|
|
433
|
+
"beginCaptures": {
|
|
434
|
+
"1": {
|
|
435
|
+
"name": "storage.modifier.type.move"
|
|
436
|
+
}
|
|
437
|
+
},
|
|
438
|
+
"end": ";",
|
|
439
|
+
"name": "meta.import.move",
|
|
440
|
+
"patterns": [
|
|
441
|
+
{
|
|
442
|
+
"include": "#comments"
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
"include": "#address_literal"
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
"include": "#as-import"
|
|
449
|
+
},
|
|
450
|
+
{
|
|
451
|
+
"comment": "Uppercase entities",
|
|
452
|
+
"match": "\\b([A-Z]\\w*)\\b",
|
|
453
|
+
"name": "entity.name.type.move"
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
"begin": "{",
|
|
457
|
+
"comment": "Module members",
|
|
458
|
+
"end": "}",
|
|
459
|
+
"patterns": [
|
|
460
|
+
{
|
|
461
|
+
"include": "#comments"
|
|
462
|
+
},
|
|
463
|
+
{
|
|
464
|
+
"include": "#as-import"
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
"comment": "Uppercase entities",
|
|
468
|
+
"match": "\\b([A-Z]\\w*)\\b",
|
|
469
|
+
"name": "entity.name.type.move"
|
|
470
|
+
}
|
|
471
|
+
]
|
|
472
|
+
},
|
|
473
|
+
{
|
|
474
|
+
"comment": "Name of the imported module",
|
|
475
|
+
"match": "\\b(\\w+)\\b",
|
|
476
|
+
"name": "meta.entity.name.type.module.move"
|
|
477
|
+
}
|
|
478
|
+
]
|
|
479
|
+
},
|
|
480
|
+
"let": {
|
|
481
|
+
"comment": "Keyword let",
|
|
482
|
+
"match": "\\b(let)\\b",
|
|
483
|
+
"name": "keyword.control.move"
|
|
484
|
+
},
|
|
485
|
+
"line-comments": {
|
|
486
|
+
"begin": "//",
|
|
487
|
+
"comment": "Single-line comment",
|
|
488
|
+
"end": "$",
|
|
489
|
+
"name": "comment.line.double-slash.move"
|
|
490
|
+
},
|
|
491
|
+
"literals": {
|
|
492
|
+
"patterns": [
|
|
493
|
+
{
|
|
494
|
+
"comment": "Hex literal (still to find out)",
|
|
495
|
+
"match": "0x[_a-fA-F0-9]+(?:[iu](?:8|16|32|64|size))?",
|
|
496
|
+
"name": "constant.numeric.hex.move"
|
|
497
|
+
},
|
|
498
|
+
{
|
|
499
|
+
"comment": "Numeric literal",
|
|
500
|
+
"match": "(?<!(?:\\w|(?:(?<!\\.)\\.)))[0-9][_0-9]*(?:\\.(?!\\.)(?:[0-9][_0-9]*)?)?(?:[eE][+\\-]?[_0-9]+)?(?:[u](?:8|16|32|64|128|256))?",
|
|
501
|
+
"name": "constant.numeric.move"
|
|
502
|
+
},
|
|
503
|
+
{
|
|
504
|
+
"captures": {
|
|
505
|
+
"1": {
|
|
506
|
+
"name": "constant.character.move"
|
|
507
|
+
}
|
|
508
|
+
},
|
|
509
|
+
"comment": "Bytearray hex literal",
|
|
510
|
+
"match": "\\b(?:h)(\"[a-fA-F0-9]+\")"
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
"begin": "\\bb\"",
|
|
514
|
+
"comment": "ASCII Bytestring literal",
|
|
515
|
+
"end": "\"",
|
|
516
|
+
"name": "meta.ascii_literal.move",
|
|
517
|
+
"patterns": [
|
|
518
|
+
{
|
|
519
|
+
"comment": "Special symbol escape",
|
|
520
|
+
"match": "\\\\[nrt\\0\"]",
|
|
521
|
+
"name": "constant.character.escape.move"
|
|
522
|
+
},
|
|
523
|
+
{
|
|
524
|
+
"comment": "HEX Escape",
|
|
525
|
+
"match": "\\\\x[a-fA-F0-9][A-Fa-f0-9]",
|
|
526
|
+
"name": "constant.character.escape.hex.move"
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
"comment": "ASCII Character",
|
|
530
|
+
"match": "[\\x00-\\x7F]",
|
|
531
|
+
"name": "string.quoted.double.raw.move"
|
|
532
|
+
}
|
|
533
|
+
]
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
"captures": {
|
|
537
|
+
"1": {
|
|
538
|
+
"name": "constant.numeric.hex.move"
|
|
539
|
+
}
|
|
540
|
+
},
|
|
541
|
+
"comment": "vector<u8> as hex literal: x",
|
|
542
|
+
"match": "x\"([A-F0-9a-f]+)\"",
|
|
543
|
+
"name": "meta.hex_literal.move"
|
|
544
|
+
},
|
|
545
|
+
{
|
|
546
|
+
"comment": "Booleans",
|
|
547
|
+
"match": "\\b(?:true|false)\\b",
|
|
548
|
+
"name": "constant.language.boolean.move"
|
|
549
|
+
},
|
|
550
|
+
{
|
|
551
|
+
"include": "#address_literal"
|
|
552
|
+
}
|
|
553
|
+
]
|
|
554
|
+
},
|
|
555
|
+
"macros": {
|
|
556
|
+
"match": "#\\[(?:[\\w0-9=,_\\(\\)\\s\"\\:=]+)\\]",
|
|
557
|
+
"name": "support.constant.macro.move"
|
|
558
|
+
},
|
|
559
|
+
"module": {
|
|
560
|
+
"begin": "\\b(module|spec)\\b",
|
|
561
|
+
"beginCaptures": {
|
|
562
|
+
"1": {
|
|
563
|
+
"name": "storage.modifier.type.move"
|
|
564
|
+
}
|
|
565
|
+
},
|
|
566
|
+
"comment": "Module definition",
|
|
567
|
+
"end": "(?<=})",
|
|
568
|
+
"name": "meta.module.move",
|
|
569
|
+
"patterns": [
|
|
570
|
+
{
|
|
571
|
+
"include": "#comments"
|
|
572
|
+
},
|
|
573
|
+
{
|
|
574
|
+
"begin": "(?<=(module|spec))",
|
|
575
|
+
"comment": "Module name",
|
|
576
|
+
"end": "(?={)",
|
|
577
|
+
"patterns": [
|
|
578
|
+
{
|
|
579
|
+
"include": "#comments"
|
|
580
|
+
},
|
|
581
|
+
{
|
|
582
|
+
"begin": "(?<=(module|spec))",
|
|
583
|
+
"comment": "Module namespace / address",
|
|
584
|
+
"end": "(?=[(::){])",
|
|
585
|
+
"name": "constant.other.move"
|
|
586
|
+
},
|
|
587
|
+
{
|
|
588
|
+
"begin": "(?<=::)",
|
|
589
|
+
"comment": "Module name",
|
|
590
|
+
"end": "(?=[\\s{])",
|
|
591
|
+
"name": "entity.name.type.move"
|
|
592
|
+
}
|
|
593
|
+
]
|
|
594
|
+
},
|
|
595
|
+
{
|
|
596
|
+
"begin": "{",
|
|
597
|
+
"comment": "Module scope",
|
|
598
|
+
"end": "}",
|
|
599
|
+
"name": "meta.module_scope.move",
|
|
600
|
+
"patterns": [
|
|
601
|
+
{
|
|
602
|
+
"include": "#comments"
|
|
603
|
+
},
|
|
604
|
+
{
|
|
605
|
+
"include": "#macros"
|
|
606
|
+
},
|
|
607
|
+
{
|
|
608
|
+
"include": "#import"
|
|
609
|
+
},
|
|
610
|
+
{
|
|
611
|
+
"include": "#friend"
|
|
612
|
+
},
|
|
613
|
+
{
|
|
614
|
+
"include": "#const"
|
|
615
|
+
},
|
|
616
|
+
{
|
|
617
|
+
"include": "#struct"
|
|
618
|
+
},
|
|
619
|
+
{
|
|
620
|
+
"include": "#entry_fun"
|
|
621
|
+
},
|
|
622
|
+
{
|
|
623
|
+
"include": "#native_fun"
|
|
624
|
+
},
|
|
625
|
+
{
|
|
626
|
+
"include": "#public_fun"
|
|
627
|
+
},
|
|
628
|
+
{
|
|
629
|
+
"include": "#fun"
|
|
630
|
+
},
|
|
631
|
+
{
|
|
632
|
+
"include": "#spec"
|
|
633
|
+
},
|
|
634
|
+
{
|
|
635
|
+
"include": "#block"
|
|
636
|
+
}
|
|
637
|
+
]
|
|
638
|
+
}
|
|
639
|
+
]
|
|
640
|
+
},
|
|
641
|
+
"module_access": {
|
|
642
|
+
"captures": {
|
|
643
|
+
"1": {
|
|
644
|
+
"name": "meta.entity.name.type.accessed.module.move"
|
|
645
|
+
},
|
|
646
|
+
"2": {
|
|
647
|
+
"name": "entity.name.function.call.move"
|
|
648
|
+
}
|
|
649
|
+
},
|
|
650
|
+
"comment": "Use of module type or method",
|
|
651
|
+
"match": "\\b(\\w+)::(\\w+)\\b",
|
|
652
|
+
"name": "meta.module_access.move"
|
|
653
|
+
},
|
|
654
|
+
"move_copy": {
|
|
655
|
+
"comment": "Keywords move and copy",
|
|
656
|
+
"match": "\\b(move|copy)\\b",
|
|
657
|
+
"name": "variable.language.move"
|
|
658
|
+
},
|
|
659
|
+
"mut": {
|
|
660
|
+
"comment": "&mut reference",
|
|
661
|
+
"match": "(?<=&)(mut)\\b",
|
|
662
|
+
"name": "storage.modifier.mut.move"
|
|
663
|
+
},
|
|
664
|
+
"native_fun": {
|
|
665
|
+
"begin": "\\b(native)\\b",
|
|
666
|
+
"beginCaptures": {
|
|
667
|
+
"1": {
|
|
668
|
+
"name": "storage.modifier.native.move"
|
|
669
|
+
}
|
|
670
|
+
},
|
|
671
|
+
"comment": "Native function",
|
|
672
|
+
"end": "(?<=[;}])",
|
|
673
|
+
"name": "meta.native_fun.move",
|
|
674
|
+
"patterns": [
|
|
675
|
+
{
|
|
676
|
+
"include": "#comments"
|
|
677
|
+
},
|
|
678
|
+
{
|
|
679
|
+
"comment": "native public function",
|
|
680
|
+
"match": "\\b(public)\\b",
|
|
681
|
+
"name": "storage.modifier.public.move"
|
|
682
|
+
},
|
|
683
|
+
{
|
|
684
|
+
"comment": "native entry function",
|
|
685
|
+
"match": "\\b(entry)\\b",
|
|
686
|
+
"name": "storage.modifier.entry.move"
|
|
687
|
+
},
|
|
688
|
+
{
|
|
689
|
+
"include": "#fun_signature"
|
|
690
|
+
}
|
|
691
|
+
]
|
|
692
|
+
},
|
|
693
|
+
"phantom": {
|
|
694
|
+
"comment": "Keyword phantom inside type parameters",
|
|
695
|
+
"match": "\\b(phantom)\\b",
|
|
696
|
+
"name": "keyword.control.phantom.move"
|
|
697
|
+
},
|
|
698
|
+
"primitives": {
|
|
699
|
+
"comment": "Primitive types",
|
|
700
|
+
"match": "\\b(u8|u16|u32|u64|u128|u256|address|bool|signer)\\b",
|
|
701
|
+
"name": "support.type.primitives.move"
|
|
702
|
+
},
|
|
703
|
+
"public_fun": {
|
|
704
|
+
"begin": "\\b(public)\\b",
|
|
705
|
+
"beginCaptures": {
|
|
706
|
+
"1": {
|
|
707
|
+
"name": "storage.modifier.public.move"
|
|
708
|
+
}
|
|
709
|
+
},
|
|
710
|
+
"comment": "Public function",
|
|
711
|
+
"end": "(?<=[;}])",
|
|
712
|
+
"name": "meta.public_fun.move",
|
|
713
|
+
"patterns": [
|
|
714
|
+
{
|
|
715
|
+
"include": "#comments"
|
|
716
|
+
},
|
|
717
|
+
{
|
|
718
|
+
"comment": "Public native function",
|
|
719
|
+
"match": "\\b(native)\\b",
|
|
720
|
+
"name": "storage.modifier.native.move"
|
|
721
|
+
},
|
|
722
|
+
{
|
|
723
|
+
"comment": "Public entry function",
|
|
724
|
+
"match": "\\b(entry)\\b",
|
|
725
|
+
"name": "storage.modifier.entry.move"
|
|
726
|
+
},
|
|
727
|
+
{
|
|
728
|
+
"begin": "\\(",
|
|
729
|
+
"comment": "Script visibility",
|
|
730
|
+
"end": "\\)",
|
|
731
|
+
"patterns": [
|
|
732
|
+
{
|
|
733
|
+
"include": "#comments"
|
|
734
|
+
},
|
|
735
|
+
{
|
|
736
|
+
"comment": "Friend or Script visibility",
|
|
737
|
+
"match": "\\b(script|friend)\\b",
|
|
738
|
+
"name": "storage.modifier.public.script.move"
|
|
739
|
+
}
|
|
740
|
+
]
|
|
741
|
+
},
|
|
742
|
+
{
|
|
743
|
+
"include": "#fun"
|
|
744
|
+
}
|
|
745
|
+
]
|
|
746
|
+
},
|
|
747
|
+
"resource_methods": {
|
|
748
|
+
"comment": "Methods to work with resource",
|
|
749
|
+
"match": "\\b(borrow_global|borrow_global_mut|exists|move_from|move_to_sender|move_to)\\b",
|
|
750
|
+
"name": "support.function.typed.move"
|
|
751
|
+
},
|
|
752
|
+
"script": {
|
|
753
|
+
"begin": "\\b(script)\\b",
|
|
754
|
+
"beginCaptures": {
|
|
755
|
+
"1": {
|
|
756
|
+
"name": "storage.modifier.script.move"
|
|
757
|
+
}
|
|
758
|
+
},
|
|
759
|
+
"end": "(?<=})",
|
|
760
|
+
"name": "meta.script.move",
|
|
761
|
+
"patterns": [
|
|
762
|
+
{
|
|
763
|
+
"include": "#comments"
|
|
764
|
+
},
|
|
765
|
+
{
|
|
766
|
+
"begin": "{",
|
|
767
|
+
"comment": "Script scope",
|
|
768
|
+
"end": "}",
|
|
769
|
+
"name": "meta.script_scope.move",
|
|
770
|
+
"patterns": [
|
|
771
|
+
{
|
|
772
|
+
"include": "#const"
|
|
773
|
+
},
|
|
774
|
+
{
|
|
775
|
+
"include": "#comments"
|
|
776
|
+
},
|
|
777
|
+
{
|
|
778
|
+
"include": "#import"
|
|
779
|
+
},
|
|
780
|
+
{
|
|
781
|
+
"include": "#fun"
|
|
782
|
+
}
|
|
783
|
+
]
|
|
784
|
+
}
|
|
785
|
+
]
|
|
786
|
+
},
|
|
787
|
+
"self_access": {
|
|
788
|
+
"captures": {
|
|
789
|
+
"1": {
|
|
790
|
+
"name": "variable.language.self.move"
|
|
791
|
+
},
|
|
792
|
+
"2": {
|
|
793
|
+
"name": "entity.name.function.call.move"
|
|
794
|
+
}
|
|
795
|
+
},
|
|
796
|
+
"comment": "Use of Self",
|
|
797
|
+
"match": "\\b(Self)::(\\w+)\\b",
|
|
798
|
+
"name": "meta.self_access.move"
|
|
799
|
+
},
|
|
800
|
+
"spec": {
|
|
801
|
+
"begin": "\\b(spec)\\b",
|
|
802
|
+
"beginCaptures": {
|
|
803
|
+
"1": {
|
|
804
|
+
"name": "storage.modifier.spec.move"
|
|
805
|
+
}
|
|
806
|
+
},
|
|
807
|
+
"end": "(?<=[;}])",
|
|
808
|
+
"name": "meta.spec.move",
|
|
809
|
+
"patterns": [
|
|
810
|
+
{
|
|
811
|
+
"comment": "Spec target",
|
|
812
|
+
"match": "\\b(module|schema|struct|fun)",
|
|
813
|
+
"name": "storage.modifier.spec.target.move"
|
|
814
|
+
},
|
|
815
|
+
{
|
|
816
|
+
"comment": "Spec define inline",
|
|
817
|
+
"match": "\\b(define)",
|
|
818
|
+
"name": "storage.modifier.spec.define.move"
|
|
819
|
+
},
|
|
820
|
+
{
|
|
821
|
+
"comment": "Target name",
|
|
822
|
+
"match": "\\b(\\w+)\\b",
|
|
823
|
+
"name": "entity.name.function.move"
|
|
824
|
+
},
|
|
825
|
+
{
|
|
826
|
+
"begin": "{",
|
|
827
|
+
"comment": "Spec block",
|
|
828
|
+
"end": "}",
|
|
829
|
+
"patterns": [
|
|
830
|
+
{
|
|
831
|
+
"include": "#comments"
|
|
832
|
+
},
|
|
833
|
+
{
|
|
834
|
+
"include": "#spec_block"
|
|
835
|
+
},
|
|
836
|
+
{
|
|
837
|
+
"include": "#spec_types"
|
|
838
|
+
},
|
|
839
|
+
{
|
|
840
|
+
"include": "#spec_define"
|
|
841
|
+
},
|
|
842
|
+
{
|
|
843
|
+
"include": "#spec_keywords"
|
|
844
|
+
},
|
|
845
|
+
{
|
|
846
|
+
"include": "#control"
|
|
847
|
+
},
|
|
848
|
+
{
|
|
849
|
+
"include": "#fun_call"
|
|
850
|
+
},
|
|
851
|
+
{
|
|
852
|
+
"include": "#literals"
|
|
853
|
+
},
|
|
854
|
+
{
|
|
855
|
+
"include": "#types"
|
|
856
|
+
},
|
|
857
|
+
{
|
|
858
|
+
"include": "#let"
|
|
859
|
+
}
|
|
860
|
+
]
|
|
861
|
+
}
|
|
862
|
+
]
|
|
863
|
+
},
|
|
864
|
+
"spec_block": {
|
|
865
|
+
"begin": "{",
|
|
866
|
+
"comment": "Spec block",
|
|
867
|
+
"end": "}",
|
|
868
|
+
"name": "meta.spec_block.move",
|
|
869
|
+
"patterns": [
|
|
870
|
+
{
|
|
871
|
+
"include": "#comments"
|
|
872
|
+
},
|
|
873
|
+
{
|
|
874
|
+
"include": "#spec_block"
|
|
875
|
+
},
|
|
876
|
+
{
|
|
877
|
+
"include": "#spec_types"
|
|
878
|
+
},
|
|
879
|
+
{
|
|
880
|
+
"include": "#fun_call"
|
|
881
|
+
},
|
|
882
|
+
{
|
|
883
|
+
"include": "#literals"
|
|
884
|
+
},
|
|
885
|
+
{
|
|
886
|
+
"include": "#control"
|
|
887
|
+
},
|
|
888
|
+
{
|
|
889
|
+
"include": "#types"
|
|
890
|
+
},
|
|
891
|
+
{
|
|
892
|
+
"include": "#let"
|
|
893
|
+
}
|
|
894
|
+
]
|
|
895
|
+
},
|
|
896
|
+
"spec_define": {
|
|
897
|
+
"begin": "\\b(define)\\b",
|
|
898
|
+
"beginCaptures": {
|
|
899
|
+
"1": {
|
|
900
|
+
"name": "keyword.control.move.spec"
|
|
901
|
+
}
|
|
902
|
+
},
|
|
903
|
+
"comment": "Spec define keyword",
|
|
904
|
+
"end": "(?=[;{])",
|
|
905
|
+
"name": "meta.spec_define.move",
|
|
906
|
+
"patterns": [
|
|
907
|
+
{
|
|
908
|
+
"include": "#comments"
|
|
909
|
+
},
|
|
910
|
+
{
|
|
911
|
+
"include": "#spec_types"
|
|
912
|
+
},
|
|
913
|
+
{
|
|
914
|
+
"include": "#types"
|
|
915
|
+
},
|
|
916
|
+
{
|
|
917
|
+
"begin": "(?<=define)",
|
|
918
|
+
"comment": "Function name",
|
|
919
|
+
"end": "(?=[(])",
|
|
920
|
+
"patterns": [
|
|
921
|
+
{
|
|
922
|
+
"include": "#comments"
|
|
923
|
+
},
|
|
924
|
+
{
|
|
925
|
+
"match": "\\b(\\w+)\\b",
|
|
926
|
+
"name": "entity.name.function.move"
|
|
927
|
+
}
|
|
928
|
+
]
|
|
929
|
+
}
|
|
930
|
+
]
|
|
931
|
+
},
|
|
932
|
+
"spec_keywords": {
|
|
933
|
+
"match": "\\b(global|pack|unpack|pragma|native|include|ensures|requires|invariant|apply|aborts_if|modifies)\\b",
|
|
934
|
+
"name": "keyword.control.move.spec"
|
|
935
|
+
},
|
|
936
|
+
"spec_types": {
|
|
937
|
+
"comment": "Spec-only types",
|
|
938
|
+
"match": "\\b(range|num|vector|bool|u8|u16|u32|u64|u128|u256|address)\\b",
|
|
939
|
+
"name": "support.type.vector.move"
|
|
940
|
+
},
|
|
941
|
+
"struct": {
|
|
942
|
+
"begin": "\\b(struct)\\b",
|
|
943
|
+
"beginCaptures": {
|
|
944
|
+
"1": {
|
|
945
|
+
"name": "storage.modifier.type.move"
|
|
946
|
+
}
|
|
947
|
+
},
|
|
948
|
+
"end": "(?<=})",
|
|
949
|
+
"name": "meta.struct.move",
|
|
950
|
+
"patterns": [
|
|
951
|
+
{
|
|
952
|
+
"include": "#comments"
|
|
953
|
+
},
|
|
954
|
+
{
|
|
955
|
+
"begin": "(?<=struct)",
|
|
956
|
+
"comment": "Struct definition",
|
|
957
|
+
"end": "(?={)",
|
|
958
|
+
"name": "meta.struct_def.move",
|
|
959
|
+
"patterns": [
|
|
960
|
+
{
|
|
961
|
+
"include": "#comments"
|
|
962
|
+
},
|
|
963
|
+
{
|
|
964
|
+
"comment": "Has Abilities",
|
|
965
|
+
"match": "\\b(has)\\b",
|
|
966
|
+
"name": "keyword.control.ability.has.move"
|
|
967
|
+
},
|
|
968
|
+
{
|
|
969
|
+
"comment": "Ability",
|
|
970
|
+
"match": "\\b(store|key|drop|copy)\\b",
|
|
971
|
+
"name": "entity.name.type.ability.move"
|
|
972
|
+
},
|
|
973
|
+
{
|
|
974
|
+
"comment": "Struct name",
|
|
975
|
+
"match": "\\b(\\w+)\\b",
|
|
976
|
+
"name": "entity.name.type.move"
|
|
977
|
+
},
|
|
978
|
+
{
|
|
979
|
+
"include": "#type_param"
|
|
980
|
+
}
|
|
981
|
+
]
|
|
982
|
+
},
|
|
983
|
+
{
|
|
984
|
+
"begin": "{",
|
|
985
|
+
"comment": "Struct body",
|
|
986
|
+
"end": "}",
|
|
987
|
+
"name": "meta.struct_body.move",
|
|
988
|
+
"patterns": [
|
|
989
|
+
{
|
|
990
|
+
"include": "#comments"
|
|
991
|
+
},
|
|
992
|
+
{
|
|
993
|
+
"include": "#self_access"
|
|
994
|
+
},
|
|
995
|
+
{
|
|
996
|
+
"include": "#module_access"
|
|
997
|
+
},
|
|
998
|
+
{
|
|
999
|
+
"include": "#types"
|
|
1000
|
+
}
|
|
1001
|
+
]
|
|
1002
|
+
}
|
|
1003
|
+
]
|
|
1004
|
+
},
|
|
1005
|
+
"type_param": {
|
|
1006
|
+
"begin": "<",
|
|
1007
|
+
"comment": "Generic type param",
|
|
1008
|
+
"end": ">",
|
|
1009
|
+
"name": "meta.generic_param.move",
|
|
1010
|
+
"patterns": [
|
|
1011
|
+
{
|
|
1012
|
+
"include": "#comments"
|
|
1013
|
+
},
|
|
1014
|
+
{
|
|
1015
|
+
"include": "#phantom"
|
|
1016
|
+
},
|
|
1017
|
+
{
|
|
1018
|
+
"include": "#module_access"
|
|
1019
|
+
},
|
|
1020
|
+
{
|
|
1021
|
+
"comment": "Trait-like condition",
|
|
1022
|
+
"match": "\\b(store|drop|key|copy)\\b",
|
|
1023
|
+
"name": "entity.name.type.kind.move"
|
|
1024
|
+
}
|
|
1025
|
+
]
|
|
1026
|
+
},
|
|
1027
|
+
"types": {
|
|
1028
|
+
"comment": "Built-in types + vector",
|
|
1029
|
+
"name": "meta.types.move",
|
|
1030
|
+
"patterns": [
|
|
1031
|
+
{
|
|
1032
|
+
"include": "#primitives"
|
|
1033
|
+
},
|
|
1034
|
+
{
|
|
1035
|
+
"include": "#vector"
|
|
1036
|
+
},
|
|
1037
|
+
{
|
|
1038
|
+
"comment": "Capitalized type names",
|
|
1039
|
+
"match": "\\b([A-Z][A-Za-z_]+)\\b",
|
|
1040
|
+
"name": "entity.name.type"
|
|
1041
|
+
},
|
|
1042
|
+
{
|
|
1043
|
+
"comment": "All-uppercase const literal",
|
|
1044
|
+
"match": "\\b([A-Z_]+)\\b",
|
|
1045
|
+
"name": "constant.other.move"
|
|
1046
|
+
}
|
|
1047
|
+
]
|
|
1048
|
+
},
|
|
1049
|
+
"vector": {
|
|
1050
|
+
"begin": "\\b(vector)<",
|
|
1051
|
+
"beginCaptures": {
|
|
1052
|
+
"1": {
|
|
1053
|
+
"name": "support.type.vector.move"
|
|
1054
|
+
}
|
|
1055
|
+
},
|
|
1056
|
+
"end": ">",
|
|
1057
|
+
"name": "meta.vector.move",
|
|
1058
|
+
"patterns": [
|
|
1059
|
+
{
|
|
1060
|
+
"include": "#primitives"
|
|
1061
|
+
},
|
|
1062
|
+
{
|
|
1063
|
+
"include": "#vector"
|
|
1064
|
+
}
|
|
1065
|
+
]
|
|
1066
|
+
}
|
|
1067
|
+
},
|
|
1068
|
+
"scopeName": "source.move"
|
|
1069
|
+
}
|
package/index.js
CHANGED
|
@@ -1674,6 +1674,17 @@ export const grammars = [
|
|
|
1674
1674
|
sha: 'a2241dda06d9a20503394c3affa606114d007049',
|
|
1675
1675
|
source: 'https://github.com/modularml/mojo-syntax/blob/a2241dda06d9a20503394c3affa606114d007049/syntaxes/mojo.syntax.json',
|
|
1676
1676
|
},
|
|
1677
|
+
{
|
|
1678
|
+
byteSize: 14150,
|
|
1679
|
+
displayName: 'Move',
|
|
1680
|
+
lastUpdate: '2023-05-22T07:53:33Z',
|
|
1681
|
+
license: 'MIT',
|
|
1682
|
+
licenseUrl: 'https://raw.githubusercontent.com/damirka/move-syntax/main/LICENSE',
|
|
1683
|
+
name: 'move',
|
|
1684
|
+
scopeName: 'source.move',
|
|
1685
|
+
sha: 'de9244e81505ff9154dc9422dbce434ac86fb981',
|
|
1686
|
+
source: 'https://github.com/damirka/move-syntax/blob/de9244e81505ff9154dc9422dbce434ac86fb981/syntaxes/move.tmLanguage.json',
|
|
1687
|
+
},
|
|
1677
1688
|
{
|
|
1678
1689
|
aliases: [
|
|
1679
1690
|
'nar',
|
package/package.json
CHANGED