tm-grammars 1.28.1 → 1.29.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 +28 -1
- package/README.md +1 -0
- package/grammars/odin.json +1166 -0
- package/index.js +18 -0
- package/package.json +1 -1
package/NOTICE
CHANGED
|
@@ -4323,7 +4323,7 @@ Files: hcl.json, terraform.json
|
|
|
4323
4323
|
License: https://raw.githubusercontent.com/hashicorp/syntax/main/LICENSE
|
|
4324
4324
|
SPDX: MPL-2.0
|
|
4325
4325
|
---------------------------------------------------------------------------------------------------------
|
|
4326
|
-
Copyright
|
|
4326
|
+
Copyright IBM Corp. 2020, 2025
|
|
4327
4327
|
|
|
4328
4328
|
Mozilla Public License Version 2.0
|
|
4329
4329
|
==================================
|
|
@@ -7293,6 +7293,33 @@ SPDX: Apache-2.0
|
|
|
7293
7293
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
7294
7294
|
See the License for the specific language governing permissions and
|
|
7295
7295
|
limitations under the License.
|
|
7296
|
+
=========================================================================================================
|
|
7297
|
+
Files: odin.json
|
|
7298
|
+
License: https://raw.githubusercontent.com/DanielGavin/ols/master/LICENSE
|
|
7299
|
+
SPDX: MIT
|
|
7300
|
+
---------------------------------------------------------------------------------------------------------
|
|
7301
|
+
MIT License
|
|
7302
|
+
|
|
7303
|
+
Copyright (c) 2021 Daniel Gavin
|
|
7304
|
+
|
|
7305
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7306
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7307
|
+
in the Software without restriction, including without limitation the rights
|
|
7308
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
7309
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
7310
|
+
furnished to do so, subject to the following conditions:
|
|
7311
|
+
|
|
7312
|
+
The above copyright notice and this permission notice shall be included in all
|
|
7313
|
+
copies or substantial portions of the Software.
|
|
7314
|
+
|
|
7315
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
7316
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
7317
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
7318
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
7319
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
7320
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
7321
|
+
SOFTWARE.
|
|
7322
|
+
|
|
7296
7323
|
=========================================================================================================
|
|
7297
7324
|
Files: openscad.json
|
|
7298
7325
|
License: https://raw.githubusercontent.com/tbuser/openscad.tmbundle/master/LICENSE
|
package/README.md
CHANGED
|
@@ -158,6 +158,7 @@ import { grammars } from 'tm-grammars'
|
|
|
158
158
|
| `objective-c` | `objc` | [microsoft/vscode](https://github.com/microsoft/vscode/blob/bd1abe08c38bb5deccf65610f8f3c03d2338d20d/extensions/objective-c/syntaxes/objective-c.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/microsoft/vscode/main/LICENSE.txt) | | | 100.65 kB |
|
|
159
159
|
| `objective-cpp` | | [microsoft/vscode](https://github.com/microsoft/vscode/blob/bd1abe08c38bb5deccf65610f8f3c03d2338d20d/extensions/objective-c/syntaxes/objective-c++.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/microsoft/vscode/main/LICENSE.txt) | | | 163.50 kB |
|
|
160
160
|
| `ocaml` | | [reasonml-editor/vscode-reasonml](https://github.com/reasonml-editor/vscode-reasonml/blob/14af625ec50ed9968b957b4d6336c5338d81af45/syntaxes/ocaml.json) | [Apache-2.0](https://raw.githubusercontent.com/reasonml-editor/vscode-reasonml/master/LICENSE) | | | 58.98 kB |
|
|
161
|
+
| `odin` | | [DanielGavin/ols](https://github.com/DanielGavin/ols/blob/d26a19b38c581e28f67609cbb2d5ac933a9373d1/editors/vscode/syntaxes/odin.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/DanielGavin/ols/master/LICENSE) | | | 15.63 kB |
|
|
161
162
|
| `openscad` | `scad` | [tbuser/openscad.tmbundle](https://github.com/tbuser/openscad.tmbundle/blob/5962175ed355c2d58dc1991801c229809363e999/Syntaxes/OpenSCAD.tmLanguage) | [MIT](https://raw.githubusercontent.com/tbuser/openscad.tmbundle/master/LICENSE) | | | 2.58 kB |
|
|
162
163
|
| `pascal` | | [alefragnani/vscode-language-pascal](https://github.com/alefragnani/vscode-language-pascal/blob/f2d6345bd9fe83932f4d04fcacf98ce7d74b8034/syntaxes/pascal.tmLanguage) | [MIT](https://raw.githubusercontent.com/alefragnani/vscode-language-pascal/master/LICENSE.md) | [GitHub Sponsors: **@alefragnani**](https://github.com/sponsors/alefragnani) [Patreon: **alefragnani**](https://patreon.com/alefragnani) [paypal.com](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=EP57F3B6FXKTU&lc=US&item_name=Alessandro%20Fragnani&item_number=vscode%20extensions¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted) | | 3.89 kB |
|
|
163
164
|
| `perl` | | [microsoft/vscode](https://github.com/microsoft/vscode/blob/e637ff1bf7f481134849625e982ec80df9b35bc8/extensions/perl/syntaxes/perl.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/microsoft/vscode/main/LICENSE.txt) | | `html` `xml` `css` `javascript` `sql` | 40.89 kB |
|
|
@@ -0,0 +1,1166 @@
|
|
|
1
|
+
{
|
|
2
|
+
"displayName": "Odin",
|
|
3
|
+
"name": "odin",
|
|
4
|
+
"patterns": [
|
|
5
|
+
{
|
|
6
|
+
"include": "#file-tags"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"include": "#package-name-declaration"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"include": "#import-declaration"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"include": "#statements"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"repository": {
|
|
19
|
+
"assignments": {
|
|
20
|
+
"patterns": [
|
|
21
|
+
{
|
|
22
|
+
"include": "#procedure-assignment"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"include": "#type-assignment"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"include": "#distinct-type-assignment"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"include": "#constant-assignment"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"include": "#variable-assignment"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"include": "#type-annotation"
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
},
|
|
41
|
+
"attribute": {
|
|
42
|
+
"patterns": [
|
|
43
|
+
{
|
|
44
|
+
"captures": {
|
|
45
|
+
"1": {
|
|
46
|
+
"name": "keyword.control.attribute.odin"
|
|
47
|
+
},
|
|
48
|
+
"2": {
|
|
49
|
+
"name": "entity.other.attribute-name.odin"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"match": "(@)\\s*([A-Z_a-z]\\w*)\\b",
|
|
53
|
+
"name": "meta.attribute.odin"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"begin": "(@)\\s*(\\()",
|
|
57
|
+
"beginCaptures": {
|
|
58
|
+
"1": {
|
|
59
|
+
"name": "keyword.control.attribute.odin"
|
|
60
|
+
},
|
|
61
|
+
"2": {
|
|
62
|
+
"name": "meta.brace.round.odin"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"end": "\\)",
|
|
66
|
+
"endCaptures": {
|
|
67
|
+
"0": {
|
|
68
|
+
"name": "meta.brace.round.odin"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"name": "meta.attribute.odin",
|
|
72
|
+
"patterns": [
|
|
73
|
+
{
|
|
74
|
+
"match": "\\b([A-Z_a-z]\\w*)\\b",
|
|
75
|
+
"name": "entity.other.attribute-name.odin"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"match": ",",
|
|
79
|
+
"name": "punctuation.odin"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"begin": "=",
|
|
83
|
+
"beginCaptures": {
|
|
84
|
+
"0": {
|
|
85
|
+
"name": "keyword.operator.assignment.odin"
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"end": "(?=[),])",
|
|
89
|
+
"patterns": [
|
|
90
|
+
{
|
|
91
|
+
"include": "#expressions"
|
|
92
|
+
}
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
]
|
|
96
|
+
}
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
"basic-types": {
|
|
100
|
+
"patterns": [
|
|
101
|
+
{
|
|
102
|
+
"match": "\\b(i(?:8|16|32|64|128|nt))\\b",
|
|
103
|
+
"name": "support.type.primitive.odin"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"match": "\\b(u(?:8|16|32|64|128|int|intptr))\\b",
|
|
107
|
+
"name": "support.type.primitive.odin"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"match": "\\b((?:u16|u32|u64|u128|i16|i32|i64|i128)le)\\b",
|
|
111
|
+
"name": "support.type.primitive.odin"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"match": "\\b((?:i16|i32|i64|i128|u16|u32|u64|u128)be)\\b",
|
|
115
|
+
"name": "support.type.primitive.odin"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"match": "\\b(f(?:16|32|64))\\b",
|
|
119
|
+
"name": "support.type.primitive.odin"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"match": "\\b(f(?:16|32|64)le)\\b",
|
|
123
|
+
"name": "support.type.primitive.odin"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"match": "\\b(f(?:16|32|64)be)\\b",
|
|
127
|
+
"name": "support.type.primitive.odin"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"match": "\\b(complex(?:32|64|128))\\b",
|
|
131
|
+
"name": "support.type.primitive.odin"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"match": "\\b(quaternion(?:64|128|256))\\b",
|
|
135
|
+
"name": "support.type.primitive.odin"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"match": "\\b(b(?:ool|8|16|32|64))\\b",
|
|
139
|
+
"name": "support.type.primitive.odin"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"match": "\\b(string|cstring|rune)\\b",
|
|
143
|
+
"name": "support.type.primitive.odin"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"match": "\\b(rawptr)\\b",
|
|
147
|
+
"name": "support.type.primitive.odin"
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"match": "\\b(any|typeid)\\b",
|
|
151
|
+
"name": "support.type.primitive.odin"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"match": "\\b(byte)\\b",
|
|
155
|
+
"name": "support.type.primitive.odin"
|
|
156
|
+
}
|
|
157
|
+
]
|
|
158
|
+
},
|
|
159
|
+
"block-comment": {
|
|
160
|
+
"begin": "/\\*",
|
|
161
|
+
"beginCaptures": {
|
|
162
|
+
"0": {
|
|
163
|
+
"name": "punctuation.definition.comment.begin.odin"
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
"end": "\\*/",
|
|
167
|
+
"endCaptures": {
|
|
168
|
+
"0": {
|
|
169
|
+
"name": "punctuation.definition.comment.end.odin"
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
"name": "comment.block.odin",
|
|
173
|
+
"patterns": [
|
|
174
|
+
{
|
|
175
|
+
"include": "#block-comment"
|
|
176
|
+
}
|
|
177
|
+
]
|
|
178
|
+
},
|
|
179
|
+
"block-definition": {
|
|
180
|
+
"begin": "\\{",
|
|
181
|
+
"beginCaptures": {
|
|
182
|
+
"0": {
|
|
183
|
+
"name": "punctuation.definition.block.odin"
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
"end": "}",
|
|
187
|
+
"endCaptures": {
|
|
188
|
+
"0": {
|
|
189
|
+
"name": "punctuation.definition.block.odin"
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
"name": "meta.block.odin",
|
|
193
|
+
"patterns": [
|
|
194
|
+
{
|
|
195
|
+
"include": "#statements"
|
|
196
|
+
}
|
|
197
|
+
]
|
|
198
|
+
},
|
|
199
|
+
"block-label": {
|
|
200
|
+
"captures": {
|
|
201
|
+
"1": {
|
|
202
|
+
"name": "entity.name.label.odin"
|
|
203
|
+
},
|
|
204
|
+
"2": {
|
|
205
|
+
"name": "punctuation.definition.label.odin"
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
"match": "(\\w+)(:)\\s*(?=for|switch|if|\\{)",
|
|
209
|
+
"name": "meta.block.label.odin"
|
|
210
|
+
},
|
|
211
|
+
"case-clause": {
|
|
212
|
+
"begin": "\\b(case)\\b",
|
|
213
|
+
"beginCaptures": {
|
|
214
|
+
"1": {
|
|
215
|
+
"name": "keyword.control.case.odin"
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
"end": ":",
|
|
219
|
+
"endCaptures": {
|
|
220
|
+
"0": {
|
|
221
|
+
"name": "punctuation.definition.section.case-statement.odin"
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
"name": "meta.case-clause.expr.odin",
|
|
225
|
+
"patterns": [
|
|
226
|
+
{
|
|
227
|
+
"include": "#expressions"
|
|
228
|
+
}
|
|
229
|
+
]
|
|
230
|
+
},
|
|
231
|
+
"comments": {
|
|
232
|
+
"patterns": [
|
|
233
|
+
{
|
|
234
|
+
"include": "#block-comment"
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"begin": "//",
|
|
238
|
+
"beginCaptures": {
|
|
239
|
+
"0": {
|
|
240
|
+
"name": "punctuation.definition.comment.odin"
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
"end": "\\n",
|
|
244
|
+
"name": "comment.line.double-slash.odin"
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"begin": "#!",
|
|
248
|
+
"beginCaptures": {
|
|
249
|
+
"0": {
|
|
250
|
+
"name": "punctuation.definition.comment.odin"
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
"end": "\\n",
|
|
254
|
+
"name": "comment.line.shebang.odin"
|
|
255
|
+
}
|
|
256
|
+
]
|
|
257
|
+
},
|
|
258
|
+
"constant-assignment": {
|
|
259
|
+
"captures": {
|
|
260
|
+
"1": {
|
|
261
|
+
"name": "variable.other.constant.odin"
|
|
262
|
+
},
|
|
263
|
+
"2": {
|
|
264
|
+
"name": "keyword.operator.assignment.odin"
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
"match": "([A-Z_a-z]\\w*)\\s*(:\\s*:)",
|
|
268
|
+
"name": "meta.definition.variable.odin"
|
|
269
|
+
},
|
|
270
|
+
"distinct-type-assignment": {
|
|
271
|
+
"begin": "\\b([A-Z_a-z]\\w*)\\s*(:\\s*:)\\s*(?=(distinct)\\b)",
|
|
272
|
+
"beginCaptures": {
|
|
273
|
+
"1": {
|
|
274
|
+
"name": "entity.name.type.odin"
|
|
275
|
+
},
|
|
276
|
+
"2": {
|
|
277
|
+
"name": "keyword.operator.assignment.odin"
|
|
278
|
+
},
|
|
279
|
+
"3": {
|
|
280
|
+
"name": "storage.type.odin"
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
"end": "(?=^)|(?<=})",
|
|
284
|
+
"name": "meta.definition.variable.odin",
|
|
285
|
+
"patterns": [
|
|
286
|
+
{
|
|
287
|
+
"include": "#type-declaration"
|
|
288
|
+
}
|
|
289
|
+
]
|
|
290
|
+
},
|
|
291
|
+
"expressions": {
|
|
292
|
+
"patterns": [
|
|
293
|
+
{
|
|
294
|
+
"include": "#comments"
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
"include": "#ternary"
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
"include": "#map-bitset"
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"include": "#slice"
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
"include": "#keywords"
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
"include": "#type-parameter"
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
"include": "#basic-types"
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
"include": "#procedure-calls"
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
"include": "#property-access"
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
"include": "#union-member-access"
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
"include": "#union-non-nil-access"
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
"include": "#strings"
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
"include": "#punctuation"
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
"include": "#variable-name"
|
|
334
|
+
}
|
|
335
|
+
]
|
|
336
|
+
},
|
|
337
|
+
"file-tags": {
|
|
338
|
+
"begin": "#\\+[A-Z_a-z][-0-9A-Z_a-z]*",
|
|
339
|
+
"beginCaptures": {
|
|
340
|
+
"0": {
|
|
341
|
+
"name": "entity.name.tag.odin"
|
|
342
|
+
}
|
|
343
|
+
},
|
|
344
|
+
"end": "\\n",
|
|
345
|
+
"name": "comment.line.double-slash.odin",
|
|
346
|
+
"patterns": [
|
|
347
|
+
{
|
|
348
|
+
"match": ",",
|
|
349
|
+
"name": "punctuation.odin"
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
"match": "!",
|
|
353
|
+
"name": "keyword.operator.logical.odin"
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"match": "[A-Z_a-z][-0-9A-Z_a-z]*",
|
|
357
|
+
"name": "entity.other.attribute-name.odin"
|
|
358
|
+
}
|
|
359
|
+
]
|
|
360
|
+
},
|
|
361
|
+
"import-declaration": {
|
|
362
|
+
"begin": "\\b((?:|foreign\\s+)import)\\b",
|
|
363
|
+
"beginCaptures": {
|
|
364
|
+
"0": {
|
|
365
|
+
"name": "keyword.control.import.odin"
|
|
366
|
+
}
|
|
367
|
+
},
|
|
368
|
+
"end": "(?=^|;)",
|
|
369
|
+
"name": "meta.import.odin",
|
|
370
|
+
"patterns": [
|
|
371
|
+
{
|
|
372
|
+
"begin": "\\b[A-Z_a-z]\\w*",
|
|
373
|
+
"beginCaptures": {
|
|
374
|
+
"0": {
|
|
375
|
+
"name": "entity.name.namespace.odin"
|
|
376
|
+
}
|
|
377
|
+
},
|
|
378
|
+
"end": "(?=^|;)",
|
|
379
|
+
"name": "entity.name.alias.odin",
|
|
380
|
+
"patterns": [
|
|
381
|
+
{
|
|
382
|
+
"include": "#strings"
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
"include": "#comments"
|
|
386
|
+
}
|
|
387
|
+
]
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
"include": "#strings"
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
"include": "#comments"
|
|
394
|
+
}
|
|
395
|
+
]
|
|
396
|
+
},
|
|
397
|
+
"keywords": {
|
|
398
|
+
"patterns": [
|
|
399
|
+
{
|
|
400
|
+
"match": "\\b(import|foreign|package)\\b",
|
|
401
|
+
"name": "keyword.control.odin"
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
"match": "\\b(if|else|or_else|when|where|for|in|not_in|defer|switch|return|or_return)\\b",
|
|
405
|
+
"name": "keyword.control.odin"
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
"captures": {
|
|
409
|
+
"1": {
|
|
410
|
+
"name": "keyword.control.odin"
|
|
411
|
+
},
|
|
412
|
+
"2": {
|
|
413
|
+
"name": "entity.name.label.odin"
|
|
414
|
+
}
|
|
415
|
+
},
|
|
416
|
+
"match": "\\b((?:|or_)(?:break|continue))\\b\\s*(\\w+)?"
|
|
417
|
+
},
|
|
418
|
+
{
|
|
419
|
+
"match": "\\b(fallthrough|case|dynamic)\\b",
|
|
420
|
+
"name": "keyword.control.odin"
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
"match": "\\b(do|force_inline|no_inline)\\b",
|
|
424
|
+
"name": "keyword.control.odin"
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
"match": "\\b(asm)\\b",
|
|
428
|
+
"name": "keyword.control.odin"
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
"match": "\\b(auto_cast|distinct|using)\\b",
|
|
432
|
+
"name": "storage.modifier.odin"
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
"match": "\\b(context)\\b",
|
|
436
|
+
"name": "keyword.context.odin"
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
"match": "\\b(ODIN_(?:ARCH|OS))\\b",
|
|
440
|
+
"name": "variable.other.constant.odin"
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
"match": "\\b(nil|true|false)\\b",
|
|
444
|
+
"name": "constant.language.odin"
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
"match": "---",
|
|
448
|
+
"name": "constant.language.odin"
|
|
449
|
+
},
|
|
450
|
+
{
|
|
451
|
+
"match": "\\b(\\d([_\\d])*(\\.\\d([_\\d])*)?)(([Ee])([-+])?\\d+)?[ijk]?\\b",
|
|
452
|
+
"name": "constant.numeric.odin"
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
"match": "\\b((0b([01_])+)|(0o([_\\d])+)|(0d([_\\d])+)|(0[Xhx]([_\\h])+))i?\\b",
|
|
456
|
+
"name": "constant.numeric.odin"
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
"match": "\\b(struct|enum|union|map|bit_set|bit_field|matrix)\\b",
|
|
460
|
+
"name": "storage.type.odin"
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
"match": "[-%*+/]=|%%=",
|
|
464
|
+
"name": "keyword.operator.assignment.compound.odin"
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
"match": "(?:[|~]|&~?|<<|>>)=",
|
|
468
|
+
"name": "keyword.operator.assignment.compound.bitwise.odin"
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
"match": "[!=]=",
|
|
472
|
+
"name": "keyword.operator.comparison.odin"
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
"match": "[<>]=?",
|
|
476
|
+
"name": "keyword.operator.relational.odin"
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
"match": "\\.\\.[<=]",
|
|
480
|
+
"name": "keyword.operator.range.odin"
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
"match": "\\.\\.",
|
|
484
|
+
"name": "keyword.operator.spread.odin"
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
"match": ":[:=]|=",
|
|
488
|
+
"name": "keyword.operator.assignment.odin"
|
|
489
|
+
},
|
|
490
|
+
{
|
|
491
|
+
"match": "&",
|
|
492
|
+
"name": "keyword.operator.address.odin"
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
"match": "\\^",
|
|
496
|
+
"name": "keyword.operator.address.odin"
|
|
497
|
+
},
|
|
498
|
+
{
|
|
499
|
+
"match": "->",
|
|
500
|
+
"name": "storage.type.function.arrow.odin"
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
"match": "@|([-!%*+/:|]|<<?|>>?|~)=?|=|: : ?|\\$",
|
|
504
|
+
"name": "keyword.operator.odin"
|
|
505
|
+
},
|
|
506
|
+
{
|
|
507
|
+
"match": "#[A-Z_a-z]\\w*",
|
|
508
|
+
"name": "entity.name.tag.odin"
|
|
509
|
+
}
|
|
510
|
+
]
|
|
511
|
+
},
|
|
512
|
+
"map-bitset": {
|
|
513
|
+
"begin": "\\b(bit_set|map)\\b",
|
|
514
|
+
"beginCaptures": {
|
|
515
|
+
"0": {
|
|
516
|
+
"name": "storage.type.odin"
|
|
517
|
+
}
|
|
518
|
+
},
|
|
519
|
+
"end": "]",
|
|
520
|
+
"endCaptures": {
|
|
521
|
+
"0": {
|
|
522
|
+
"name": "punctuation.definition.bracket.square.odin"
|
|
523
|
+
}
|
|
524
|
+
},
|
|
525
|
+
"patterns": [
|
|
526
|
+
{
|
|
527
|
+
"match": "\\[",
|
|
528
|
+
"name": "punctuation.definition.bracket.square.odin"
|
|
529
|
+
},
|
|
530
|
+
{
|
|
531
|
+
"include": "#type-declaration"
|
|
532
|
+
}
|
|
533
|
+
]
|
|
534
|
+
},
|
|
535
|
+
"object-definition": {
|
|
536
|
+
"begin": "\\{",
|
|
537
|
+
"beginCaptures": {
|
|
538
|
+
"0": {
|
|
539
|
+
"name": "punctuation.definition.block.odin"
|
|
540
|
+
}
|
|
541
|
+
},
|
|
542
|
+
"end": "}",
|
|
543
|
+
"endCaptures": {
|
|
544
|
+
"0": {
|
|
545
|
+
"name": "punctuation.definition.block.odin"
|
|
546
|
+
}
|
|
547
|
+
},
|
|
548
|
+
"name": "meta.object.type.odin",
|
|
549
|
+
"patterns": [
|
|
550
|
+
{
|
|
551
|
+
"include": "#statements"
|
|
552
|
+
}
|
|
553
|
+
]
|
|
554
|
+
},
|
|
555
|
+
"package-name-declaration": {
|
|
556
|
+
"captures": {
|
|
557
|
+
"1": {
|
|
558
|
+
"name": "keyword.control.odin"
|
|
559
|
+
},
|
|
560
|
+
"2": {
|
|
561
|
+
"name": "entity.name.type.module.odin"
|
|
562
|
+
}
|
|
563
|
+
},
|
|
564
|
+
"match": "^\\s*(package)\\s+([A-Z_a-z]\\w*)"
|
|
565
|
+
},
|
|
566
|
+
"parameters": {
|
|
567
|
+
"begin": "\\(",
|
|
568
|
+
"beginCaptures": {
|
|
569
|
+
"0": {
|
|
570
|
+
"name": "punctuation.definition.parameters.begin.odin"
|
|
571
|
+
}
|
|
572
|
+
},
|
|
573
|
+
"end": "\\)",
|
|
574
|
+
"endCaptures": {
|
|
575
|
+
"0": {
|
|
576
|
+
"name": "punctuation.definition.parameters.end.odin"
|
|
577
|
+
}
|
|
578
|
+
},
|
|
579
|
+
"name": "meta.parameters.odin",
|
|
580
|
+
"patterns": [
|
|
581
|
+
{
|
|
582
|
+
"include": "#assignments"
|
|
583
|
+
},
|
|
584
|
+
{
|
|
585
|
+
"include": "#expressions"
|
|
586
|
+
}
|
|
587
|
+
]
|
|
588
|
+
},
|
|
589
|
+
"procedure-assignment": {
|
|
590
|
+
"begin": "\\b([A-Z_a-z]\\w*)\\s*(:\\s*:|=)\\s*(#\\w+)?\\s*(?=proc\\b)",
|
|
591
|
+
"beginCaptures": {
|
|
592
|
+
"1": {
|
|
593
|
+
"name": "meta.definition.function.odin entity.name.function.odin"
|
|
594
|
+
},
|
|
595
|
+
"2": {
|
|
596
|
+
"name": "keyword.operator.assignment.odin"
|
|
597
|
+
},
|
|
598
|
+
"3": {
|
|
599
|
+
"name": "keyword.other.odin"
|
|
600
|
+
}
|
|
601
|
+
},
|
|
602
|
+
"end": "(?=^)|(?<=})",
|
|
603
|
+
"name": "meta.definition.variable.odin",
|
|
604
|
+
"patterns": [
|
|
605
|
+
{
|
|
606
|
+
"include": "#type-declaration"
|
|
607
|
+
}
|
|
608
|
+
]
|
|
609
|
+
},
|
|
610
|
+
"procedure-calls": {
|
|
611
|
+
"patterns": [
|
|
612
|
+
{
|
|
613
|
+
"begin": "\\b(cast|transmute)\\b\\s*(\\()",
|
|
614
|
+
"beginCaptures": {
|
|
615
|
+
"1": {
|
|
616
|
+
"name": "keyword.function.odin"
|
|
617
|
+
},
|
|
618
|
+
"2": {
|
|
619
|
+
"name": "meta.brace.round.odin"
|
|
620
|
+
}
|
|
621
|
+
},
|
|
622
|
+
"end": "\\)",
|
|
623
|
+
"endCaptures": {
|
|
624
|
+
"0": {
|
|
625
|
+
"name": "meta.brace.round.odin"
|
|
626
|
+
}
|
|
627
|
+
},
|
|
628
|
+
"name": "meta.function-call.odin",
|
|
629
|
+
"patterns": [
|
|
630
|
+
{
|
|
631
|
+
"include": "#type-declaration"
|
|
632
|
+
}
|
|
633
|
+
]
|
|
634
|
+
},
|
|
635
|
+
{
|
|
636
|
+
"begin": "\\b((?:size|align)_of)\\b\\s*(\\()",
|
|
637
|
+
"beginCaptures": {
|
|
638
|
+
"1": {
|
|
639
|
+
"name": "support.function.builtin.odin"
|
|
640
|
+
},
|
|
641
|
+
"2": {
|
|
642
|
+
"name": "meta.brace.round.odin"
|
|
643
|
+
}
|
|
644
|
+
},
|
|
645
|
+
"end": "\\)",
|
|
646
|
+
"endCaptures": {
|
|
647
|
+
"0": {
|
|
648
|
+
"name": "meta.brace.round.odin"
|
|
649
|
+
}
|
|
650
|
+
},
|
|
651
|
+
"name": "meta.function-call.odin",
|
|
652
|
+
"patterns": [
|
|
653
|
+
{
|
|
654
|
+
"include": "#type-declaration"
|
|
655
|
+
}
|
|
656
|
+
]
|
|
657
|
+
},
|
|
658
|
+
{
|
|
659
|
+
"begin": "\\b(len|cap|offset_of_selector|offset_of_member|offset_of|offset_of_by_string|type_of|type_info_of|typeid_of|swizzle|complex|quaternion|real|imag|jmag|kmag|conj|expand_values|min|max|abs|clamp|soa_zip|soa_unzip|make|new|new_clone|resize|reserve|append|delete|free|free_all|assert|panic)\\b\\s*(\\()",
|
|
660
|
+
"beginCaptures": {
|
|
661
|
+
"1": {
|
|
662
|
+
"name": "support.function.builtin.odin"
|
|
663
|
+
},
|
|
664
|
+
"2": {
|
|
665
|
+
"name": "meta.brace.round.odin"
|
|
666
|
+
}
|
|
667
|
+
},
|
|
668
|
+
"end": "\\)",
|
|
669
|
+
"endCaptures": {
|
|
670
|
+
"0": {
|
|
671
|
+
"name": "meta.brace.round.odin"
|
|
672
|
+
}
|
|
673
|
+
},
|
|
674
|
+
"name": "meta.function-call.odin",
|
|
675
|
+
"patterns": [
|
|
676
|
+
{
|
|
677
|
+
"include": "#expressions"
|
|
678
|
+
}
|
|
679
|
+
]
|
|
680
|
+
},
|
|
681
|
+
{
|
|
682
|
+
"begin": "([A-Z_a-z]\\w*)\\s*(\\()",
|
|
683
|
+
"beginCaptures": {
|
|
684
|
+
"1": {
|
|
685
|
+
"name": "entity.name.function.odin"
|
|
686
|
+
},
|
|
687
|
+
"2": {
|
|
688
|
+
"name": "meta.brace.round.odin"
|
|
689
|
+
}
|
|
690
|
+
},
|
|
691
|
+
"end": "\\)",
|
|
692
|
+
"endCaptures": {
|
|
693
|
+
"0": {
|
|
694
|
+
"name": "meta.brace.round.odin"
|
|
695
|
+
}
|
|
696
|
+
},
|
|
697
|
+
"name": "meta.function-call.odin",
|
|
698
|
+
"patterns": [
|
|
699
|
+
{
|
|
700
|
+
"include": "#expressions"
|
|
701
|
+
}
|
|
702
|
+
]
|
|
703
|
+
}
|
|
704
|
+
]
|
|
705
|
+
},
|
|
706
|
+
"property-access": {
|
|
707
|
+
"captures": {
|
|
708
|
+
"1": {
|
|
709
|
+
"name": "variable.other.object.odin"
|
|
710
|
+
},
|
|
711
|
+
"2": {
|
|
712
|
+
"name": "punctuation.accessor.odin"
|
|
713
|
+
}
|
|
714
|
+
},
|
|
715
|
+
"match": "([A-Z_a-z]\\w*)\\s*(\\.)\\s*(?=[A-Z_a-z]\\w*)"
|
|
716
|
+
},
|
|
717
|
+
"punctuation": {
|
|
718
|
+
"match": "[](),.;\\[\\\\{}]",
|
|
719
|
+
"name": "punctuation.odin"
|
|
720
|
+
},
|
|
721
|
+
"return-type-declaration": {
|
|
722
|
+
"begin": "->",
|
|
723
|
+
"beginCaptures": {
|
|
724
|
+
"0": {
|
|
725
|
+
"name": "storage.type.function.arrow.odin"
|
|
726
|
+
}
|
|
727
|
+
},
|
|
728
|
+
"end": "(?=^|[),;{]|where)",
|
|
729
|
+
"name": "meta.return.type.odin",
|
|
730
|
+
"patterns": [
|
|
731
|
+
{
|
|
732
|
+
"include": "#comments"
|
|
733
|
+
},
|
|
734
|
+
{
|
|
735
|
+
"include": "#keywords"
|
|
736
|
+
},
|
|
737
|
+
{
|
|
738
|
+
"include": "#basic-types"
|
|
739
|
+
},
|
|
740
|
+
{
|
|
741
|
+
"include": "#property-access"
|
|
742
|
+
},
|
|
743
|
+
{
|
|
744
|
+
"begin": "\\(",
|
|
745
|
+
"beginCaptures": {
|
|
746
|
+
"0": {
|
|
747
|
+
"name": "punctuation.definition.parameters.begin.odin"
|
|
748
|
+
}
|
|
749
|
+
},
|
|
750
|
+
"end": "\\)",
|
|
751
|
+
"endCaptures": {
|
|
752
|
+
"0": {
|
|
753
|
+
"name": "punctuation.definition.parameters.end.odin"
|
|
754
|
+
}
|
|
755
|
+
},
|
|
756
|
+
"name": "meta.parameters.odin",
|
|
757
|
+
"patterns": [
|
|
758
|
+
{
|
|
759
|
+
"include": "#comments"
|
|
760
|
+
},
|
|
761
|
+
{
|
|
762
|
+
"include": "#assignments"
|
|
763
|
+
},
|
|
764
|
+
{
|
|
765
|
+
"include": "#keywords"
|
|
766
|
+
},
|
|
767
|
+
{
|
|
768
|
+
"include": "#basic-types"
|
|
769
|
+
},
|
|
770
|
+
{
|
|
771
|
+
"include": "#property-access"
|
|
772
|
+
},
|
|
773
|
+
{
|
|
774
|
+
"include": "#type-name"
|
|
775
|
+
},
|
|
776
|
+
{
|
|
777
|
+
"include": "#punctuation"
|
|
778
|
+
}
|
|
779
|
+
]
|
|
780
|
+
},
|
|
781
|
+
{
|
|
782
|
+
"include": "#type-name"
|
|
783
|
+
}
|
|
784
|
+
]
|
|
785
|
+
},
|
|
786
|
+
"slice": {
|
|
787
|
+
"begin": "\\[",
|
|
788
|
+
"beginCaptures": {
|
|
789
|
+
"0": {
|
|
790
|
+
"name": "meta.brace.square.odin"
|
|
791
|
+
}
|
|
792
|
+
},
|
|
793
|
+
"end": "]",
|
|
794
|
+
"endCaptures": {
|
|
795
|
+
"0": {
|
|
796
|
+
"name": "meta.brace.square.odin"
|
|
797
|
+
}
|
|
798
|
+
},
|
|
799
|
+
"name": "meta.slice.odin",
|
|
800
|
+
"patterns": [
|
|
801
|
+
{
|
|
802
|
+
"match": "\\?",
|
|
803
|
+
"name": "keyword.operator.array.odin"
|
|
804
|
+
},
|
|
805
|
+
{
|
|
806
|
+
"match": ":",
|
|
807
|
+
"name": "keyword.operator.slice.odin"
|
|
808
|
+
},
|
|
809
|
+
{
|
|
810
|
+
"include": "#expressions"
|
|
811
|
+
}
|
|
812
|
+
]
|
|
813
|
+
},
|
|
814
|
+
"statements": {
|
|
815
|
+
"patterns": [
|
|
816
|
+
{
|
|
817
|
+
"include": "#attribute"
|
|
818
|
+
},
|
|
819
|
+
{
|
|
820
|
+
"include": "#procedure-assignment"
|
|
821
|
+
},
|
|
822
|
+
{
|
|
823
|
+
"include": "#type-assignment"
|
|
824
|
+
},
|
|
825
|
+
{
|
|
826
|
+
"include": "#distinct-type-assignment"
|
|
827
|
+
},
|
|
828
|
+
{
|
|
829
|
+
"include": "#constant-assignment"
|
|
830
|
+
},
|
|
831
|
+
{
|
|
832
|
+
"include": "#variable-assignment"
|
|
833
|
+
},
|
|
834
|
+
{
|
|
835
|
+
"include": "#case-clause"
|
|
836
|
+
},
|
|
837
|
+
{
|
|
838
|
+
"include": "#block-label"
|
|
839
|
+
},
|
|
840
|
+
{
|
|
841
|
+
"include": "#type-annotation"
|
|
842
|
+
},
|
|
843
|
+
{
|
|
844
|
+
"include": "#block-definition"
|
|
845
|
+
},
|
|
846
|
+
{
|
|
847
|
+
"include": "#expressions"
|
|
848
|
+
}
|
|
849
|
+
]
|
|
850
|
+
},
|
|
851
|
+
"string-escaped-char": {
|
|
852
|
+
"patterns": [
|
|
853
|
+
{
|
|
854
|
+
"match": "\\\\(x1b|e|033)\\[[0-9;]*m",
|
|
855
|
+
"name": "constant.character.escape.ansi-color-sequence.odin"
|
|
856
|
+
},
|
|
857
|
+
{
|
|
858
|
+
"match": "\\\\([\"'\\\\abefnrtuv]|x\\h{2}|u\\h{4}|U\\h{8}|[0-7]{3})",
|
|
859
|
+
"name": "constant.character.escape.odin"
|
|
860
|
+
},
|
|
861
|
+
{
|
|
862
|
+
"match": "%([%E-HMTUXb-imo-tvwxz])",
|
|
863
|
+
"name": "constant.character.escape.placeholders.odin"
|
|
864
|
+
},
|
|
865
|
+
{
|
|
866
|
+
"match": "%(\\d*\\.?\\d*f)",
|
|
867
|
+
"name": "constant.character.escape.placeholders-floats.odin"
|
|
868
|
+
},
|
|
869
|
+
{
|
|
870
|
+
"match": "\\\\.",
|
|
871
|
+
"name": "invalid.illegal.unknown-escape.odin"
|
|
872
|
+
}
|
|
873
|
+
]
|
|
874
|
+
},
|
|
875
|
+
"strings": {
|
|
876
|
+
"patterns": [
|
|
877
|
+
{
|
|
878
|
+
"begin": "\"",
|
|
879
|
+
"beginCaptures": {
|
|
880
|
+
"0": {
|
|
881
|
+
"name": "punctuation.definition.string.begin.odin"
|
|
882
|
+
}
|
|
883
|
+
},
|
|
884
|
+
"end": "\"",
|
|
885
|
+
"endCaptures": {
|
|
886
|
+
"0": {
|
|
887
|
+
"name": "punctuation.definition.string.end.odin"
|
|
888
|
+
}
|
|
889
|
+
},
|
|
890
|
+
"name": "string.quoted.double.odin",
|
|
891
|
+
"patterns": [
|
|
892
|
+
{
|
|
893
|
+
"include": "#string-escaped-char"
|
|
894
|
+
}
|
|
895
|
+
]
|
|
896
|
+
},
|
|
897
|
+
{
|
|
898
|
+
"begin": "'",
|
|
899
|
+
"beginCaptures": {
|
|
900
|
+
"0": {
|
|
901
|
+
"name": "punctuation.definition.string.begin.odin"
|
|
902
|
+
}
|
|
903
|
+
},
|
|
904
|
+
"end": "'",
|
|
905
|
+
"endCaptures": {
|
|
906
|
+
"0": {
|
|
907
|
+
"name": "punctuation.definition.string.end.odin"
|
|
908
|
+
}
|
|
909
|
+
},
|
|
910
|
+
"name": "string.quoted.single.odin",
|
|
911
|
+
"patterns": [
|
|
912
|
+
{
|
|
913
|
+
"include": "#string-escaped-char"
|
|
914
|
+
}
|
|
915
|
+
]
|
|
916
|
+
},
|
|
917
|
+
{
|
|
918
|
+
"begin": "`",
|
|
919
|
+
"beginCaptures": {
|
|
920
|
+
"0": {
|
|
921
|
+
"name": "punctuation.definition.string.begin.odin"
|
|
922
|
+
}
|
|
923
|
+
},
|
|
924
|
+
"end": "`",
|
|
925
|
+
"endCaptures": {
|
|
926
|
+
"0": {
|
|
927
|
+
"name": "punctuation.definition.string.end.odin"
|
|
928
|
+
}
|
|
929
|
+
},
|
|
930
|
+
"name": "string.quoted.raw.odin"
|
|
931
|
+
}
|
|
932
|
+
]
|
|
933
|
+
},
|
|
934
|
+
"ternary": {
|
|
935
|
+
"begin": "\\?",
|
|
936
|
+
"beginCaptures": {
|
|
937
|
+
"0": {
|
|
938
|
+
"name": "keyword.operator.ternary.odin"
|
|
939
|
+
}
|
|
940
|
+
},
|
|
941
|
+
"end": ":",
|
|
942
|
+
"endCaptures": {
|
|
943
|
+
"0": {
|
|
944
|
+
"name": "keyword.operator.ternary.odin"
|
|
945
|
+
}
|
|
946
|
+
},
|
|
947
|
+
"name": "meta.ternary.odin",
|
|
948
|
+
"patterns": [
|
|
949
|
+
{
|
|
950
|
+
"include": "#expressions"
|
|
951
|
+
}
|
|
952
|
+
]
|
|
953
|
+
},
|
|
954
|
+
"type-annotation": {
|
|
955
|
+
"begin": "(?:([A-Z_a-z]\\w*)\\s*(,)\\s*)?(?:([A-Z_a-z]\\w*)\\s*(,)\\s*)?([A-Z_a-z]\\w*)\\s*(:)",
|
|
956
|
+
"beginCaptures": {
|
|
957
|
+
"1": {
|
|
958
|
+
"name": "variable.name.odin"
|
|
959
|
+
},
|
|
960
|
+
"2": {
|
|
961
|
+
"name": "punctuation.odin"
|
|
962
|
+
},
|
|
963
|
+
"3": {
|
|
964
|
+
"name": "variable.name.odin"
|
|
965
|
+
},
|
|
966
|
+
"4": {
|
|
967
|
+
"name": "punctuation.odin"
|
|
968
|
+
},
|
|
969
|
+
"5": {
|
|
970
|
+
"name": "variable.name.odin"
|
|
971
|
+
},
|
|
972
|
+
"6": {
|
|
973
|
+
"name": "keyword.operator.type.annotation.odin"
|
|
974
|
+
}
|
|
975
|
+
},
|
|
976
|
+
"end": "(?=^|[),:;=]|for|switch|if|\\{)",
|
|
977
|
+
"name": "meta.type.annotation.odin",
|
|
978
|
+
"patterns": [
|
|
979
|
+
{
|
|
980
|
+
"include": "#type-declaration"
|
|
981
|
+
}
|
|
982
|
+
]
|
|
983
|
+
},
|
|
984
|
+
"type-assignment": {
|
|
985
|
+
"begin": "\\b([A-Z_a-z]\\w*)\\s*(:\\s*:)\\s*(?=(struct|union|enum|bit_set|bit_field)\\b)",
|
|
986
|
+
"beginCaptures": {
|
|
987
|
+
"1": {
|
|
988
|
+
"name": "entity.name.type.odin"
|
|
989
|
+
},
|
|
990
|
+
"2": {
|
|
991
|
+
"name": "keyword.operator.assignment.odin"
|
|
992
|
+
},
|
|
993
|
+
"3": {
|
|
994
|
+
"name": "storage.type.odin"
|
|
995
|
+
}
|
|
996
|
+
},
|
|
997
|
+
"end": "(?=^)|(?<=})",
|
|
998
|
+
"name": "meta.definition.variable.odin",
|
|
999
|
+
"patterns": [
|
|
1000
|
+
{
|
|
1001
|
+
"include": "#type-declaration"
|
|
1002
|
+
}
|
|
1003
|
+
]
|
|
1004
|
+
},
|
|
1005
|
+
"type-declaration": {
|
|
1006
|
+
"name": "meta.type.declaration.odin",
|
|
1007
|
+
"patterns": [
|
|
1008
|
+
{
|
|
1009
|
+
"include": "#map-bitset"
|
|
1010
|
+
},
|
|
1011
|
+
{
|
|
1012
|
+
"begin": "\\b(proc|struct|union|enum|bit_field)\\b",
|
|
1013
|
+
"beginCaptures": {
|
|
1014
|
+
"1": {
|
|
1015
|
+
"name": "storage.type.odin"
|
|
1016
|
+
}
|
|
1017
|
+
},
|
|
1018
|
+
"end": "(?=^|[),;])|(?<=})",
|
|
1019
|
+
"patterns": [
|
|
1020
|
+
{
|
|
1021
|
+
"include": "#parameters"
|
|
1022
|
+
},
|
|
1023
|
+
{
|
|
1024
|
+
"include": "#return-type-declaration"
|
|
1025
|
+
},
|
|
1026
|
+
{
|
|
1027
|
+
"include": "#object-definition"
|
|
1028
|
+
},
|
|
1029
|
+
{
|
|
1030
|
+
"include": "#expressions"
|
|
1031
|
+
}
|
|
1032
|
+
]
|
|
1033
|
+
},
|
|
1034
|
+
{
|
|
1035
|
+
"include": "#comments"
|
|
1036
|
+
},
|
|
1037
|
+
{
|
|
1038
|
+
"include": "#strings"
|
|
1039
|
+
},
|
|
1040
|
+
{
|
|
1041
|
+
"include": "#block-definition"
|
|
1042
|
+
},
|
|
1043
|
+
{
|
|
1044
|
+
"include": "#keywords"
|
|
1045
|
+
},
|
|
1046
|
+
{
|
|
1047
|
+
"include": "#basic-types"
|
|
1048
|
+
},
|
|
1049
|
+
{
|
|
1050
|
+
"include": "#slice"
|
|
1051
|
+
},
|
|
1052
|
+
{
|
|
1053
|
+
"begin": "\\(",
|
|
1054
|
+
"beginCaptures": {
|
|
1055
|
+
"0": {
|
|
1056
|
+
"name": "punctuation.definition.typeparameters.begin.odin"
|
|
1057
|
+
}
|
|
1058
|
+
},
|
|
1059
|
+
"end": "\\)",
|
|
1060
|
+
"endCaptures": {
|
|
1061
|
+
"0": {
|
|
1062
|
+
"name": "punctuation.definition.typeparameters.end.odin"
|
|
1063
|
+
}
|
|
1064
|
+
},
|
|
1065
|
+
"patterns": [
|
|
1066
|
+
{
|
|
1067
|
+
"include": "#type-declaration"
|
|
1068
|
+
}
|
|
1069
|
+
]
|
|
1070
|
+
},
|
|
1071
|
+
{
|
|
1072
|
+
"include": "#property-access"
|
|
1073
|
+
},
|
|
1074
|
+
{
|
|
1075
|
+
"include": "#punctuation"
|
|
1076
|
+
},
|
|
1077
|
+
{
|
|
1078
|
+
"include": "#type-name"
|
|
1079
|
+
}
|
|
1080
|
+
]
|
|
1081
|
+
},
|
|
1082
|
+
"type-name": {
|
|
1083
|
+
"match": "\\b[A-Z_a-z]\\w*\\b",
|
|
1084
|
+
"name": "entity.name.type.odin"
|
|
1085
|
+
},
|
|
1086
|
+
"type-parameter": {
|
|
1087
|
+
"captures": {
|
|
1088
|
+
"1": {
|
|
1089
|
+
"name": "keyword.operator.odin"
|
|
1090
|
+
},
|
|
1091
|
+
"2": {
|
|
1092
|
+
"name": "entity.name.type.parameter.odin"
|
|
1093
|
+
}
|
|
1094
|
+
},
|
|
1095
|
+
"match": "(\\$)\\s*\\b([A-Z_a-z]\\w*)\\b"
|
|
1096
|
+
},
|
|
1097
|
+
"union-member-access": {
|
|
1098
|
+
"begin": "([A-Z_a-z]\\w*)\\s*(\\.)\\s*(\\()",
|
|
1099
|
+
"beginCaptures": {
|
|
1100
|
+
"1": {
|
|
1101
|
+
"name": "variable.other.object.odin"
|
|
1102
|
+
},
|
|
1103
|
+
"2": {
|
|
1104
|
+
"name": "punctuation.accessor.odin"
|
|
1105
|
+
},
|
|
1106
|
+
"3": {
|
|
1107
|
+
"name": "meta.brace.round.odin"
|
|
1108
|
+
}
|
|
1109
|
+
},
|
|
1110
|
+
"end": "\\)",
|
|
1111
|
+
"endCaptures": {
|
|
1112
|
+
"0": {
|
|
1113
|
+
"name": "meta.brace.round.odin"
|
|
1114
|
+
}
|
|
1115
|
+
},
|
|
1116
|
+
"patterns": [
|
|
1117
|
+
{
|
|
1118
|
+
"include": "#type-declaration"
|
|
1119
|
+
}
|
|
1120
|
+
]
|
|
1121
|
+
},
|
|
1122
|
+
"union-non-nil-access": {
|
|
1123
|
+
"captures": {
|
|
1124
|
+
"1": {
|
|
1125
|
+
"name": "variable.other.object.odin"
|
|
1126
|
+
},
|
|
1127
|
+
"2": {
|
|
1128
|
+
"name": "punctuation.accessor.odin"
|
|
1129
|
+
},
|
|
1130
|
+
"3": {
|
|
1131
|
+
"name": "punctuation.accessor.optional.odin"
|
|
1132
|
+
}
|
|
1133
|
+
},
|
|
1134
|
+
"match": "([A-Z_a-z]\\w*)\\s*(\\.)\\s*(\\?)"
|
|
1135
|
+
},
|
|
1136
|
+
"variable-assignment": {
|
|
1137
|
+
"captures": {
|
|
1138
|
+
"1": {
|
|
1139
|
+
"name": "variable.name.odin"
|
|
1140
|
+
},
|
|
1141
|
+
"2": {
|
|
1142
|
+
"name": "punctuation.odin"
|
|
1143
|
+
},
|
|
1144
|
+
"3": {
|
|
1145
|
+
"name": "variable.name.odin"
|
|
1146
|
+
},
|
|
1147
|
+
"4": {
|
|
1148
|
+
"name": "punctuation.odin"
|
|
1149
|
+
},
|
|
1150
|
+
"5": {
|
|
1151
|
+
"name": "variable.name.odin"
|
|
1152
|
+
},
|
|
1153
|
+
"6": {
|
|
1154
|
+
"name": "keyword.operator.assignment.odin"
|
|
1155
|
+
}
|
|
1156
|
+
},
|
|
1157
|
+
"match": "(?:([A-Z_a-z]\\w*)\\s*(,)\\s*)?(?:([A-Z_a-z]\\w*)\\s*(,)\\s*)?([A-Z_a-z]\\w*)\\s*(:\\s*=)",
|
|
1158
|
+
"name": "meta.definition.variable.odin"
|
|
1159
|
+
},
|
|
1160
|
+
"variable-name": {
|
|
1161
|
+
"match": "\\b[A-Z_a-z]\\w*\\b",
|
|
1162
|
+
"name": "variable.name.odin"
|
|
1163
|
+
}
|
|
1164
|
+
},
|
|
1165
|
+
"scopeName": "source.odin"
|
|
1166
|
+
}
|
package/index.js
CHANGED
|
@@ -2927,6 +2927,24 @@ export const grammars = [
|
|
|
2927
2927
|
source: 'https://github.com/reasonml-editor/vscode-reasonml/blob/14af625ec50ed9968b957b4d6336c5338d81af45/syntaxes/ocaml.json',
|
|
2928
2928
|
sourceApi: 'https://api.github.com/repos/reasonml-editor/vscode-reasonml/contents/syntaxes/ocaml.json?ref=14af625ec50ed9968b957b4d6336c5338d81af45',
|
|
2929
2929
|
},
|
|
2930
|
+
{
|
|
2931
|
+
byteSize: 16000,
|
|
2932
|
+
categories: [
|
|
2933
|
+
'general',
|
|
2934
|
+
],
|
|
2935
|
+
displayName: 'Odin',
|
|
2936
|
+
funding: [
|
|
2937
|
+
],
|
|
2938
|
+
hash: '5sffQfBmHX2fJYQS-iu7TUQgjU7XLrS2k6-4Dv4Mdeg',
|
|
2939
|
+
lastUpdate: '2025-01-13T00:20:53Z',
|
|
2940
|
+
license: 'MIT',
|
|
2941
|
+
licenseUrl: 'https://raw.githubusercontent.com/DanielGavin/ols/master/LICENSE',
|
|
2942
|
+
name: 'odin',
|
|
2943
|
+
scopeName: 'source.odin',
|
|
2944
|
+
sha: 'd26a19b38c581e28f67609cbb2d5ac933a9373d1',
|
|
2945
|
+
source: 'https://github.com/DanielGavin/ols/blob/d26a19b38c581e28f67609cbb2d5ac933a9373d1/editors/vscode/syntaxes/odin.tmLanguage.json',
|
|
2946
|
+
sourceApi: 'https://api.github.com/repos/DanielGavin/ols/contents/editors/vscode/syntaxes/odin.tmLanguage.json?ref=d26a19b38c581e28f67609cbb2d5ac933a9373d1',
|
|
2947
|
+
},
|
|
2930
2948
|
{
|
|
2931
2949
|
aliases: [
|
|
2932
2950
|
'scad',
|