github-linguist 7.6.1 → 7.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/bin/github-linguist +17 -4
- data/grammars/annotation.liquidhaskell.haskell.json +58 -11
- data/grammars/etc.json +212 -3
- data/grammars/hidden.manref.json +29 -0
- data/grammars/hint.haskell.json +58 -11
- data/grammars/hint.message.haskell.json +58 -11
- data/grammars/hint.type.haskell.json +58 -11
- data/grammars/injections.etc.json +601 -1
- data/grammars/markdown.plantuml.codeblock.json +26 -0
- data/grammars/source.4dm.json +1100 -0
- data/grammars/source.abap.json +7 -7
- data/grammars/source.abnf.json +23 -1
- data/grammars/source.agda.json +32 -202
- data/grammars/source.ahk.json +9 -5
- data/grammars/source.angelscript.json +1 -1
- data/grammars/source.ballerina.json +54 -18
- data/grammars/source.chapel.json +4 -4
- data/grammars/source.csound.json +1 -1
- data/grammars/source.css.json +2 -2
- data/grammars/source.css.scss.json +164 -15
- data/grammars/source.curlrc.json +869 -65
- data/grammars/source.dart.json +58 -32
- data/grammars/source.dircolors.json +137 -0
- data/grammars/source.direct-x.json +135 -0
- data/grammars/source.ebnf.json +67 -39
- data/grammars/source.editorconfig.json +23 -5
- data/grammars/source.elixir.json +51 -0
- data/grammars/source.elm.json +1 -1
- data/grammars/source.emacs.lisp.json +10 -0
- data/grammars/source.faust.json +119 -0
- data/grammars/source.gcode.json +166 -8
- data/grammars/source.gfm.json +1 -1
- data/grammars/source.gitconfig.json +1 -1
- data/grammars/source.hack.json +200 -98
- data/grammars/source.haskell.json +58 -11
- data/grammars/source.hlsl.json +9 -5
- data/grammars/source.hosts.json +40 -0
- data/grammars/source.hsig.json +58 -11
- data/grammars/source.hx.json +4 -0
- data/grammars/source.igor.json +46 -2
- data/grammars/source.ini.npmrc.json +311 -0
- data/grammars/source.inno.json +133 -0
- data/grammars/source.inputrc.json +500 -0
- data/grammars/source.js.json +4 -4
- data/grammars/source.julia.json +69 -23
- data/grammars/source.kotlin.json +1 -1
- data/grammars/source.lean.json +19 -3
- data/grammars/source.lean.markdown.json +2598 -0
- data/grammars/source.lex.json +4 -4
- data/grammars/source.m4.json +141 -99
- data/grammars/source.man-conf.json +46 -34
- data/grammars/source.matlab.json +437 -184
- data/grammars/source.mcfunction-snapshot.json +21388 -561
- data/grammars/source.mcfunction.json +55 -5
- data/grammars/source.meson.json +1 -1
- data/grammars/source.mlir.json +37 -317
- data/grammars/source.mrc.json +740 -0
- data/grammars/source.nasl.json +155 -0
- data/grammars/source.nextflow.json +2 -2
- data/grammars/source.odin-ehr.json +806 -0
- data/grammars/source.odin.json +402 -0
- data/grammars/source.opts.json +12 -2
- data/grammars/source.p4.json +21 -5
- data/grammars/source.prisma.json +435 -0
- data/grammars/source.python.json +2 -0
- data/grammars/source.qasm.json +66 -0
- data/grammars/source.ql.json +1408 -0
- data/grammars/source.reason.json +28 -16
- data/grammars/source.rego.json +124 -0
- data/grammars/source.sass.json +158 -3
- data/grammars/source.scala.json +53 -18
- data/grammars/source.ssh-config.json +1 -14
- data/grammars/source.swift.json +162 -2
- data/grammars/source.sy.json +2088 -183
- data/grammars/source.terraform.json +576 -132
- data/grammars/source.tnsaudit.json +256 -0
- data/grammars/source.ts.json +159 -51
- data/grammars/source.tsx.json +160 -52
- data/grammars/source.v.json +559 -764
- data/grammars/source.vim-snippet.json +645 -0
- data/grammars/source.viml.json +6 -6
- data/grammars/source.webassembly.json +10 -0
- data/grammars/source.wgetrc.json +1640 -0
- data/grammars/source.wsd.json +775 -0
- data/grammars/source.zig.json +169 -304
- data/grammars/text.html.php.blade.json +1 -1
- data/grammars/text.html.riot.json +788 -0
- data/grammars/text.muse.json +1471 -0
- data/grammars/text.tex.latex.haskell.json +58 -11
- data/grammars/text.vim-help.json +383 -0
- data/grammars/version +1 -1
- data/lib/linguist/VERSION +1 -1
- data/lib/linguist/blob_helper.rb +4 -2
- data/lib/linguist/file_blob.rb +1 -1
- data/lib/linguist/generated.rb +60 -13
- data/lib/linguist/heuristics.yml +64 -4
- data/lib/linguist/languages.json +1 -1
- data/lib/linguist/languages.yml +336 -45
- data/lib/linguist/lazy_blob.rb +10 -10
- data/lib/linguist/linguist.bundle +0 -0
- data/lib/linguist/samples.json +43560 -31457
- data/lib/linguist/shebang.rb +5 -3
- data/lib/linguist/vendor.yml +9 -0
- metadata +29 -10
- data/grammars/source.LS.json +0 -85
- data/grammars/source.MCPOST.json +0 -54
- data/grammars/source.MOD.json +0 -55
- data/grammars/source.apt.json +0 -18
- data/grammars/source.jlex.json +0 -322
- data/grammars/source.yaml-ext.json +0 -324
data/grammars/source.v.json
CHANGED
@@ -1,93 +1,30 @@
|
|
1
1
|
{
|
2
|
-
"name": "
|
2
|
+
"name": "V",
|
3
3
|
"scopeName": "source.v",
|
4
4
|
"patterns": [
|
5
5
|
{
|
6
|
-
"
|
7
|
-
"begin": "^\\s*(module)\\s+",
|
8
|
-
"end": "([0-9a-zA-Z_]*)",
|
9
|
-
"beginCaptures": {
|
10
|
-
"1": {
|
11
|
-
"name": "keyword.module.v"
|
12
|
-
}
|
13
|
-
},
|
14
|
-
"endCaptures": {
|
15
|
-
"1": {
|
16
|
-
"name": "entity.name.module.v"
|
17
|
-
}
|
18
|
-
}
|
6
|
+
"include": "#comments"
|
19
7
|
},
|
20
8
|
{
|
21
|
-
"
|
22
|
-
"begin": "^\\s*(import)\\s+",
|
23
|
-
"end": "([0-9a-zA-Z_.]*)",
|
24
|
-
"beginCaptures": {
|
25
|
-
"1": {
|
26
|
-
"name": "keyword.import.v"
|
27
|
-
}
|
28
|
-
},
|
29
|
-
"endCaptures": {
|
30
|
-
"1": {
|
31
|
-
"name": "entity.name.import.v"
|
32
|
-
}
|
33
|
-
}
|
9
|
+
"include": "#as"
|
34
10
|
},
|
35
11
|
{
|
36
|
-
"
|
37
|
-
"begin": "^\\s*(#include)",
|
38
|
-
"end": "\\s+([\\\u003c\"])\\s*(.*)([\\\u003e\"])",
|
39
|
-
"beginCaptures": {
|
40
|
-
"1": {
|
41
|
-
"name": "keyword.include.v"
|
42
|
-
}
|
43
|
-
},
|
44
|
-
"endCaptures": {
|
45
|
-
"1": {
|
46
|
-
"name": "string.quoted.double.v"
|
47
|
-
},
|
48
|
-
"2": {
|
49
|
-
"name": "string.quoted.double.v"
|
50
|
-
},
|
51
|
-
"3": {
|
52
|
-
"name": "string.quoted.double.v"
|
53
|
-
}
|
54
|
-
}
|
12
|
+
"include": "#attributes"
|
55
13
|
},
|
56
14
|
{
|
57
|
-
"
|
58
|
-
"begin": "^\\s*(#flag)",
|
59
|
-
"end": "\\s+(.*?)$",
|
60
|
-
"beginCaptures": {
|
61
|
-
"1": {
|
62
|
-
"name": "keyword.flag.v"
|
63
|
-
}
|
64
|
-
},
|
65
|
-
"endCaptures": {
|
66
|
-
"1": {
|
67
|
-
"name": "string.quoted.single.v"
|
68
|
-
}
|
69
|
-
}
|
15
|
+
"include": "#assignment"
|
70
16
|
},
|
71
17
|
{
|
72
|
-
"
|
73
|
-
"match": "(\u0026)\\s*(?=[0-9a-zA-Z_])",
|
74
|
-
"captures": {
|
75
|
-
"1": {
|
76
|
-
"name": "keyword.operator.address.v"
|
77
|
-
}
|
78
|
-
}
|
18
|
+
"include": "#module-decl"
|
79
19
|
},
|
80
20
|
{
|
81
|
-
"
|
82
|
-
"match": "((?:@)(?:mut|pub|fn|module|import|const|map|assert|sizeof|type|struct|interface|enum|in|or|switch|case|match|if|else|for|go|goto|defer|return|int|uint|i?(?:8|16|32|64|128)|u?(?:8|16|32|64|128)|f?(?:32|64)|bool|byte|byteptr|voidptr|string|ustring|rune))",
|
83
|
-
"captures": {
|
84
|
-
"0": {
|
85
|
-
"name": "keyword.other.escaped.v"
|
86
|
-
}
|
87
|
-
}
|
21
|
+
"include": "#import-decl"
|
88
22
|
},
|
89
23
|
{
|
90
|
-
"include": "#
|
24
|
+
"include": "#include-decl"
|
25
|
+
},
|
26
|
+
{
|
27
|
+
"include": "#flag-decl"
|
91
28
|
},
|
92
29
|
{
|
93
30
|
"include": "#brackets"
|
@@ -96,46 +33,40 @@
|
|
96
33
|
"include": "#builtin-fix"
|
97
34
|
},
|
98
35
|
{
|
99
|
-
"include": "#
|
36
|
+
"include": "#escaped-fix"
|
100
37
|
},
|
101
38
|
{
|
102
39
|
"include": "#operators"
|
103
40
|
},
|
104
41
|
{
|
105
|
-
"include": "#function-
|
42
|
+
"include": "#function-limited-overload-decl"
|
106
43
|
},
|
107
44
|
{
|
108
|
-
"include": "#function-
|
45
|
+
"include": "#function-extend-decl"
|
109
46
|
},
|
110
47
|
{
|
111
|
-
"include": "#function-
|
48
|
+
"include": "#function-decl"
|
112
49
|
},
|
113
50
|
{
|
114
51
|
"include": "#function-exist"
|
115
52
|
},
|
116
53
|
{
|
117
|
-
"include": "#
|
118
|
-
},
|
119
|
-
{
|
120
|
-
"include": "#enum"
|
54
|
+
"include": "#generic"
|
121
55
|
},
|
122
56
|
{
|
123
|
-
"include": "#
|
124
|
-
},
|
125
|
-
{
|
126
|
-
"include": "#interface"
|
57
|
+
"include": "#constants"
|
127
58
|
},
|
128
59
|
{
|
129
|
-
"include": "#
|
60
|
+
"include": "#type"
|
130
61
|
},
|
131
62
|
{
|
132
|
-
"include": "#
|
63
|
+
"include": "#enum"
|
133
64
|
},
|
134
65
|
{
|
135
|
-
"include": "#
|
66
|
+
"include": "#interface"
|
136
67
|
},
|
137
68
|
{
|
138
|
-
"include": "#
|
69
|
+
"include": "#struct"
|
139
70
|
},
|
140
71
|
{
|
141
72
|
"include": "#keywords"
|
@@ -143,41 +74,72 @@
|
|
143
74
|
{
|
144
75
|
"include": "#storage"
|
145
76
|
},
|
146
|
-
{
|
147
|
-
"include": "#std-types"
|
148
|
-
},
|
149
|
-
{
|
150
|
-
"include": "#std-cbased-types"
|
151
|
-
},
|
152
77
|
{
|
153
78
|
"include": "#numbers"
|
154
79
|
},
|
155
80
|
{
|
156
81
|
"include": "#strings"
|
82
|
+
},
|
83
|
+
{
|
84
|
+
"include": "#types"
|
157
85
|
}
|
158
86
|
],
|
159
87
|
"repository": {
|
160
|
-
"
|
161
|
-
"
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
"
|
166
|
-
|
167
|
-
|
88
|
+
"as": {
|
89
|
+
"begin": "\\s+(as)\\s+",
|
90
|
+
"end": "([\\w.]*)",
|
91
|
+
"beginCaptures": {
|
92
|
+
"1": {
|
93
|
+
"name": "keyword.as.v"
|
94
|
+
}
|
95
|
+
},
|
96
|
+
"endCaptures": {
|
97
|
+
"1": {
|
98
|
+
"name": "entity.name.alias.v"
|
99
|
+
}
|
100
|
+
}
|
101
|
+
},
|
102
|
+
"assignment": {
|
103
|
+
"name": "meta.definition.variable.v",
|
104
|
+
"match": "([\\w.]+)\\s*((?:\\:|\\+|\\-|\\*|\\/|\\%|\\\u0026|\\||\\^)?=)\\s*(?=.+)",
|
105
|
+
"captures": {
|
106
|
+
"1": {
|
107
|
+
"patterns": [
|
108
|
+
{
|
109
|
+
"include": "#illegal-name"
|
110
|
+
},
|
111
|
+
{
|
112
|
+
"name": "variable.assignment.other.v",
|
113
|
+
"match": "\\w+"
|
168
114
|
}
|
169
|
-
|
115
|
+
]
|
170
116
|
},
|
171
|
-
{
|
172
|
-
"
|
173
|
-
|
174
|
-
|
175
|
-
"1": {
|
176
|
-
"name": "entity.struct.attribute.v"
|
117
|
+
"2": {
|
118
|
+
"patterns": [
|
119
|
+
{
|
120
|
+
"include": "#operators"
|
177
121
|
}
|
178
|
-
|
122
|
+
]
|
179
123
|
}
|
180
|
-
|
124
|
+
}
|
125
|
+
},
|
126
|
+
"attributes": {
|
127
|
+
"name": "meta.definition.attribute.v",
|
128
|
+
"match": "^\\s*((\\[)(deprecated|unsafe_fn|typedef|live|inline|flag)(\\]))",
|
129
|
+
"captures": {
|
130
|
+
"1": {
|
131
|
+
"name": "meta.function.attribute.v"
|
132
|
+
},
|
133
|
+
"2": {
|
134
|
+
"name": "punctuation.definition.begin.bracket.square.v"
|
135
|
+
},
|
136
|
+
"3": {
|
137
|
+
"name": "storage.modifier.attribute.v"
|
138
|
+
},
|
139
|
+
"4": {
|
140
|
+
"name": "punctuation.definition.end.bracket.square.v"
|
141
|
+
}
|
142
|
+
}
|
181
143
|
},
|
182
144
|
"brackets": {
|
183
145
|
"patterns": [
|
@@ -220,8 +182,23 @@
|
|
220
182
|
}
|
221
183
|
},
|
222
184
|
{
|
223
|
-
"
|
224
|
-
"
|
185
|
+
"begin": "\\[",
|
186
|
+
"end": "\\]",
|
187
|
+
"patterns": [
|
188
|
+
{
|
189
|
+
"include": "$self"
|
190
|
+
}
|
191
|
+
],
|
192
|
+
"beginCaptures": {
|
193
|
+
"0": {
|
194
|
+
"name": "punctuation.definition.bracket.square.begin.v"
|
195
|
+
}
|
196
|
+
},
|
197
|
+
"endCaptures": {
|
198
|
+
"0": {
|
199
|
+
"name": "punctuation.definition.bracket.square.end.v"
|
200
|
+
}
|
201
|
+
}
|
225
202
|
}
|
226
203
|
]
|
227
204
|
},
|
@@ -230,40 +207,24 @@
|
|
230
207
|
{
|
231
208
|
"patterns": [
|
232
209
|
{
|
233
|
-
"
|
234
|
-
"
|
235
|
-
"1": {
|
236
|
-
"name": "storage.modifier.v"
|
237
|
-
}
|
238
|
-
}
|
239
|
-
},
|
240
|
-
{
|
241
|
-
"match": "(assert)(?=\\s*\\()",
|
242
|
-
"captures": {
|
243
|
-
"1": {
|
244
|
-
"name": "keyword.assert.v"
|
245
|
-
}
|
246
|
-
}
|
210
|
+
"name": "storage.modifier.v",
|
211
|
+
"match": "(const)(?=\\s*\\()"
|
247
212
|
},
|
248
213
|
{
|
249
|
-
"
|
250
|
-
"
|
251
|
-
"1": {
|
252
|
-
"name": "keyword.sizeof.v"
|
253
|
-
}
|
254
|
-
}
|
214
|
+
"name": "keyword.$1.v",
|
215
|
+
"match": "\\b(fn|type|enum|struct|interface|map|assert|sizeof)\\b(?=\\s*\\()"
|
255
216
|
}
|
256
217
|
]
|
257
218
|
},
|
258
219
|
{
|
259
220
|
"patterns": [
|
260
221
|
{
|
261
|
-
"
|
262
|
-
"
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
222
|
+
"name": "keyword.control.v",
|
223
|
+
"match": "(\\$if|\\$else)(?=\\s*\\()"
|
224
|
+
},
|
225
|
+
{
|
226
|
+
"name": "keyword.control.v",
|
227
|
+
"match": "\\b(in|or|break|continue|default|unsafe|match|if|else|for|go|goto|defer|return)\\b(?=\\s*\\()"
|
267
228
|
}
|
268
229
|
]
|
269
230
|
},
|
@@ -271,7 +232,7 @@
|
|
271
232
|
"patterns": [
|
272
233
|
{
|
273
234
|
"name": "meta.expr.numeric.cast.v",
|
274
|
-
"match": "(
|
235
|
+
"match": "(i?(?:8|16|nt|64|128)|u?(?:16|32|64|128)|f?(?:32|64))(?=\\s*\\()",
|
275
236
|
"captures": {
|
276
237
|
"1": {
|
277
238
|
"name": "storage.type.numeric.v"
|
@@ -280,64 +241,10 @@
|
|
280
241
|
},
|
281
242
|
{
|
282
243
|
"name": "meta.expr.bool.cast.v",
|
283
|
-
"match": "(bool)(?=\\s*\\()",
|
284
|
-
"captures": {
|
285
|
-
"1": {
|
286
|
-
"name": "storage.type.boolean.v"
|
287
|
-
}
|
288
|
-
}
|
289
|
-
},
|
290
|
-
{
|
291
|
-
"name": "meta.expr.byte.cast.v",
|
292
|
-
"match": "(byte)(?=\\s*\\()",
|
293
|
-
"captures": {
|
294
|
-
"1": {
|
295
|
-
"name": "storage.type.byte.v"
|
296
|
-
}
|
297
|
-
}
|
298
|
-
},
|
299
|
-
{
|
300
|
-
"name": "meta.expr.byteptr.cast.v",
|
301
|
-
"match": "(byteptr)(?=\\s*\\()",
|
302
|
-
"captures": {
|
303
|
-
"1": {
|
304
|
-
"name": "storage.type.byteptr.v"
|
305
|
-
}
|
306
|
-
}
|
307
|
-
},
|
308
|
-
{
|
309
|
-
"name": "meta.expr.voidptr.cast.v",
|
310
|
-
"match": "(voidptr)(?=\\s*\\()",
|
311
|
-
"captures": {
|
312
|
-
"1": {
|
313
|
-
"name": "storage.type.voidptr.v"
|
314
|
-
}
|
315
|
-
}
|
316
|
-
},
|
317
|
-
{
|
318
|
-
"name": "meta.expr.string.cast.v",
|
319
|
-
"match": "(string)(?=\\s*\\()",
|
320
|
-
"captures": {
|
321
|
-
"1": {
|
322
|
-
"name": "storage.type.string.v"
|
323
|
-
}
|
324
|
-
}
|
325
|
-
},
|
326
|
-
{
|
327
|
-
"name": "meta.expr.ustring.cast.v",
|
328
|
-
"match": "(ustring)(?=\\s*\\()",
|
329
|
-
"captures": {
|
330
|
-
"1": {
|
331
|
-
"name": "storage.type.ustring.v"
|
332
|
-
}
|
333
|
-
}
|
334
|
-
},
|
335
|
-
{
|
336
|
-
"name": "meta.expr.rune.cast.v",
|
337
|
-
"match": "(rune)(?=\\s*\\()",
|
244
|
+
"match": "(bool|byte|byteptr|charptr|voidptr|string|ustring|rune|none)(?=\\s*\\()",
|
338
245
|
"captures": {
|
339
246
|
"1": {
|
340
|
-
"name": "storage.type.
|
247
|
+
"name": "storage.type.$1.v"
|
341
248
|
}
|
342
249
|
}
|
343
250
|
}
|
@@ -348,12 +255,22 @@
|
|
348
255
|
"comments": {
|
349
256
|
"patterns": [
|
350
257
|
{
|
351
|
-
"name": "comment.block.v",
|
258
|
+
"name": "comment.block.documentation.v",
|
352
259
|
"begin": "/\\*",
|
353
260
|
"end": "\\*/",
|
354
|
-
"
|
261
|
+
"patterns": [
|
262
|
+
{
|
263
|
+
"include": "#comments"
|
264
|
+
}
|
265
|
+
],
|
266
|
+
"beginCaptures": {
|
267
|
+
"0": {
|
268
|
+
"name": "punctuation.definition.comment.begin.v"
|
269
|
+
}
|
270
|
+
},
|
271
|
+
"endCaptures": {
|
355
272
|
"0": {
|
356
|
-
"name": "comment.
|
273
|
+
"name": "punctuation.definition.comment.end.v"
|
357
274
|
}
|
358
275
|
}
|
359
276
|
},
|
@@ -363,346 +280,255 @@
|
|
363
280
|
"end": "$",
|
364
281
|
"beginCaptures": {
|
365
282
|
"0": {
|
366
|
-
"name": "comment.
|
283
|
+
"name": "punctuation.definition.comment.begin.v"
|
367
284
|
}
|
368
285
|
}
|
369
286
|
}
|
370
287
|
]
|
371
288
|
},
|
372
289
|
"constants": {
|
373
|
-
"
|
374
|
-
|
375
|
-
"name": "constant.language.v",
|
376
|
-
"match": "\\b(true|false)\\b"
|
377
|
-
},
|
378
|
-
{
|
379
|
-
"name": "constant.other.v",
|
380
|
-
"match": "([0-9A-Z]+)(?=\\s*\\=)"
|
381
|
-
}
|
382
|
-
]
|
290
|
+
"name": "constant.language.v",
|
291
|
+
"match": "\\b(true|false)\\b"
|
383
292
|
},
|
384
293
|
"enum": {
|
385
|
-
"
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
"
|
390
|
-
"1": {
|
391
|
-
"name": "keyword.enum.v"
|
392
|
-
},
|
393
|
-
"2": {
|
394
|
-
"patterns": [
|
395
|
-
{
|
396
|
-
"name": "invalid.illegal.v",
|
397
|
-
"match": "\\d\\w+"
|
398
|
-
},
|
399
|
-
{
|
400
|
-
"name": "entity.name.enum.v",
|
401
|
-
"match": "\\w+"
|
402
|
-
}
|
403
|
-
]
|
404
|
-
}
|
405
|
-
}
|
406
|
-
}
|
407
|
-
]
|
408
|
-
},
|
409
|
-
"flags": {
|
410
|
-
"patterns": [
|
411
|
-
{
|
412
|
-
"name": "meta.flag.include.v",
|
413
|
-
"match": "(-L|I)\\s*(?=.+?)",
|
414
|
-
"captures": {
|
415
|
-
"1": {
|
416
|
-
"name": "keyword.flag.include.v"
|
417
|
-
}
|
418
|
-
}
|
294
|
+
"name": "meta.definition.enum.v",
|
295
|
+
"match": "^\\s*(?:(pub)?\\s+)?(enum)\\s+(?:\\w+\\.)?(\\w*)",
|
296
|
+
"captures": {
|
297
|
+
"1": {
|
298
|
+
"name": "storage.modifier.$1.v"
|
419
299
|
},
|
420
|
-
{
|
421
|
-
"name": "
|
422
|
-
"match": "(-l[0-9a-zA-Z._\\-]+)",
|
423
|
-
"captures": {
|
424
|
-
"1": {
|
425
|
-
"name": "entity.name.library.v"
|
426
|
-
}
|
427
|
-
}
|
300
|
+
"2": {
|
301
|
+
"name": "storage.type.enum.v"
|
428
302
|
},
|
429
|
-
{
|
430
|
-
"name": "
|
431
|
-
"match": "(windows|darwin|linux|bsd)\\s+(?=-(?=l|L))",
|
432
|
-
"captures": {
|
433
|
-
"1": {
|
434
|
-
"name": "keyword.flag.os.v"
|
435
|
-
}
|
436
|
-
}
|
303
|
+
"3": {
|
304
|
+
"name": "entity.name.enum.v"
|
437
305
|
}
|
438
|
-
|
306
|
+
}
|
439
307
|
},
|
440
|
-
"
|
441
|
-
"
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
"
|
446
|
-
"0": {
|
447
|
-
"name": "meta.function.call.v"
|
448
|
-
},
|
449
|
-
"1": {
|
450
|
-
"patterns": [
|
451
|
-
{
|
452
|
-
"name": "invalid.illegal.v",
|
453
|
-
"match": "\\d\\w+"
|
454
|
-
},
|
455
|
-
{
|
456
|
-
"name": "support.function.v",
|
457
|
-
"match": "\\w+"
|
458
|
-
}
|
459
|
-
]
|
460
|
-
},
|
461
|
-
"2": {
|
462
|
-
"patterns": [
|
463
|
-
{
|
464
|
-
"include": "#function-generic"
|
465
|
-
}
|
466
|
-
]
|
467
|
-
}
|
468
|
-
}
|
308
|
+
"escaped-fix": {
|
309
|
+
"name": "meta.escaped.keyword.v",
|
310
|
+
"match": "((?:@)(?:mut|pub|fn|unsafe|module|import|as|const|map|assert|sizeof|type|struct|interface|enum|in|or|match|if|else|for|go|goto|defer|return|i?(?:8|16|nt|64|128)|u?(?:16|32|64|128)|f?(?:32|64)|bool|byte|byteptr|charptr|voidptr|string|ustring|rune|none))",
|
311
|
+
"captures": {
|
312
|
+
"0": {
|
313
|
+
"name": "keyword.other.escaped.v"
|
469
314
|
}
|
470
|
-
|
315
|
+
}
|
471
316
|
},
|
472
|
-
"
|
473
|
-
"
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
317
|
+
"flag-decl": {
|
318
|
+
"name": "meta.flag.v",
|
319
|
+
"begin": "^\\s*(#flag)",
|
320
|
+
"end": "\\s+(.*?)$",
|
321
|
+
"beginCaptures": {
|
322
|
+
"1": {
|
323
|
+
"name": "keyword.flag.v"
|
324
|
+
}
|
325
|
+
},
|
326
|
+
"endCaptures": {
|
327
|
+
"1": {
|
328
|
+
"name": "string.quoted.single.v"
|
329
|
+
}
|
330
|
+
}
|
331
|
+
},
|
332
|
+
"function-decl": {
|
333
|
+
"name": "meta.definition.function.v",
|
334
|
+
"begin": "^\\s*(pub)?\\s*(fn)\\s+",
|
335
|
+
"end": "(?:(?:C\\.)?)(\\w+)\\s*((?\u003c=[\\w\\s+])(\\\u003c)(\\w+)(\\\u003e))?",
|
336
|
+
"beginCaptures": {
|
337
|
+
"1": {
|
338
|
+
"name": "storage.modifier.v"
|
339
|
+
},
|
340
|
+
"2": {
|
341
|
+
"name": "keyword.function.v"
|
342
|
+
}
|
343
|
+
},
|
344
|
+
"endCaptures": {
|
345
|
+
"1": {
|
346
|
+
"patterns": [
|
347
|
+
{
|
348
|
+
"include": "#illegal-name"
|
492
349
|
},
|
493
|
-
|
494
|
-
"name": "
|
350
|
+
{
|
351
|
+
"name": "entity.name.function.v",
|
352
|
+
"match": "\\w+"
|
495
353
|
}
|
496
|
-
|
354
|
+
]
|
355
|
+
},
|
356
|
+
"2": {
|
357
|
+
"patterns": [
|
358
|
+
{
|
359
|
+
"include": "#generic"
|
360
|
+
}
|
361
|
+
]
|
497
362
|
}
|
498
|
-
|
363
|
+
}
|
499
364
|
},
|
500
|
-
"function-
|
501
|
-
"
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
"
|
506
|
-
|
507
|
-
|
508
|
-
|
365
|
+
"function-exist": {
|
366
|
+
"name": "meta.support.function.v",
|
367
|
+
"match": "(\\w+)((?\u003c=[\\w\\s+])(\\\u003c)(\\w+)(\\\u003e))?(?=\\s*\\()",
|
368
|
+
"captures": {
|
369
|
+
"0": {
|
370
|
+
"name": "meta.function.call.v"
|
371
|
+
},
|
372
|
+
"1": {
|
373
|
+
"patterns": [
|
374
|
+
{
|
375
|
+
"include": "#illegal-name"
|
509
376
|
},
|
510
|
-
|
511
|
-
"name": "
|
377
|
+
{
|
378
|
+
"name": "entity.name.function.v",
|
379
|
+
"match": "\\w+"
|
512
380
|
}
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
"patterns": [
|
520
|
-
{
|
521
|
-
"name": "invalid.illegal.v",
|
522
|
-
"match": "\\d\\w+"
|
523
|
-
},
|
524
|
-
{
|
525
|
-
"name": "entity.name.function.v",
|
526
|
-
"match": "\\w+"
|
527
|
-
}
|
528
|
-
]
|
529
|
-
},
|
530
|
-
"2": {
|
531
|
-
"patterns": [
|
532
|
-
{
|
533
|
-
"include": "#function-generic"
|
534
|
-
}
|
535
|
-
]
|
381
|
+
]
|
382
|
+
},
|
383
|
+
"2": {
|
384
|
+
"patterns": [
|
385
|
+
{
|
386
|
+
"include": "#generic"
|
536
387
|
}
|
537
|
-
|
388
|
+
]
|
538
389
|
}
|
539
|
-
|
390
|
+
}
|
540
391
|
},
|
541
|
-
"function-
|
542
|
-
"
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
"
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
392
|
+
"function-extend-decl": {
|
393
|
+
"name": "meta.definition.function.v",
|
394
|
+
"match": "^\\s*(pub)?\\s*(fn)\\s*(\\()([^\\)]*)(\\))\\s*(?:(?:C\\.)?)(\\w+)\\s*((?\u003c=[\\w\\s+])(\\\u003c)(\\w+)(\\\u003e))?",
|
395
|
+
"captures": {
|
396
|
+
"1": {
|
397
|
+
"name": "storage.modifier.v"
|
398
|
+
},
|
399
|
+
"2": {
|
400
|
+
"name": "keyword.function.v"
|
401
|
+
},
|
402
|
+
"3": {
|
403
|
+
"name": "punctuation.definition.bracket.round.begin.v"
|
404
|
+
},
|
405
|
+
"4": {
|
406
|
+
"patterns": [
|
407
|
+
{
|
408
|
+
"include": "#brackets"
|
555
409
|
},
|
556
|
-
|
557
|
-
"
|
410
|
+
{
|
411
|
+
"include": "#storage"
|
558
412
|
},
|
559
|
-
|
560
|
-
"
|
561
|
-
{
|
562
|
-
"include": "#brackets"
|
563
|
-
},
|
564
|
-
{
|
565
|
-
"include": "#storage"
|
566
|
-
},
|
567
|
-
{
|
568
|
-
"include": "#generics"
|
569
|
-
},
|
570
|
-
{
|
571
|
-
"include": "#std-types"
|
572
|
-
},
|
573
|
-
{
|
574
|
-
"include": "#std-cbased-types"
|
575
|
-
},
|
576
|
-
{
|
577
|
-
"include": "#punctuation"
|
578
|
-
}
|
579
|
-
]
|
413
|
+
{
|
414
|
+
"include": "#generic"
|
580
415
|
},
|
581
|
-
|
582
|
-
"
|
416
|
+
{
|
417
|
+
"include": "#types"
|
583
418
|
},
|
584
|
-
|
585
|
-
"
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
419
|
+
{
|
420
|
+
"include": "#punctuation"
|
421
|
+
}
|
422
|
+
]
|
423
|
+
},
|
424
|
+
"5": {
|
425
|
+
"name": "punctuation.definition.bracket.round.end.v"
|
426
|
+
},
|
427
|
+
"6": {
|
428
|
+
"patterns": [
|
429
|
+
{
|
430
|
+
"include": "#illegal-name"
|
595
431
|
},
|
596
|
-
|
597
|
-
"
|
598
|
-
|
599
|
-
"include": "#function-generic"
|
600
|
-
}
|
601
|
-
]
|
432
|
+
{
|
433
|
+
"name": "entity.name.function.v",
|
434
|
+
"match": "\\w+"
|
602
435
|
}
|
603
|
-
|
436
|
+
]
|
437
|
+
},
|
438
|
+
"7": {
|
439
|
+
"patterns": [
|
440
|
+
{
|
441
|
+
"include": "#generic"
|
442
|
+
}
|
443
|
+
]
|
604
444
|
}
|
605
|
-
|
445
|
+
}
|
606
446
|
},
|
607
|
-
"function-
|
608
|
-
"
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
"
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
"
|
447
|
+
"function-limited-overload-decl": {
|
448
|
+
"name": "meta.definition.function.v",
|
449
|
+
"match": "^\\s*(pub)?\\s*(fn)\\s*(\\()([^\\)]*)(\\))\\s*([\\+\\-\\*\\/])?\\s*(\\()([^\\)]*)(\\))\\s*(?:(?:C\\.)?)(\\w+)",
|
450
|
+
"captures": {
|
451
|
+
"1": {
|
452
|
+
"name": "storage.modifier.v"
|
453
|
+
},
|
454
|
+
"10": {
|
455
|
+
"patterns": [
|
456
|
+
{
|
457
|
+
"include": "#illegal-name"
|
618
458
|
},
|
619
|
-
|
620
|
-
"
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
459
|
+
{
|
460
|
+
"name": "entity.name.function.v",
|
461
|
+
"match": "\\w+"
|
462
|
+
}
|
463
|
+
]
|
464
|
+
},
|
465
|
+
"2": {
|
466
|
+
"name": "keyword.function.v"
|
467
|
+
},
|
468
|
+
"3": {
|
469
|
+
"name": "punctuation.definition.bracket.round.begin.v"
|
470
|
+
},
|
471
|
+
"4": {
|
472
|
+
"patterns": [
|
473
|
+
{
|
474
|
+
"include": "#brackets"
|
630
475
|
},
|
631
|
-
|
632
|
-
"
|
476
|
+
{
|
477
|
+
"include": "#storage"
|
633
478
|
},
|
634
|
-
|
635
|
-
"
|
479
|
+
{
|
480
|
+
"include": "#generic"
|
636
481
|
},
|
637
|
-
|
638
|
-
"
|
639
|
-
{
|
640
|
-
"include": "#brackets"
|
641
|
-
},
|
642
|
-
{
|
643
|
-
"include": "#storage"
|
644
|
-
},
|
645
|
-
{
|
646
|
-
"include": "#generics"
|
647
|
-
},
|
648
|
-
{
|
649
|
-
"include": "#std-types"
|
650
|
-
},
|
651
|
-
{
|
652
|
-
"include": "#std-cbased-types"
|
653
|
-
},
|
654
|
-
{
|
655
|
-
"include": "#punctuation"
|
656
|
-
}
|
657
|
-
]
|
482
|
+
{
|
483
|
+
"include": "#types"
|
658
484
|
},
|
659
|
-
|
660
|
-
"
|
485
|
+
{
|
486
|
+
"include": "#punctuation"
|
487
|
+
}
|
488
|
+
]
|
489
|
+
},
|
490
|
+
"5": {
|
491
|
+
"name": "punctuation.definition.bracket.round.end.v"
|
492
|
+
},
|
493
|
+
"6": {
|
494
|
+
"patterns": [
|
495
|
+
{
|
496
|
+
"include": "#operators"
|
497
|
+
}
|
498
|
+
]
|
499
|
+
},
|
500
|
+
"7": {
|
501
|
+
"name": "punctuation.definition.bracket.round.begin.v"
|
502
|
+
},
|
503
|
+
"8": {
|
504
|
+
"patterns": [
|
505
|
+
{
|
506
|
+
"include": "#brackets"
|
661
507
|
},
|
662
|
-
|
663
|
-
"
|
664
|
-
{
|
665
|
-
"include": "#operators"
|
666
|
-
}
|
667
|
-
]
|
508
|
+
{
|
509
|
+
"include": "#storage"
|
668
510
|
},
|
669
|
-
|
670
|
-
"
|
511
|
+
{
|
512
|
+
"include": "#generic"
|
671
513
|
},
|
672
|
-
|
673
|
-
"
|
674
|
-
{
|
675
|
-
"include": "#brackets"
|
676
|
-
},
|
677
|
-
{
|
678
|
-
"include": "#storage"
|
679
|
-
},
|
680
|
-
{
|
681
|
-
"include": "#generics"
|
682
|
-
},
|
683
|
-
{
|
684
|
-
"include": "#std-types"
|
685
|
-
},
|
686
|
-
{
|
687
|
-
"include": "#std-cbased-types"
|
688
|
-
},
|
689
|
-
{
|
690
|
-
"include": "#punctuation"
|
691
|
-
}
|
692
|
-
]
|
514
|
+
{
|
515
|
+
"include": "#types"
|
693
516
|
},
|
694
|
-
|
695
|
-
"
|
517
|
+
{
|
518
|
+
"include": "#punctuation"
|
696
519
|
}
|
697
|
-
|
520
|
+
]
|
521
|
+
},
|
522
|
+
"9": {
|
523
|
+
"name": "punctuation.definition.bracket.round.end.v"
|
698
524
|
}
|
699
|
-
|
525
|
+
}
|
700
526
|
},
|
701
|
-
"
|
527
|
+
"generic": {
|
702
528
|
"patterns": [
|
703
529
|
{
|
704
530
|
"name": "meta.definition.generic.v",
|
705
|
-
"match": "(?\u003c=[\\w\\s])(\\\u003c)(
|
531
|
+
"match": "(?\u003c=[\\w\\s+])(\\\u003c)(\\w+)(\\\u003e)",
|
706
532
|
"captures": {
|
707
533
|
"1": {
|
708
534
|
"name": "punctuation.definition.bracket.angle.begin.v"
|
@@ -710,8 +536,7 @@
|
|
710
536
|
"2": {
|
711
537
|
"patterns": [
|
712
538
|
{
|
713
|
-
"
|
714
|
-
"match": "\\d\\w+"
|
539
|
+
"include": "#illegal-name"
|
715
540
|
},
|
716
541
|
{
|
717
542
|
"name": "entity.name.generic.v",
|
@@ -726,115 +551,107 @@
|
|
726
551
|
}
|
727
552
|
]
|
728
553
|
},
|
554
|
+
"illegal-name": {
|
555
|
+
"name": "invalid.illegal.v",
|
556
|
+
"match": "\\d\\w+"
|
557
|
+
},
|
558
|
+
"import-decl": {
|
559
|
+
"name": "meta.import.v",
|
560
|
+
"begin": "^\\s*(import)\\s+",
|
561
|
+
"end": "([\\w.]+)",
|
562
|
+
"beginCaptures": {
|
563
|
+
"1": {
|
564
|
+
"name": "keyword.import.v"
|
565
|
+
}
|
566
|
+
},
|
567
|
+
"endCaptures": {
|
568
|
+
"1": {
|
569
|
+
"name": "entity.name.import.v"
|
570
|
+
}
|
571
|
+
}
|
572
|
+
},
|
573
|
+
"include-decl": {
|
574
|
+
"name": "meta.include.v",
|
575
|
+
"begin": "^\\s*(#include)",
|
576
|
+
"end": "\\s+(([\\\u003c\"])\\s*(.*)([\\\u003e\"]))",
|
577
|
+
"beginCaptures": {
|
578
|
+
"1": {
|
579
|
+
"name": "keyword.include.v"
|
580
|
+
}
|
581
|
+
},
|
582
|
+
"endCaptures": {
|
583
|
+
"1": {
|
584
|
+
"name": "string.quoted.double.v"
|
585
|
+
}
|
586
|
+
}
|
587
|
+
},
|
729
588
|
"interface": {
|
730
|
-
"
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
"
|
735
|
-
|
736
|
-
|
589
|
+
"name": "meta.definition.interface.v",
|
590
|
+
"match": "^\\s*(?:(pub)?\\s+)?(interface)\\s+(\\w*)",
|
591
|
+
"captures": {
|
592
|
+
"1": {
|
593
|
+
"name": "storage.modifier.$1.v"
|
594
|
+
},
|
595
|
+
"2": {
|
596
|
+
"name": "keyword.interface.v"
|
597
|
+
},
|
598
|
+
"3": {
|
599
|
+
"patterns": [
|
600
|
+
{
|
601
|
+
"include": "#illegal-name"
|
737
602
|
},
|
738
|
-
|
739
|
-
"
|
740
|
-
|
741
|
-
"name": "invalid.illegal.v",
|
742
|
-
"match": "\\d\\w+"
|
743
|
-
},
|
744
|
-
{
|
745
|
-
"name": "entity.name.interface.v",
|
746
|
-
"match": "\\w+"
|
747
|
-
}
|
748
|
-
]
|
603
|
+
{
|
604
|
+
"name": "entity.name.interface.v",
|
605
|
+
"match": "\\w+"
|
749
606
|
}
|
750
|
-
|
607
|
+
]
|
751
608
|
}
|
752
|
-
|
609
|
+
}
|
753
610
|
},
|
754
611
|
"keywords": {
|
755
612
|
"patterns": [
|
756
613
|
{
|
757
614
|
"name": "keyword.control.v",
|
758
|
-
"match": "
|
759
|
-
},
|
760
|
-
{
|
761
|
-
"name": "keyword.control.v",
|
762
|
-
"match": "(\\$if)"
|
615
|
+
"match": "(\\$if|\\$else)"
|
763
616
|
},
|
764
617
|
{
|
765
618
|
"name": "keyword.control.v",
|
766
|
-
"match": "(
|
767
|
-
},
|
768
|
-
{
|
769
|
-
"name": "keyword.type.v",
|
770
|
-
"match": "\\btype\\b"
|
771
|
-
},
|
772
|
-
{
|
773
|
-
"name": "keyword.enum.v",
|
774
|
-
"match": "\\benum\\b"
|
775
|
-
},
|
776
|
-
{
|
777
|
-
"name": "keyword.struct.v",
|
778
|
-
"match": "\\bstruct\\b"
|
779
|
-
},
|
780
|
-
{
|
781
|
-
"name": "keyword.interface.v",
|
782
|
-
"match": "\\binterface\\b"
|
783
|
-
},
|
784
|
-
{
|
785
|
-
"name": "keyword.map.v",
|
786
|
-
"match": "\\bmap\\b"
|
787
|
-
},
|
788
|
-
{
|
789
|
-
"name": "keyword.assert.v",
|
790
|
-
"match": "\\bassert\\b"
|
619
|
+
"match": "\\b(in|or|break|continue|default|unsafe|match|if|else|for|go|goto|defer|return)\\b"
|
791
620
|
},
|
792
621
|
{
|
793
|
-
"name": "keyword.
|
794
|
-
"match": "\\
|
622
|
+
"name": "keyword.$1.v",
|
623
|
+
"match": "\\b(fn|type|enum|struct|interface|map|assert|sizeof)\\b"
|
795
624
|
}
|
796
625
|
]
|
797
626
|
},
|
627
|
+
"module-decl": {
|
628
|
+
"name": "meta.module.v",
|
629
|
+
"begin": "^\\s*(module)\\s+",
|
630
|
+
"end": "([\\w.]+)",
|
631
|
+
"beginCaptures": {
|
632
|
+
"1": {
|
633
|
+
"name": "keyword.module.v"
|
634
|
+
}
|
635
|
+
},
|
636
|
+
"endCaptures": {
|
637
|
+
"1": {
|
638
|
+
"name": "entity.name.module.v"
|
639
|
+
}
|
640
|
+
}
|
641
|
+
},
|
798
642
|
"numbers": {
|
799
643
|
"patterns": [
|
800
644
|
{
|
801
|
-
"
|
802
|
-
"
|
803
|
-
"1": {
|
804
|
-
"name": "constant.numeric.float.v"
|
805
|
-
},
|
806
|
-
"2": {
|
807
|
-
"name": "constant.numeric.float.v"
|
808
|
-
},
|
809
|
-
"3": {
|
810
|
-
"name": "constant.numeric.float.v"
|
811
|
-
},
|
812
|
-
"4": {
|
813
|
-
"name": "constant.numeric.float.v"
|
814
|
-
}
|
815
|
-
}
|
645
|
+
"name": "constant.numeric.float.v",
|
646
|
+
"match": "(?:(?:[-]?)(?:[0-9e]*)(?:[.]){1}(?:[0-9]+))"
|
816
647
|
},
|
817
648
|
{
|
818
|
-
"
|
819
|
-
"
|
820
|
-
"1": {
|
821
|
-
"name": "constant.numeric.hex.v"
|
822
|
-
},
|
823
|
-
"2": {
|
824
|
-
"name": "constant.numeric.hex.v"
|
825
|
-
}
|
826
|
-
}
|
649
|
+
"name": "constant.numeric.hex.v",
|
650
|
+
"match": "\\b(?:0[xX])(?:[0-9a-fA-F]+)"
|
827
651
|
},
|
828
652
|
{
|
829
|
-
"
|
830
|
-
"
|
831
|
-
"1": {
|
832
|
-
"name": "constant.numeric.integer.v"
|
833
|
-
},
|
834
|
-
"2": {
|
835
|
-
"name": "constant.numeric.integer.v"
|
836
|
-
}
|
837
|
-
}
|
653
|
+
"name": "constant.numeric.integer.v",
|
654
|
+
"match": "\\b(?:[-]?)(?:[0-9]+)"
|
838
655
|
}
|
839
656
|
]
|
840
657
|
},
|
@@ -845,102 +662,50 @@
|
|
845
662
|
"match": "(\\+|\\-|\\*|\\/|\\%|\\+\\+|\\-\\-)"
|
846
663
|
},
|
847
664
|
{
|
848
|
-
"name": "keyword.operator.
|
849
|
-
"match": "(
|
850
|
-
},
|
851
|
-
{
|
852
|
-
"name": "keyword.operator.logical.v",
|
853
|
-
"match": "(\\\u0026\\\u0026|\\|\\||\\!)"
|
665
|
+
"name": "keyword.operator.assignment.v",
|
666
|
+
"match": "(\\:\\=|\\=|\\+\\=|\\-\\=|\\*\\=|\\/\\=|\\%\\=|\\\u0026\\=|\\|\\=|\\^\\=|\\\u0026\\\u0026\\=|\\|\\|\\=|\\\u003e\\\u003e\\=|\\\u003c\\\u003c\\=)"
|
854
667
|
},
|
855
668
|
{
|
856
669
|
"name": "keyword.operator.bitwise.v",
|
857
670
|
"match": "(\\\u0026|\\||\\^|\u003c(?!\u003c)|\u003e(?!\u003e))"
|
858
671
|
},
|
859
672
|
{
|
860
|
-
"name": "keyword.operator.
|
861
|
-
"match": "(
|
673
|
+
"name": "keyword.operator.logical.v",
|
674
|
+
"match": "(\\\u0026\\\u0026|\\|\\||\\!)"
|
675
|
+
},
|
676
|
+
{
|
677
|
+
"name": "keyword.operator.relation.v",
|
678
|
+
"match": "(\\=\\=|\\!\\=|\\\u003e|\\\u003c|\\\u003e\\=|\\\u003c\\=)"
|
862
679
|
}
|
863
680
|
]
|
864
681
|
},
|
865
682
|
"punctuation": {
|
866
683
|
"patterns": [
|
867
684
|
{
|
868
|
-
"name": "punctuation.
|
685
|
+
"name": "punctuation.delimiter.period.dot.v",
|
869
686
|
"match": "\\."
|
870
687
|
},
|
871
688
|
{
|
872
|
-
"name": "punctuation.
|
873
|
-
"match": "
|
689
|
+
"name": "punctuation.delimiter.comma.v",
|
690
|
+
"match": ","
|
874
691
|
},
|
875
692
|
{
|
876
|
-
"name": "punctuation.
|
877
|
-
"match": "
|
693
|
+
"name": "punctuation.separator.key-value.colon.v",
|
694
|
+
"match": ":"
|
878
695
|
},
|
879
696
|
{
|
880
|
-
"name": "punctuation.other.semicolon.v",
|
881
|
-
"match": "
|
697
|
+
"name": "punctuation.definition.other.semicolon.v",
|
698
|
+
"match": ";"
|
882
699
|
},
|
883
700
|
{
|
884
|
-
"name": "punctuation.other.questionmark.v",
|
701
|
+
"name": "punctuation.definition.other.questionmark.v",
|
885
702
|
"match": "\\?"
|
886
703
|
}
|
887
704
|
]
|
888
705
|
},
|
889
|
-
"std-cbased-types": {
|
890
|
-
"patterns": [
|
891
|
-
{
|
892
|
-
"name": "storage.type.numeric.cbased.v",
|
893
|
-
"match": "\\b(size_t|ptrdiff_t)\\b"
|
894
|
-
}
|
895
|
-
]
|
896
|
-
},
|
897
|
-
"std-types": {
|
898
|
-
"patterns": [
|
899
|
-
{
|
900
|
-
"name": "storage.type.boolean.v",
|
901
|
-
"match": "\\bbool\\b"
|
902
|
-
},
|
903
|
-
{
|
904
|
-
"name": "storage.type.byte.v",
|
905
|
-
"match": "\\bbyte\\b"
|
906
|
-
},
|
907
|
-
{
|
908
|
-
"name": "storage.type.byteptr.v",
|
909
|
-
"match": "\\bbyteptr\\b"
|
910
|
-
},
|
911
|
-
{
|
912
|
-
"name": "storage.type.voidptr.v",
|
913
|
-
"match": "\\bvoidptr\\b"
|
914
|
-
},
|
915
|
-
{
|
916
|
-
"name": "storage.type.string.v",
|
917
|
-
"match": "\\bstring\\b"
|
918
|
-
},
|
919
|
-
{
|
920
|
-
"name": "storage.type.ustring.v",
|
921
|
-
"match": "\\bustring\\b"
|
922
|
-
},
|
923
|
-
{
|
924
|
-
"name": "storage.type.rune.v",
|
925
|
-
"match": "\\brune\\b"
|
926
|
-
},
|
927
|
-
{
|
928
|
-
"name": "storage.type.option.v",
|
929
|
-
"match": "\\boption\\b"
|
930
|
-
},
|
931
|
-
{
|
932
|
-
"name": "storage.type.numeric.v",
|
933
|
-
"match": "\\b(int|uint|i(8|16|32|64|128)|u(8|16|32|64|u128)|f(32|64))\\b"
|
934
|
-
}
|
935
|
-
]
|
936
|
-
},
|
937
706
|
"storage": {
|
938
|
-
"
|
939
|
-
|
940
|
-
"name": "storage.modifier.v",
|
941
|
-
"match": "\\b(const|mut|pub)\\b"
|
942
|
-
}
|
943
|
-
]
|
707
|
+
"name": "storage.modifier.v",
|
708
|
+
"match": "\\b(const|mut|pub)\\b"
|
944
709
|
},
|
945
710
|
"string-escaped-char": {
|
946
711
|
"patterns": [
|
@@ -955,47 +720,39 @@
|
|
955
720
|
]
|
956
721
|
},
|
957
722
|
"string-interpolation": {
|
958
|
-
"
|
959
|
-
|
960
|
-
|
961
|
-
|
962
|
-
"
|
963
|
-
|
964
|
-
"
|
965
|
-
|
966
|
-
|
967
|
-
|
968
|
-
|
969
|
-
|
970
|
-
"name": "variable.other.interpolated.v",
|
971
|
-
"match": "\\$[\\.\\w]+"
|
972
|
-
}
|
973
|
-
]
|
723
|
+
"name": "meta.string.interpolation.v",
|
724
|
+
"match": "(\\$([\\w.]+|\\{.*?\\}))",
|
725
|
+
"captures": {
|
726
|
+
"1": {
|
727
|
+
"patterns": [
|
728
|
+
{
|
729
|
+
"name": "invalid.illegal.v",
|
730
|
+
"match": "\\$\\d[\\.\\w]+"
|
731
|
+
},
|
732
|
+
{
|
733
|
+
"name": "variable.other.interpolated.v",
|
734
|
+
"match": "\\$([\\.\\w]+|\\{.*?\\})"
|
974
735
|
}
|
975
|
-
|
736
|
+
]
|
976
737
|
}
|
977
|
-
|
738
|
+
}
|
978
739
|
},
|
979
740
|
"string-placeholder": {
|
980
|
-
"
|
981
|
-
|
982
|
-
"name": "constant.other.placeholder.v",
|
983
|
-
"match": "%(\\[\\d+\\])?([\\+#\\-0\\x20]{,2}((\\d+|\\*)?(\\.?(\\d+|\\*|(\\[\\d+\\])\\*?)?(\\[\\d+\\])?)?))?[vT%tbcdoqxXUbeEfFgGsp]"
|
984
|
-
}
|
985
|
-
]
|
741
|
+
"name": "constant.other.placeholder.v",
|
742
|
+
"match": "%(\\[\\d+\\])?([\\+#\\-0\\x20]{,2}((\\d+|\\*)?(\\.?(\\d+|\\*|(\\[\\d+\\])\\*?)?(\\[\\d+\\])?)?))?[vT%tbcdoqxXUbeEfFgGsp]"
|
986
743
|
},
|
987
744
|
"strings": {
|
988
745
|
"patterns": [
|
989
746
|
{
|
990
747
|
"name": "string.quoted.raw.v",
|
991
|
-
"begin": "
|
992
|
-
"end": "
|
748
|
+
"begin": "`",
|
749
|
+
"end": "`",
|
993
750
|
"patterns": [
|
994
751
|
{
|
995
|
-
"include": "#string-
|
752
|
+
"include": "#string-escaped-char"
|
996
753
|
},
|
997
754
|
{
|
998
|
-
"include": "#string-
|
755
|
+
"include": "#string-interpolation"
|
999
756
|
},
|
1000
757
|
{
|
1001
758
|
"include": "#string-placeholder"
|
@@ -1014,14 +771,14 @@
|
|
1014
771
|
},
|
1015
772
|
{
|
1016
773
|
"name": "string.quoted.single.v",
|
1017
|
-
"begin": "
|
1018
|
-
"end": "
|
774
|
+
"begin": "'",
|
775
|
+
"end": "'",
|
1019
776
|
"patterns": [
|
1020
777
|
{
|
1021
|
-
"include": "#string-
|
778
|
+
"include": "#string-escaped-char"
|
1022
779
|
},
|
1023
780
|
{
|
1024
|
-
"include": "#string-
|
781
|
+
"include": "#string-interpolation"
|
1025
782
|
},
|
1026
783
|
{
|
1027
784
|
"include": "#string-placeholder"
|
@@ -1044,10 +801,10 @@
|
|
1044
801
|
"end": "\"",
|
1045
802
|
"patterns": [
|
1046
803
|
{
|
1047
|
-
"include": "#string-
|
804
|
+
"include": "#string-escaped-char"
|
1048
805
|
},
|
1049
806
|
{
|
1050
|
-
"include": "#string-
|
807
|
+
"include": "#string-interpolation"
|
1051
808
|
},
|
1052
809
|
{
|
1053
810
|
"include": "#string-placeholder"
|
@@ -1070,113 +827,151 @@
|
|
1070
827
|
"patterns": [
|
1071
828
|
{
|
1072
829
|
"name": "meta.definition.struct.v",
|
1073
|
-
"
|
1074
|
-
"
|
1075
|
-
|
1076
|
-
|
830
|
+
"begin": "^\\s*(?:(mut|pub(?:\\s+mut)?|__global)\\s+)?(struct)\\s+([\\w.]+)\\s*({)",
|
831
|
+
"end": "\\s*(})",
|
832
|
+
"patterns": [
|
833
|
+
{
|
834
|
+
"include": "#struct-access-modifier"
|
1077
835
|
},
|
1078
|
-
|
1079
|
-
"
|
1080
|
-
|
1081
|
-
|
1082
|
-
"
|
836
|
+
{
|
837
|
+
"match": "\\b(\\w+)\\s+([\\w\\[\\]\\*\u0026.]+)(?:\\s*(=)\\s*((?:.(?=$|//|/\\*))*+))?",
|
838
|
+
"captures": {
|
839
|
+
"1": {
|
840
|
+
"name": "variable.other.property.v"
|
1083
841
|
},
|
1084
|
-
{
|
1085
|
-
"
|
1086
|
-
|
842
|
+
"2": {
|
843
|
+
"patterns": [
|
844
|
+
{
|
845
|
+
"include": "#numbers"
|
846
|
+
},
|
847
|
+
{
|
848
|
+
"include": "#brackets"
|
849
|
+
},
|
850
|
+
{
|
851
|
+
"include": "#types"
|
852
|
+
},
|
853
|
+
{
|
854
|
+
"name": "storage.type.other.v",
|
855
|
+
"match": "\\w+"
|
856
|
+
}
|
857
|
+
]
|
858
|
+
},
|
859
|
+
"3": {
|
860
|
+
"name": "keyword.operator.assignment.v"
|
861
|
+
},
|
862
|
+
"4": {
|
863
|
+
"patterns": [
|
864
|
+
{
|
865
|
+
"include": "$self"
|
866
|
+
}
|
867
|
+
]
|
1087
868
|
}
|
1088
|
-
|
869
|
+
}
|
870
|
+
},
|
871
|
+
{
|
872
|
+
"include": "#types"
|
873
|
+
},
|
874
|
+
{
|
875
|
+
"include": "$self"
|
1089
876
|
}
|
1090
|
-
|
1091
|
-
|
1092
|
-
]
|
1093
|
-
},
|
1094
|
-
"type": {
|
1095
|
-
"patterns": [
|
1096
|
-
{
|
1097
|
-
"name": "meta.definition.type.v",
|
1098
|
-
"match": "^\\s*(\\btype\\b)\\s+([0-9a-zA-Z_]*)\\s+(?:[0-9a-zA-Z]+\\.+)?([0-9a-zA-Z_]*)",
|
1099
|
-
"captures": {
|
877
|
+
],
|
878
|
+
"beginCaptures": {
|
1100
879
|
"1": {
|
1101
|
-
"name": "
|
880
|
+
"name": "storage.modifier.$1.v"
|
1102
881
|
},
|
1103
882
|
"2": {
|
1104
|
-
"
|
1105
|
-
{
|
1106
|
-
"name": "invalid.illegal.v",
|
1107
|
-
"match": "\\d\\w+"
|
1108
|
-
},
|
1109
|
-
{
|
1110
|
-
"name": "entity.name.type.v",
|
1111
|
-
"match": "\\w+"
|
1112
|
-
}
|
1113
|
-
]
|
883
|
+
"name": "storage.type.struct.v"
|
1114
884
|
},
|
1115
885
|
"3": {
|
1116
|
-
"
|
1117
|
-
|
1118
|
-
|
1119
|
-
|
1120
|
-
},
|
1121
|
-
{
|
1122
|
-
"name": "entity.name.type.v",
|
1123
|
-
"match": "\\w+"
|
1124
|
-
}
|
1125
|
-
]
|
886
|
+
"name": "entity.name.struct.v"
|
887
|
+
},
|
888
|
+
"4": {
|
889
|
+
"name": "punctuation.definition.bracket.curly.begin.v"
|
1126
890
|
}
|
1127
|
-
}
|
1128
|
-
|
1129
|
-
]
|
1130
|
-
},
|
1131
|
-
"variable-assignment": {
|
1132
|
-
"patterns": [
|
1133
|
-
{
|
1134
|
-
"match": "(match|if|else)(?=\\s*\\=\\\u003e)",
|
1135
|
-
"captures": {
|
891
|
+
},
|
892
|
+
"endCaptures": {
|
1136
893
|
"1": {
|
1137
|
-
"name": "
|
894
|
+
"name": "punctuation.definition.bracket.curly.end.v"
|
1138
895
|
}
|
1139
896
|
}
|
1140
897
|
},
|
1141
898
|
{
|
1142
|
-
"name": "meta.definition.
|
1143
|
-
"match": "
|
899
|
+
"name": "meta.definition.struct.v",
|
900
|
+
"match": "^\\s*(?:(mut|pub(?:\\s+mut)?|__global)\\s+)?(struct)(?:\\s+([\\w.]+))?",
|
1144
901
|
"captures": {
|
1145
902
|
"1": {
|
1146
|
-
"name": "
|
903
|
+
"name": "storage.modifier.$1.v"
|
1147
904
|
},
|
1148
905
|
"2": {
|
1149
|
-
"name": "
|
906
|
+
"name": "storage.type.struct.v"
|
907
|
+
},
|
908
|
+
"3": {
|
909
|
+
"name": "entity.name.struct.v"
|
1150
910
|
}
|
1151
911
|
}
|
1152
912
|
}
|
1153
913
|
]
|
1154
914
|
},
|
1155
|
-
"
|
1156
|
-
"
|
1157
|
-
|
1158
|
-
|
1159
|
-
"
|
1160
|
-
|
1161
|
-
|
1162
|
-
|
915
|
+
"struct-access-modifier": {
|
916
|
+
"match": "(?\u003c=\\s|^)(mut|pub(?:\\s+mut)?|__global)(:|\\b)",
|
917
|
+
"captures": {
|
918
|
+
"1": {
|
919
|
+
"name": "storage.modifier.$1.v"
|
920
|
+
},
|
921
|
+
"2": {
|
922
|
+
"name": "punctuation.separator.struct.key-value.v"
|
923
|
+
}
|
924
|
+
}
|
925
|
+
},
|
926
|
+
"type": {
|
927
|
+
"name": "meta.definition.type.v",
|
928
|
+
"match": "^\\s*(?:(pub)?\\s+)?(type)\\s+(\\w*)\\s+(?:\\w+\\.+)?(\\w*)",
|
929
|
+
"captures": {
|
930
|
+
"1": {
|
931
|
+
"name": "storage.modifier.$1.v"
|
932
|
+
},
|
933
|
+
"2": {
|
934
|
+
"name": "storage.type.type.v"
|
935
|
+
},
|
936
|
+
"3": {
|
937
|
+
"patterns": [
|
938
|
+
{
|
939
|
+
"include": "#illegal-name"
|
1163
940
|
},
|
1164
|
-
|
1165
|
-
"
|
941
|
+
{
|
942
|
+
"include": "#types"
|
943
|
+
},
|
944
|
+
{
|
945
|
+
"name": "entity.name.type.v",
|
946
|
+
"match": "\\w+"
|
1166
947
|
}
|
1167
|
-
|
948
|
+
]
|
1168
949
|
},
|
1169
|
-
{
|
1170
|
-
"
|
1171
|
-
|
1172
|
-
|
1173
|
-
"1": {
|
1174
|
-
"name": "variable.other.decrement.v"
|
950
|
+
"4": {
|
951
|
+
"patterns": [
|
952
|
+
{
|
953
|
+
"include": "#illegal-name"
|
1175
954
|
},
|
1176
|
-
|
1177
|
-
"
|
955
|
+
{
|
956
|
+
"include": "#types"
|
957
|
+
},
|
958
|
+
{
|
959
|
+
"name": "entity.name.type.v",
|
960
|
+
"match": "\\w+"
|
1178
961
|
}
|
1179
|
-
|
962
|
+
]
|
963
|
+
}
|
964
|
+
}
|
965
|
+
},
|
966
|
+
"types": {
|
967
|
+
"patterns": [
|
968
|
+
{
|
969
|
+
"name": "storage.type.numeric.v",
|
970
|
+
"match": "\\b(i(8|16|nt|64|128)|u(8|16|32|64|128)|f(32|64))\\b"
|
971
|
+
},
|
972
|
+
{
|
973
|
+
"name": "storage.type.$1.v",
|
974
|
+
"match": "\\b(bool|byte|byteptr|charptr|voidptr|string|ustring|rune|none)\\b"
|
1180
975
|
}
|
1181
976
|
]
|
1182
977
|
}
|