github-linguist 7.1.3 → 7.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +5 -5
  2. data/grammars/annotation.liquidhaskell.haskell.json +119 -4
  3. data/grammars/etc.json +148 -0
  4. data/grammars/hint.haskell.json +119 -4
  5. data/grammars/hint.message.haskell.json +119 -4
  6. data/grammars/hint.type.haskell.json +119 -4
  7. data/grammars/injections.etc.json +21 -0
  8. data/grammars/source.abap.json +2 -2
  9. data/grammars/source.ats.json +87 -17
  10. data/grammars/source.ballerina.json +236 -313
  11. data/grammars/source.batchfile.json +1 -1
  12. data/grammars/source.bdf.json +14 -8
  13. data/grammars/source.changelogs.rpm-spec.json +3 -3
  14. data/grammars/source.chapel.json +1 -1
  15. data/grammars/source.coffee.json +98 -0
  16. data/grammars/source.csound-document.json +26 -124
  17. data/grammars/source.curlrc.json +180 -0
  18. data/grammars/source.dart.json +5 -2
  19. data/grammars/source.elixir.json +20 -25
  20. data/grammars/source.emacs.lisp.json +23 -1
  21. data/grammars/source.gdb.json +1 -1
  22. data/grammars/source.gitattributes.json +111 -0
  23. data/grammars/source.gitconfig.json +450 -0
  24. data/grammars/source.gitignore.json +140 -0
  25. data/grammars/source.graphql.json +18 -0
  26. data/grammars/source.haproxy-config.json +10 -10
  27. data/grammars/source.haskell.json +119 -4
  28. data/grammars/source.hgignore.json +34 -0
  29. data/grammars/source.hsig.json +119 -4
  30. data/grammars/source.hx.json +2 -2
  31. data/grammars/source.jison.json +1 -1
  32. data/grammars/source.ltspice.symbol.json +294 -0
  33. data/grammars/source.m4.json +187 -0
  34. data/grammars/source.man-conf.json +141 -0
  35. data/grammars/source.nanorc.json +330 -0
  36. data/grammars/source.nim.comment.json +82 -0
  37. data/grammars/source.nim.json +1 -57
  38. data/grammars/source.nix.json +2 -2
  39. data/grammars/source.opts.json +98 -0
  40. data/grammars/source.reason.json +13 -0
  41. data/grammars/source.rust.json +35 -0
  42. data/grammars/source.terraform.json +4 -1
  43. data/grammars/source.ts.json +307 -39
  44. data/grammars/source.tsx.json +290 -37
  45. data/grammars/source.zig.json +286 -0
  46. data/grammars/text.html.basic.json +1 -1
  47. data/grammars/text.marko.json +61 -9
  48. data/grammars/text.tex.latex.haskell.json +119 -4
  49. data/grammars/text.zone_file.json +2 -2
  50. data/grammars/version +1 -1
  51. data/lib/linguist/VERSION +1 -1
  52. data/lib/linguist/generated.rb +0 -8
  53. data/lib/linguist/heuristics.yml +30 -3
  54. data/lib/linguist/languages.json +1 -1
  55. data/lib/linguist/languages.yml +143 -3
  56. data/lib/linguist/samples.json +4494 -646
  57. data/lib/linguist/vendor.yml +1 -2
  58. metadata +31 -4
  59. data/grammars/source.solidity.json +0 -189
@@ -0,0 +1,286 @@
1
+ {
2
+ "name": "Zig",
3
+ "scopeName": "source.zig",
4
+ "patterns": [
5
+ {
6
+ "include": "#storage"
7
+ },
8
+ {
9
+ "include": "#support"
10
+ },
11
+ {
12
+ "include": "#structure"
13
+ },
14
+ {
15
+ "include": "#statement"
16
+ },
17
+ {
18
+ "include": "#async-control"
19
+ },
20
+ {
21
+ "include": "#conditional"
22
+ },
23
+ {
24
+ "include": "#repeat"
25
+ },
26
+ {
27
+ "include": "#constant"
28
+ },
29
+ {
30
+ "include": "#keyword"
31
+ },
32
+ {
33
+ "include": "#type"
34
+ },
35
+ {
36
+ "include": "#type-int"
37
+ },
38
+ {
39
+ "include": "#type-c"
40
+ },
41
+ {
42
+ "include": "#boolean"
43
+ },
44
+ {
45
+ "include": "#operator"
46
+ },
47
+ {
48
+ "include": "#dec-float-number"
49
+ },
50
+ {
51
+ "include": "#hex-float-number"
52
+ },
53
+ {
54
+ "include": "#dec-number"
55
+ },
56
+ {
57
+ "include": "#hex-number"
58
+ },
59
+ {
60
+ "include": "#oct-number"
61
+ },
62
+ {
63
+ "include": "#bin-number"
64
+ },
65
+ {
66
+ "include": "#character"
67
+ },
68
+ {
69
+ "include": "#operators"
70
+ },
71
+ {
72
+ "include": "#comment-line"
73
+ },
74
+ {
75
+ "include": "#comment-line-doc"
76
+ },
77
+ {
78
+ "include": "#strings"
79
+ },
80
+ {
81
+ "include": "#multiline-strings"
82
+ },
83
+ {
84
+ "include": "#escaped_char"
85
+ }
86
+ ],
87
+ "repository": {
88
+ "async-control": {
89
+ "name": "keyword.control.async.zig",
90
+ "match": "\\b(async|await|suspend|resume|cancel)\\b"
91
+ },
92
+ "bin-number": {
93
+ "name": "constant.numeric.bin.zig",
94
+ "match": "0b[01]+"
95
+ },
96
+ "boolean": {
97
+ "name": "constant.language.zig",
98
+ "match": "\\b(true|false)\\b"
99
+ },
100
+ "character": {
101
+ "name": "string.quoted.double.zig",
102
+ "begin": "(\\')",
103
+ "end": "\\'",
104
+ "patterns": [
105
+ {
106
+ "include": "#escaped_char"
107
+ },
108
+ {
109
+ "name": "invalid.illegal.character.zig",
110
+ "match": "(\\\\[^\\'][^\\']*?)"
111
+ }
112
+ ]
113
+ },
114
+ "comment-line": {
115
+ "name": "comment.line.zig",
116
+ "begin": "//[^/]",
117
+ "end": "$\\n?",
118
+ "patterns": [
119
+ {
120
+ "include": "#todo"
121
+ }
122
+ ]
123
+ },
124
+ "comment-line-doc": {
125
+ "name": "comment.line.documentation.zig",
126
+ "begin": "///",
127
+ "end": "$\\n?"
128
+ },
129
+ "conditional": {
130
+ "name": "keyword.control.conditional.zig",
131
+ "match": "\\b(if|else|switch|and|or|try|catch|orelse)\\b"
132
+ },
133
+ "constant": {
134
+ "name": "constant.language.zig",
135
+ "match": "\\b(null|undefined)\\b"
136
+ },
137
+ "dec-float-number": {
138
+ "name": "constant.numeric.float.zig",
139
+ "match": "\\b-?[0-9]+(\\.[0-9]+)?([eE][+-]?[0-9]+)?\\b"
140
+ },
141
+ "dec-number": {
142
+ "name": "constant.numeric.integer.zig",
143
+ "match": "\\b-?[0-9]+\\b"
144
+ },
145
+ "escaped_char": {
146
+ "patterns": [
147
+ {
148
+ "name": "string.quoted.escape.newline.zig",
149
+ "match": "\\\\n"
150
+ },
151
+ {
152
+ "name": "string.quoted.escape.carrigereturn.zig",
153
+ "match": "\\\\r"
154
+ },
155
+ {
156
+ "name": "string.quoted.escape.tabulator.zig",
157
+ "match": "\\\\t"
158
+ },
159
+ {
160
+ "name": "string.quoted.escape.backslash.zig",
161
+ "match": "\\\\\\\\"
162
+ },
163
+ {
164
+ "name": "string.quoted.escape.single-quote.zig",
165
+ "match": "\\\\'"
166
+ },
167
+ {
168
+ "name": "string.quoted.escape.double-quote.zig",
169
+ "match": "\\\\\\\""
170
+ },
171
+ {
172
+ "name": "string.quoted.escape.hexidecimal.zig",
173
+ "match": "\\\\x[a-fA-F0-9]{2}"
174
+ },
175
+ {
176
+ "name": "string.quoted.escape.hexidecimal.zig",
177
+ "match": "\\\\u[a-fA-F0-9]{4}"
178
+ },
179
+ {
180
+ "name": "string.quoted.escape.hexidecimal.zig",
181
+ "match": "\\\\U[a-fA-F0-9]{6}"
182
+ }
183
+ ]
184
+ },
185
+ "hex-float-number": {
186
+ "name": "constant.numeric.float.hex.zig",
187
+ "match": "\\b0x[a-fA-F0-9]+(\\.[a-fA-F0-9]+)?([pP][+-]?[0-9]+)?\\b"
188
+ },
189
+ "hex-number": {
190
+ "name": "constant.numeric.hex.zig",
191
+ "match": "\\b0x[a-fA-F0-9]+\\b"
192
+ },
193
+ "keyword": {
194
+ "name": "support.function.zig",
195
+ "match": "(?\u003c!\\w)(fn|use|test|@[^\\\"\\d][a-zA-Z_]\\w*)\\b"
196
+ },
197
+ "multiline-strings": {
198
+ "name": "string.quoted.other.zig",
199
+ "begin": "c?\\\\\\\\",
200
+ "end": "$\\n?",
201
+ "patterns": [
202
+ {
203
+ "include": "#escaped_char"
204
+ },
205
+ {
206
+ "name": "invalid.illegal.character.zig",
207
+ "match": "(\\\\[^\\'][^\\']*?)"
208
+ }
209
+ ]
210
+ },
211
+ "oct-number": {
212
+ "name": "constant.numeric.octal.zig",
213
+ "match": "\\b0o[0-7]+\\b"
214
+ },
215
+ "operator": {
216
+ "patterns": [
217
+ {
218
+ "name": "keyword.operator.zig",
219
+ "match": "(==|!=)"
220
+ },
221
+ {
222
+ "name": "keyword.operator.word.zig",
223
+ "match": "\\b(and|or)\\b"
224
+ },
225
+ {
226
+ "name": "keyword.operator.arithmetic.zig",
227
+ "match": "(\\-\\%?|\\+%?|\\*%?|/[^/]|%)=?"
228
+ },
229
+ {
230
+ "name": "keyword.operator.bitwise.zig",
231
+ "match": "(\\\u003c\\\u003c%?|\u003e\u003e|!|\u0026|\\^|\\|)=?"
232
+ },
233
+ {
234
+ "name": "keyword.operator.special.zig",
235
+ "match": "(==|\\+\\+|\\*\\*)"
236
+ }
237
+ ]
238
+ },
239
+ "repeat": {
240
+ "name": "keyword.control.zig",
241
+ "match": "\\b(while|for)\\b"
242
+ },
243
+ "statement": {
244
+ "name": "keyword.control.zig",
245
+ "match": "\\b(break|return|continue|asm|defer|errdefer|unreachable)\\b"
246
+ },
247
+ "storage": {
248
+ "name": "storage.zig",
249
+ "match": "\\b(const|var|extern|packed|export|pub|noalias|inline|comptime|nakedcc|stdcallcc|volatile|align|linksection)\\b"
250
+ },
251
+ "strings": {
252
+ "name": "string.quoted.double.zig",
253
+ "begin": "(c\\\"|\\\")",
254
+ "end": "\\\"",
255
+ "patterns": [
256
+ {
257
+ "include": "#escaped_char"
258
+ },
259
+ {
260
+ "name": "invalid.illegal.character.zig",
261
+ "match": "(\\\\[^\\'][^\\']*?)"
262
+ }
263
+ ]
264
+ },
265
+ "structure": {
266
+ "name": "storage.type.zig",
267
+ "match": "\\b(union|struct|enum|error)\\b"
268
+ },
269
+ "todo": {
270
+ "name": "comment.line.todo.zig",
271
+ "match": "TODO"
272
+ },
273
+ "type": {
274
+ "name": "storage.type.zig",
275
+ "match": "\\b(bool|f16|f32|f64|f128|comptime_float|void|noreturn|type|anyerror|promise)\\b"
276
+ },
277
+ "type-c": {
278
+ "name": "storage.type.zig.c_compat",
279
+ "match": "\\b(c_short|c_ushort|c_int|c_uint|c_long|c_ulong|c_longlong|c_ulonglong|c_longdouble|c_void)\\b"
280
+ },
281
+ "type-int": {
282
+ "name": "storage.type.zig.integer",
283
+ "match": "\\b([iu][1-9]\\d*|i0|u0|isize|usize|comptime_int)\\b"
284
+ }
285
+ }
286
+ }
@@ -306,7 +306,7 @@
306
306
  }
307
307
  },
308
308
  {
309
- "include": "source.coffee"
309
+ "include": "source.graphql"
310
310
  }
311
311
  ]
312
312
  }
@@ -1204,9 +1204,12 @@
1204
1204
  ]
1205
1205
  },
1206
1206
  "tag-name-concise": {
1207
- "begin": "^\\s*(([a-zA-Z0-9_-]+)([.#][a-zA-Z0-9_.#-]*)?)(?=(\\s+(?![=])|$|\\())",
1207
+ "begin": "^\\s*(([a-zA-Z0-9_-]+)([.#][a-zA-Z0-9_.#-]*)?)(?=(\\s+(?![=])|$|\\(|\\|))",
1208
1208
  "end": "(?=\\n)",
1209
1209
  "patterns": [
1210
+ {
1211
+ "include": "#tag-params"
1212
+ },
1210
1213
  {
1211
1214
  "include": "#html-line-block-concise"
1212
1215
  },
@@ -1228,9 +1231,12 @@
1228
1231
  "applyEndPatternLast": true
1229
1232
  },
1230
1233
  "tag-name-custom-concise": {
1231
- "begin": "^\\s*(for|if|unless|while|else-if|else|var|assign|macro|invoke|include|await|[a-zA-Z0-9_]+([:])[a-zA-Z0-9_:-]*|[@][a-zA-Z0-9_-]+)(?=(\\s+(?![=])|$|[(]))",
1234
+ "begin": "^\\s*(for|if|unless|while|else-if|else|var|assign|macro|invoke|include|await|[a-zA-Z0-9_]+([:])[a-zA-Z0-9_:-]*|[@][a-zA-Z0-9_-]+)(?=(\\s+(?![=])|$|[(]|\\|))",
1232
1235
  "end": "(?=\\n)",
1233
1236
  "patterns": [
1237
+ {
1238
+ "include": "#tag-params"
1239
+ },
1234
1240
  {
1235
1241
  "include": "#html-line-concise"
1236
1242
  },
@@ -1246,9 +1252,12 @@
1246
1252
  "applyEndPatternLast": true
1247
1253
  },
1248
1254
  "tag-name-custom-html": {
1249
- "begin": "(\u003c)(for|if|unless|while|else-if|else|var|assign|macro|invoke|include|await|[a-zA-Z0-9_]+[:][a-zA-Z0-9\\-_:]*|[@][a-zA-Z0-9_-]+)(?=(\u003e|/\u003e|\\s|\\())",
1255
+ "begin": "(\u003c)(for|if|unless|while|else-if|else|var|assign|macro|invoke|include|await|[a-zA-Z0-9_]+[:][a-zA-Z0-9\\-_:]*|[@][a-zA-Z0-9_-]+)(?=(\u003e|/\u003e|\\s|\\(|\\|))",
1250
1256
  "end": "(\u003c/)(\\2)?(\u003e)|(/\u003e)",
1251
1257
  "patterns": [
1258
+ {
1259
+ "include": "#tag-params"
1260
+ },
1252
1261
  {
1253
1262
  "include": "#attr-stuff-html"
1254
1263
  },
@@ -1286,6 +1295,9 @@
1286
1295
  {
1287
1296
  "include": "#placeholder"
1288
1297
  },
1298
+ {
1299
+ "include": "#tag-params"
1300
+ },
1289
1301
  {
1290
1302
  "include": "#html-line-concise"
1291
1303
  },
@@ -1302,6 +1314,9 @@
1302
1314
  {
1303
1315
  "include": "#placeholder"
1304
1316
  },
1317
+ {
1318
+ "include": "#tag-params"
1319
+ },
1305
1320
  {
1306
1321
  "include": "#attr-stuff-html"
1307
1322
  },
@@ -1330,9 +1345,12 @@
1330
1345
  }
1331
1346
  },
1332
1347
  "tag-name-html": {
1333
- "begin": "(\u003c)([a-zA-Z0-9-]+)(?=(\u003e|/\u003e|\\s|\\())",
1348
+ "begin": "(\u003c)([a-zA-Z0-9-]+)(?=(\u003e|/\u003e|\\s|\\(|\\|))",
1334
1349
  "end": "(\u003c/)(\\2)?(\u003e)|(/\u003e)",
1335
1350
  "patterns": [
1351
+ {
1352
+ "include": "#tag-params"
1353
+ },
1336
1354
  {
1337
1355
  "include": "#attr-stuff-html"
1338
1356
  },
@@ -1364,9 +1382,12 @@
1364
1382
  }
1365
1383
  },
1366
1384
  "tag-name-open-tag-only-html": {
1367
- "begin": "(\u003c)(base|br|col|hr|embed|img|input|keygen|link|meta|param|source|track|wbr|lasso-img)(?=(\u003e|/\u003e|\\s|\\())",
1385
+ "begin": "(\u003c)(base|br|col|hr|embed|img|input|keygen|link|meta|param|source|track|wbr|lasso-img)(?=(\u003e|/\u003e|\\s|\\(|\\|))",
1368
1386
  "end": "(\u003e|/\u003e)",
1369
1387
  "patterns": [
1388
+ {
1389
+ "include": "#tag-params"
1390
+ },
1370
1391
  {
1371
1392
  "include": "#attr-stuff-html"
1372
1393
  }
@@ -1386,9 +1407,12 @@
1386
1407
  }
1387
1408
  },
1388
1409
  "tag-name-script-html": {
1389
- "begin": "(\u003c)(script)(?=(\u003e|/\u003e|\\s|\\())",
1410
+ "begin": "(\u003c)(script)(?=(\u003e|/\u003e|\\s|\\(|\\|))",
1390
1411
  "end": "(\u003c/)(script)?(\u003e)|/\u003e",
1391
1412
  "patterns": [
1413
+ {
1414
+ "include": "#tag-params"
1415
+ },
1392
1416
  {
1393
1417
  "include": "#attr-stuff-html"
1394
1418
  },
@@ -1420,9 +1444,12 @@
1420
1444
  }
1421
1445
  },
1422
1446
  "tag-name-shorthand-html": {
1423
- "begin": "(\u003c)(([a-zA-Z0-9_-]+)([#.][a-zA-Z0-9_#.:-]+))(?=(\u003e|/\u003e|\\s+(?![=])|\\())",
1447
+ "begin": "(\u003c)(([a-zA-Z0-9_-]+)([#.][a-zA-Z0-9_#.:-]+))(?=(\u003e|/\u003e|\\s+(?![=])|\\(|\\|))",
1424
1448
  "end": "(\u003c/)((\\3)(\\4)?)?(\u003e)|(/\u003e)",
1425
1449
  "patterns": [
1450
+ {
1451
+ "include": "#tag-params"
1452
+ },
1426
1453
  {
1427
1454
  "include": "#attr-stuff-html"
1428
1455
  },
@@ -1460,9 +1487,12 @@
1460
1487
  }
1461
1488
  },
1462
1489
  "tag-name-shorthand-no-tag-name-html": {
1463
- "begin": "(\u003c)([#.][a-zA-Z0-9_#.:-]+)(?=(\u003e|/\u003e|\\s|\\())",
1490
+ "begin": "(\u003c)([#.][a-zA-Z0-9_#.:-]+)(?=(\u003e|/\u003e|\\s|\\(|\\|))",
1464
1491
  "end": "(\u003c/)(\\2|div)(\u003e)|(/\u003e)",
1465
1492
  "patterns": [
1493
+ {
1494
+ "include": "#tag-params"
1495
+ },
1466
1496
  {
1467
1497
  "include": "#attr-stuff-html"
1468
1498
  },
@@ -1494,9 +1524,12 @@
1494
1524
  }
1495
1525
  },
1496
1526
  "tag-name-style-html": {
1497
- "begin": "(\u003c)(style)(?=(\u003e|/\u003e|\\s|\\())",
1527
+ "begin": "(\u003c)(style)(?=(\u003e|/\u003e|\\s|\\(|\\|))",
1498
1528
  "end": "(\u003c/)(style)?(\u003e)|(/\u003e)",
1499
1529
  "patterns": [
1530
+ {
1531
+ "include": "#tag-params"
1532
+ },
1500
1533
  {
1501
1534
  "include": "#attr-stuff-html"
1502
1535
  },
@@ -1527,6 +1560,25 @@
1527
1560
  }
1528
1561
  }
1529
1562
  },
1563
+ "tag-params": {
1564
+ "begin": "\\|",
1565
+ "end": "\\|",
1566
+ "patterns": [
1567
+ {
1568
+ "include": "#expression"
1569
+ }
1570
+ ],
1571
+ "beginCaptures": {
1572
+ "0": {
1573
+ "name": "meta.pipe.js"
1574
+ }
1575
+ },
1576
+ "endCaptures": {
1577
+ "0": {
1578
+ "name": "meta.pipe.js"
1579
+ }
1580
+ }
1581
+ },
1530
1582
  "tag-script-body-block": {
1531
1583
  "begin": "(\\s*-[-]+)",
1532
1584
  "end": "(\\1)[.]*$",