github-linguist 7.7.0 → 7.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/grammars/hidden.manref.json +1 -1
  3. data/grammars/source.4dm.json +1029 -0
  4. data/grammars/source.agda.json +32 -202
  5. data/grammars/source.clarion.json +6 -6
  6. data/grammars/source.dircolors.json +101 -3
  7. data/grammars/source.editorconfig.json +23 -5
  8. data/grammars/source.elm.json +1 -1
  9. data/grammars/source.emacs.lisp.json +10 -0
  10. data/grammars/source.faust.json +119 -0
  11. data/grammars/source.gcode.json +170 -8
  12. data/grammars/source.hlsl.json +9 -5
  13. data/grammars/source.hx.json +4 -0
  14. data/grammars/source.igor.json +44 -0
  15. data/grammars/source.julia.json +8 -4
  16. data/grammars/source.mcfunction-snapshot.json +1 -1
  17. data/grammars/source.meson.json +1 -1
  18. data/grammars/source.odin-ehr.json +806 -0
  19. data/grammars/source.odin.json +402 -0
  20. data/grammars/source.p4.json +5 -21
  21. data/grammars/source.scala.json +27 -3
  22. data/grammars/source.sy.json +2088 -183
  23. data/grammars/source.terraform.json +576 -132
  24. data/grammars/source.ts.json +89 -30
  25. data/grammars/source.tsx.json +89 -30
  26. data/grammars/source.v.json +541 -788
  27. data/grammars/source.viml.json +2 -2
  28. data/grammars/source.webassembly.json +10 -0
  29. data/grammars/version +1 -1
  30. data/lib/linguist/VERSION +1 -1
  31. data/lib/linguist/generated.rb +10 -1
  32. data/lib/linguist/heuristics.yml +41 -3
  33. data/lib/linguist/languages.json +1 -1
  34. data/lib/linguist/languages.yml +117 -34
  35. data/lib/linguist/lazy_blob.rb +10 -10
  36. data/lib/linguist/linguist.bundle +0 -0
  37. data/lib/linguist/samples.json +6577 -1979
  38. data/lib/linguist/vendor.yml +3 -0
  39. metadata +6 -6
  40. data/grammars/source.LS.json +0 -85
  41. data/grammars/source.MCPOST.json +0 -54
  42. data/grammars/source.MOD.json +0 -55
  43. data/grammars/source.apt.json +0 -18
@@ -0,0 +1,402 @@
1
+ {
2
+ "name": "Odin",
3
+ "scopeName": "source.odin",
4
+ "patterns": [
5
+ {
6
+ "include": "#comments"
7
+ },
8
+ {
9
+ "include": "#types"
10
+ },
11
+ {
12
+ "include": "#keywords"
13
+ },
14
+ {
15
+ "include": "#functions_and_declarations"
16
+ },
17
+ {
18
+ "include": "#strings"
19
+ },
20
+ {
21
+ "include": "#string_escaped_char"
22
+ }
23
+ ],
24
+ "repository": {
25
+ "block_comment": {
26
+ "name": "comment.block.odin",
27
+ "begin": "/\\*",
28
+ "end": "\\*/",
29
+ "captures": {
30
+ "0": {
31
+ "name": "punctuation.definition.comment.odin"
32
+ }
33
+ }
34
+ },
35
+ "comments": {
36
+ "patterns": [
37
+ {
38
+ "include": "#block_comment"
39
+ },
40
+ {
41
+ "name": "invalid.illegal.stray-comment-end.odin",
42
+ "match": "\\*/.*\\n"
43
+ },
44
+ {
45
+ "include": "#line_comment"
46
+ }
47
+ ]
48
+ },
49
+ "functions_and_declarations": {
50
+ "patterns": [
51
+ {
52
+ "match": "\\b(\\b[[:alpha:]_]+[[:alnum:]_]*\\b)\\s*[:]\\s*[:]\\s*(proc)",
53
+ "captures": {
54
+ "1": {
55
+ "name": "meta.function.odin entity.name.function.odin"
56
+ },
57
+ "2": {
58
+ "name": "storage.type.odin"
59
+ }
60
+ }
61
+ },
62
+ {
63
+ "match": "\\b(\\b[[:alpha:]_]+[[:alnum:]_]*\\b)\\s*[:]\\s*[:]\\s*(inline|no_inline)\\s+(proc)",
64
+ "captures": {
65
+ "1": {
66
+ "name": "meta.function.odin entity.name.function.odin"
67
+ },
68
+ "2": {
69
+ "name": "keyword.control.odin"
70
+ },
71
+ "3": {
72
+ "name": "storage.type.odin"
73
+ }
74
+ }
75
+ },
76
+ {
77
+ "match": "\\b(size_of|align_of|offset_of|type_of)\\b\\s*\\(",
78
+ "captures": {
79
+ "1": {
80
+ "name": "keyword.function.odin"
81
+ }
82
+ }
83
+ },
84
+ {
85
+ "match": "\\b(type_info_of|typeid_of)\\b\\s*\\(",
86
+ "captures": {
87
+ "1": {
88
+ "name": "keyword.function.odin"
89
+ }
90
+ }
91
+ },
92
+ {
93
+ "match": "(proc|macro)\\s*[\\(]",
94
+ "captures": {
95
+ "1": {
96
+ "name": "storage.type.odin"
97
+ }
98
+ }
99
+ },
100
+ {
101
+ "match": "(\\b[[:alpha:]_]+[[:alnum:]_]*\\b)\\s*[!]?\\s*[\\(]",
102
+ "captures": {
103
+ "1": {
104
+ "name": "support.function.odin"
105
+ }
106
+ }
107
+ },
108
+ {
109
+ "match": "\\b(\\b[[:alpha:]_]+[[:alnum:]_]*\\b)\\s*[:]\\s*[:]\\s*(struct|union|enum|bit_field|bit_set)",
110
+ "captures": {
111
+ "1": {
112
+ "name": "meta.type.odin entity.name.type.odin"
113
+ },
114
+ "2": {
115
+ "name": "storage.type.odin"
116
+ }
117
+ }
118
+ },
119
+ {
120
+ "match": "\\b(\\b[[:alpha:]_]+[[:alnum:]_]*\\b)\\s*[:]\\s*[:]\\s*([#]\\s*type)",
121
+ "captures": {
122
+ "1": {
123
+ "name": "meta.type.odin entity.name.type.odin"
124
+ },
125
+ "2": {
126
+ "name": "keyword.tag.odin"
127
+ }
128
+ }
129
+ },
130
+ {
131
+ "match": "\\b(\\b[[:alpha:]_]+[[:alnum:]_]*\\b)\\s*[:]\\s*[:]\\s*",
132
+ "captures": {
133
+ "1": {
134
+ "name": "meta.constant.odin entity.name.type.odin"
135
+ }
136
+ }
137
+ }
138
+ ]
139
+ },
140
+ "keywords": {
141
+ "patterns": [
142
+ {
143
+ "name": "keyword.control.odin",
144
+ "match": "\\b(import|foreign|package)\\b"
145
+ },
146
+ {
147
+ "name": "keyword.control.odin",
148
+ "match": "\\b(if|else|when|for|in|notin|not_in|defer|switch|return|const|do|where)\\b"
149
+ },
150
+ {
151
+ "name": "keyword.control.odin",
152
+ "match": "\\b(fallthrough|break|continue|case|dynamic)\\b"
153
+ },
154
+ {
155
+ "name": "keyword.control.odin",
156
+ "match": "\\b(using|inline|no_inline)\\b"
157
+ },
158
+ {
159
+ "name": "keyword.control.odin",
160
+ "match": "\\b(asm|yield|await)\\b"
161
+ },
162
+ {
163
+ "name": "keyword.operator.odin",
164
+ "match": "\\b(distinct|opaque)\\b"
165
+ },
166
+ {
167
+ "name": "keyword.operator.odin",
168
+ "match": "\\b(context)\\b"
169
+ },
170
+ {
171
+ "name": "constant.language.odin",
172
+ "match": "\\b(nil|true|false)\\b"
173
+ },
174
+ {
175
+ "name": "constant.numeric.odin",
176
+ "match": "\\b(\\d(\\d|_)*(.\\d(\\d|_)*)?)((e|E)(\\+|-)?\\d+)?[ijk]?\\b"
177
+ },
178
+ {
179
+ "name": "constant.numeric.odin",
180
+ "match": "\\b((0b(0|1|_)+)|(0o(\\d|_)+)|(0d(\\d|_)+)|(0[xXh]([[:xdigit:]]|_)+))[ijk]?\\b"
181
+ },
182
+ {
183
+ "name": "constant.numeric.odin",
184
+ "match": "---"
185
+ },
186
+ {
187
+ "name": "storage.type.odin",
188
+ "match": "\\b(macro|struct|enum|union|map|bit_field|bit_set)\\b"
189
+ },
190
+ {
191
+ "name": "keyword.function.odin",
192
+ "match": "\\b(cast|transmute|auto_cast)\\b"
193
+ },
194
+ {
195
+ "name": "keyword.tag.odin",
196
+ "match": "([#]\\s*\\b([[:alpha:]_]+[[:alnum:]_]*)\\b)"
197
+ },
198
+ {
199
+ "name": "keyword.tag.odin",
200
+ "match": "(\\x40\\s*\\b([[:alpha:]_]+[[:alnum:]_]*)\\b)"
201
+ },
202
+ {
203
+ "name": "keyword.tag.odin",
204
+ "match": "(\\x40\\s*[(]\\s*\\b([[:alpha:]_]+[[:alnum:]_]*)\\b)\\s*[)]"
205
+ },
206
+ {
207
+ "name": "keyword.operator.odin",
208
+ "match": "@"
209
+ }
210
+ ]
211
+ },
212
+ "line_comment": {
213
+ "begin": "(^[ \\t]+)?((?=//)|(?=#!))",
214
+ "end": "(?!\\G)",
215
+ "patterns": [
216
+ {
217
+ "name": "comment.line.double-slash.odin",
218
+ "begin": "//",
219
+ "end": "\\n",
220
+ "patterns": [
221
+ {
222
+ "name": "punctuation.separator.continuation.odin",
223
+ "match": "(?\u003e\\\\\\s*\\n)"
224
+ }
225
+ ],
226
+ "beginCaptures": {
227
+ "0": {
228
+ "name": "punctuation.definition.comment.odin"
229
+ }
230
+ }
231
+ },
232
+ {
233
+ "name": "comment.line.double-slash.odin",
234
+ "begin": "#!",
235
+ "end": "\\n",
236
+ "patterns": [
237
+ {
238
+ "name": "punctuation.separator.continuation.odin",
239
+ "match": "(?\u003e\\\\\\s*\\n)"
240
+ }
241
+ ],
242
+ "beginCaptures": {
243
+ "0": {
244
+ "name": "punctuation.definition.comment.odin"
245
+ }
246
+ }
247
+ }
248
+ ],
249
+ "beginCaptures": {
250
+ "1": {
251
+ "name": "punctuation.whitespace.comment.leading.odin"
252
+ }
253
+ }
254
+ },
255
+ "string_escaped_char": {
256
+ "patterns": [
257
+ {
258
+ "name": "constant.character.escape.odin",
259
+ "match": "\\\\(\\\\|[abefnrutv'\"]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8}|[0-7]{3})"
260
+ },
261
+ {
262
+ "name": "invalid.illegal.unknown-escape.odin",
263
+ "match": "\\\\."
264
+ }
265
+ ]
266
+ },
267
+ "strings": {
268
+ "patterns": [
269
+ {
270
+ "name": "string.quoted.double.odin",
271
+ "begin": "\"",
272
+ "end": "\"",
273
+ "patterns": [
274
+ {
275
+ "include": "#string_placeholder"
276
+ },
277
+ {
278
+ "include": "#string_escaped_char"
279
+ }
280
+ ],
281
+ "beginCaptures": {
282
+ "0": {
283
+ "name": "punctuation.definition.string.begin.odin"
284
+ }
285
+ },
286
+ "endCaptures": {
287
+ "0": {
288
+ "name": "punctuation.definition.string.end.odin"
289
+ }
290
+ }
291
+ },
292
+ {
293
+ "name": "string.quoted.single.odin",
294
+ "begin": "'",
295
+ "end": "'",
296
+ "patterns": [
297
+ {
298
+ "include": "#string_escaped_char"
299
+ }
300
+ ],
301
+ "beginCaptures": {
302
+ "0": {
303
+ "name": "punctuation.definition.string.begin.odin"
304
+ }
305
+ },
306
+ "endCaptures": {
307
+ "0": {
308
+ "name": "punctuation.definition.string.end.odin"
309
+ }
310
+ }
311
+ },
312
+ {
313
+ "name": "string.quoted.raw.odin",
314
+ "begin": "`",
315
+ "end": "`",
316
+ "beginCaptures": {
317
+ "0": {
318
+ "name": "punctuation.definition.string.begin.odin"
319
+ }
320
+ },
321
+ "endCaptures": {
322
+ "0": {
323
+ "name": "punctuation.definition.string.end.odin"
324
+ }
325
+ }
326
+ }
327
+ ]
328
+ },
329
+ "types": {
330
+ "patterns": [
331
+ {
332
+ "name": "storage.type.odin",
333
+ "match": "\\b(struct|enum|union|bit_field|bit_set)\\b(?:(\\{)(\\}))?"
334
+ },
335
+ {
336
+ "name": "storage.type.odin",
337
+ "match": "\\b(proc)\\b"
338
+ },
339
+ {
340
+ "name": "storage.type.odin",
341
+ "match": "\\$\\s*(\\b([[:alpha:]_]+[[:alnum:]_]*)\\b)"
342
+ },
343
+ {
344
+ "name": "storage.type.odin",
345
+ "match": "\\b(i8|i16|i32|i64|i128|int)\\b"
346
+ },
347
+ {
348
+ "name": "storage.type.odin",
349
+ "match": "\\b(u8|u16|u32|u64|u128|uint|uintptr)\\b"
350
+ },
351
+ {
352
+ "name": "storage.type.odin",
353
+ "match": "\\b(f16|f32|f64|f128)\\b"
354
+ },
355
+ {
356
+ "name": "storage.type.odin",
357
+ "match": "\\b(f16le|f32le|f64le|f128le)\\b"
358
+ },
359
+ {
360
+ "name": "storage.type.odin",
361
+ "match": "\\b(f16be|f32be|f64be|f128be)\\b"
362
+ },
363
+ {
364
+ "name": "storage.type.odin",
365
+ "match": "\\b(complex32|complex64|complex128)\\b"
366
+ },
367
+ {
368
+ "name": "storage.type.odin",
369
+ "match": "\\b(quaternion64|quaternion128|quaternion256)\\b"
370
+ },
371
+ {
372
+ "name": "storage.type.odin",
373
+ "match": "\\b(bool|b8|b16|b32|b64)\\b"
374
+ },
375
+ {
376
+ "name": "storage.type.odin",
377
+ "match": "\\b(string|cstring|rune)\\b"
378
+ },
379
+ {
380
+ "name": "storage.type.odin",
381
+ "match": "\\b(rawptr)\\b"
382
+ },
383
+ {
384
+ "name": "storage.type.odin",
385
+ "match": "\\b(any|typeid)\\b"
386
+ },
387
+ {
388
+ "name": "storage.type.odin",
389
+ "match": "\\b(byte)\\b"
390
+ },
391
+ {
392
+ "name": "storage.type.odin",
393
+ "match": "\\b(u16le|u32le|u64le|u128le|i16le|i32le|i64le|i128le)\\b"
394
+ },
395
+ {
396
+ "name": "storage.type.odin",
397
+ "match": "\\b(i16be|i32be|i64be|i128be|u16be|u32be|u64be|u128be)\\b"
398
+ }
399
+ ]
400
+ }
401
+ }
402
+ }
@@ -1,5 +1,5 @@
1
1
  {
2
- "name": "P4-16",
2
+ "name": "P4",
3
3
  "scopeName": "source.p4",
4
4
  "patterns": [
5
5
  {
@@ -44,15 +44,11 @@
44
44
  },
45
45
  {
46
46
  "name": "storage.type.object.p4",
47
- "match": "\\b(struct|package|header|metadata|parser|transition|state|actions|action|table|key|control|extern|verify)\\b"
47
+ "match": "\\b(header_type|header|metadata|field_list|field_list_calculation|parser|parser_exception|parser_value_set|counter|meter|register|action|action_profile|table|control|extern)\\b"
48
48
  },
49
49
  {
50
50
  "name": "storage.data.type.p4",
51
- "match": "\\b(void|const|bool|varbit|int|typedef|tuple|enum)\\b"
52
- },
53
- {
54
- "name": "support.type.bit.p4",
55
- "match": "bit(\u003c\\d+\u003e)"
51
+ "match": "\\b(bool|bit|varbit|int)\\b"
56
52
  },
57
53
  {
58
54
  "name": "variable.language.p4",
@@ -60,7 +56,7 @@
60
56
  },
61
57
  {
62
58
  "name": "keyword.control.p4",
63
- "match": "\\b(if|else if|else|return|hit|miss|true|false|inout|in|out|exit)\\b"
59
+ "match": "\\b(if|else if|else|return|hit|miss|true|false)\\b"
64
60
  },
65
61
  {
66
62
  "name": "keyword.operator.p4",
@@ -68,7 +64,7 @@
68
64
  },
69
65
  {
70
66
  "name": "entity.name.type.p4",
71
- "match": "\\b(exact|ternary|lpm|range|valid|mask|match_kind)\\b"
67
+ "match": "\\b(exact|ternary|lpm|range|valid|mask)\\b"
72
68
  },
73
69
  {
74
70
  "name": "storage.type.p4",
@@ -90,10 +86,6 @@
90
86
  "name": "meta.preprocessor.include.p4",
91
87
  "match": "\\#include"
92
88
  },
93
- {
94
- "name": "meta.preprocessor.p4",
95
- "match": "\\#ifndef|\\#ifdef|\\#if|\\#else|\\#endif|\\#elif"
96
- },
97
89
  {
98
90
  "name": "meta.preprocessor.define.p4",
99
91
  "match": "\\#define"
@@ -102,10 +94,6 @@
102
94
  "name": "support.function.primitive.p4",
103
95
  "match": "\\b(apply|valid|select|current|extract|add_header|copy_header|remove_header|modify_field|add_to_field|add|set_field_to_hash_index|truncate|drop|no_op|push|pop|count|meter|generate_digest|resubmit|recirculate|clone_ingress_pkt_to_ingress|clone_egress_pkt_to_ingress|clone_ingress_pkt_to_egress|clone_egress_pkt_to_egress|register_write|register_read)\\b"
104
96
  },
105
- {
106
- "name": "storage.type.annotation.p4",
107
- "match": "@\\w+"
108
- },
109
97
  {
110
98
  "name": "support.any-method.p4",
111
99
  "match": "[a-zA-Z_][0-9a-zA-Z_]*"
@@ -118,10 +106,6 @@
118
106
  "name": "constant.numeric.p4",
119
107
  "match": "0(x|X)[0-9a-fA-F]+"
120
108
  },
121
- {
122
- "name": "constant.numeric.p4",
123
- "match": "\\dw\\d+"
124
- },
125
109
  {
126
110
  "name": "constant.numeric.p4",
127
111
  "match": "0(b|B)[01]+"