github-linguist 7.7.0 → 7.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/grammars/annotation.liquidhaskell.haskell.json +47 -0
  3. data/grammars/hidden.manref.json +1 -1
  4. data/grammars/hint.haskell.json +47 -0
  5. data/grammars/hint.message.haskell.json +47 -0
  6. data/grammars/hint.type.haskell.json +47 -0
  7. data/grammars/markdown.plantuml.codeblock.json +26 -0
  8. data/grammars/source.4dm.json +1100 -0
  9. data/grammars/source.abap.json +1 -1
  10. data/grammars/source.agda.json +32 -202
  11. data/grammars/source.ahk.json +6 -2
  12. data/grammars/source.chapel.json +4 -4
  13. data/grammars/source.csound.json +1 -1
  14. data/grammars/source.dart.json +57 -31
  15. data/grammars/source.dircolors.json +101 -3
  16. data/grammars/source.editorconfig.json +23 -5
  17. data/grammars/source.elixir.json +8 -0
  18. data/grammars/source.elm.json +1 -1
  19. data/grammars/source.emacs.lisp.json +10 -0
  20. data/grammars/source.faust.json +119 -0
  21. data/grammars/source.gcode.json +166 -8
  22. data/grammars/source.hack.json +4 -18
  23. data/grammars/source.haskell.json +47 -0
  24. data/grammars/source.hlsl.json +9 -5
  25. data/grammars/source.hsig.json +47 -0
  26. data/grammars/source.hx.json +4 -0
  27. data/grammars/source.igor.json +44 -0
  28. data/grammars/source.julia.json +25 -21
  29. data/grammars/source.lean.json +19 -3
  30. data/grammars/source.lean.markdown.json +2598 -0
  31. data/grammars/source.matlab.json +215 -152
  32. data/grammars/source.mcfunction-snapshot.json +1 -1
  33. data/grammars/source.meson.json +1 -1
  34. data/grammars/source.mrc.json +416 -534
  35. data/grammars/source.nasl.json +155 -0
  36. data/grammars/source.nextflow.json +2 -2
  37. data/grammars/source.odin-ehr.json +806 -0
  38. data/grammars/source.odin.json +402 -0
  39. data/grammars/source.prisma.json +7 -0
  40. data/grammars/source.qasm.json +66 -0
  41. data/grammars/source.ql.json +1408 -0
  42. data/grammars/source.scala.json +27 -3
  43. data/grammars/source.sy.json +2088 -183
  44. data/grammars/source.terraform.json +576 -132
  45. data/grammars/source.tnsaudit.json +256 -0
  46. data/grammars/source.ts.json +89 -30
  47. data/grammars/source.tsx.json +89 -30
  48. data/grammars/source.v.json +541 -788
  49. data/grammars/source.viml.json +2 -2
  50. data/grammars/source.webassembly.json +10 -0
  51. data/grammars/source.wsd.json +775 -0
  52. data/grammars/text.tex.latex.haskell.json +47 -0
  53. data/grammars/version +1 -1
  54. data/lib/linguist/VERSION +1 -1
  55. data/lib/linguist/file_blob.rb +1 -1
  56. data/lib/linguist/generated.rb +23 -3
  57. data/lib/linguist/heuristics.yml +48 -3
  58. data/lib/linguist/languages.json +1 -1
  59. data/lib/linguist/languages.yml +156 -34
  60. data/lib/linguist/lazy_blob.rb +10 -10
  61. data/lib/linguist/linguist.bundle +0 -0
  62. data/lib/linguist/samples.json +7739 -2010
  63. data/lib/linguist/shebang.rb +5 -3
  64. data/lib/linguist/vendor.yml +3 -0
  65. metadata +13 -7
  66. data/grammars/source.LS.json +0 -85
  67. data/grammars/source.MCPOST.json +0 -54
  68. data/grammars/source.MOD.json +0 -55
  69. data/grammars/source.apt.json +0 -18
  70. data/grammars/source.yaml-ext.json +0 -324
@@ -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
+ }
@@ -50,6 +50,9 @@
50
50
  "patterns": [
51
51
  {
52
52
  "include": "#value"
53
+ },
54
+ {
55
+ "include": "#double_comment_inline"
53
56
  }
54
57
  ],
55
58
  "beginCaptures": {
@@ -139,6 +142,10 @@
139
142
  "begin": "//",
140
143
  "end": "$\\n?"
141
144
  },
145
+ "double_comment_inline": {
146
+ "name": "comment.prisma",
147
+ "match": "//[^\\n]*"
148
+ },
142
149
  "double_quoted_string": {
143
150
  "name": "unnamed",
144
151
  "begin": "\"",
@@ -0,0 +1,66 @@
1
+ {
2
+ "name": "QASM",
3
+ "scopeName": "source.qasm",
4
+ "patterns": [
5
+ {
6
+ "name": "comment.line.double-slash",
7
+ "match": "\\/\\/.*$"
8
+ },
9
+ {
10
+ "name": "comment.line.number-sign",
11
+ "match": "#.*$"
12
+ },
13
+ {
14
+ "name": "entity.name.function",
15
+ "match": "^(?x) # At beggining of line\n(\\.) # Valid function name\n(\n (?: [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n )+\n) # Followed by either:\n(?= $ # - End of the line\n | [\\s,.\\#)\\[:{\u003e+~|] # - Another selector\n | # # - A comment\n)"
16
+ },
17
+ {
18
+ "name": "entity.name.section",
19
+ "match": "(?x)\\b(include|OPENQASM|version)\\b"
20
+ },
21
+ {
22
+ "name": "variable.language",
23
+ "match": "(?x)\\b(qubit|qubits|map)\\b"
24
+ },
25
+ {
26
+ "name": "constant.other",
27
+ "match": "(?\u003c=(\\w\\[)|(:))( *\\d *)(?=(\\s*\\])|(:))"
28
+ },
29
+ {
30
+ "name": "keyword.storage.modifier",
31
+ "match": "-\u003e"
32
+ },
33
+ {
34
+ "name": "constant.string.single",
35
+ "match": "('.*')"
36
+ },
37
+ {
38
+ "name": "constant.string.double",
39
+ "match": "\".*\""
40
+ },
41
+ {
42
+ "name": "storage.type",
43
+ "match": "(?x)^\\b(?:(qreg|creg)| (gate|opaque))\\b"
44
+ },
45
+ {
46
+ "name": "support.function",
47
+ "match": "(?x)\\b(?:(prep_x|prep_y|prep_z|error_model)| (measure_x|measure_y|measure_z|measure_all|measure_parity|measure)| (display|display_binary))\\b"
48
+ },
49
+ {
50
+ "name": "keyword.control",
51
+ "match": "(?i)(?x)\\b(?:((i|h|x|y|z)| (rx|ry|rz)| (x90|y90|z90|rx90|ry90|rz90|mx90|my90|mz90)| (x180|y180|z180|rx180|ry180|rz180|mx180|my180|mz180)| (u1|u2|u3|cu1|cu2|cu3)| (s|sdag|t|tdag)| (cnot|cx|cz|cr|crk|toffoli|ccx|ccnot)| (swap) ))\\b"
52
+ },
53
+ {
54
+ "name": "keyword.control",
55
+ "match": "(?i)(?x)\\bc-(?:((i|h|x|y|z)| (rx|ry|rz)| (x90|y90|z90|rx90|ry90|rz90|mx90|my90|mz90)| (x180|y180|z180|rx180|ry180|rz180|mx180|my180|mz180)| (u1|u2|u3)| (s|sdag|t|tdag)| (cnot|cx|cz|cr|crk|toffoli|ccx|ccnot)| (swap) ))\\b"
56
+ },
57
+ {
58
+ "name": "keyword.control",
59
+ "match": "(?i)(?x)\\b(?:(not )|(if(?=[( ])))\\b"
60
+ },
61
+ {
62
+ "name": "variable.language",
63
+ "match": "\\b(depolarizing_channel|load_state|barrier)\\b"
64
+ }
65
+ ]
66
+ }