github-linguist 7.4.0 → 7.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +5 -5
  2. data/grammars/annotation.liquidhaskell.haskell.json +15 -4
  3. data/grammars/hint.haskell.json +15 -4
  4. data/grammars/hint.message.haskell.json +15 -4
  5. data/grammars/hint.type.haskell.json +15 -4
  6. data/grammars/source.abap.json +14 -3
  7. data/grammars/source.apl.json +19 -2
  8. data/grammars/source.ats.json +17 -87
  9. data/grammars/source.ballerina.json +14 -19
  10. data/grammars/source.crystal.json +14 -2
  11. data/grammars/source.csound.json +37 -0
  12. data/grammars/source.css.json +25 -1
  13. data/grammars/source.css.scss.json +1724 -0
  14. data/grammars/source.gf.json +51 -0
  15. data/grammars/source.glsl.json +1 -1
  16. data/grammars/source.hack.json +2523 -0
  17. data/grammars/source.haskell.json +15 -4
  18. data/grammars/source.hc.json +709 -0
  19. data/grammars/source.hsig.json +15 -4
  20. data/grammars/source.hx.json +10 -6
  21. data/grammars/source.jolie.json +1 -1
  22. data/grammars/source.julia.json +114 -6
  23. data/grammars/source.m68k.json +412 -0
  24. data/grammars/source.mcfunction.json +62 -18
  25. data/grammars/source.objectscript.json +309 -0
  26. data/grammars/source.objectscript_class.json +674 -0
  27. data/grammars/source.objectscript_csp.json +19 -0
  28. data/grammars/source.objectscript_macros.json +226 -0
  29. data/grammars/source.powershell.json +21 -57
  30. data/grammars/source.rust.json +1 -1
  31. data/grammars/source.sass.json +836 -142
  32. data/grammars/source.sassdoc.json +346 -0
  33. data/grammars/source.scala.json +110 -10
  34. data/grammars/source.sqf.json +2 -1
  35. data/grammars/source.svelte.json +827 -0
  36. data/grammars/source.ts.json +8 -4
  37. data/grammars/source.tsql.json +507 -0
  38. data/grammars/source.tsx.json +8 -4
  39. data/grammars/source.viml.json +1 -1
  40. data/grammars/source.vtt.json +702 -0
  41. data/grammars/source.wollok.json +100 -0
  42. data/grammars/source.xojo.json +85 -0
  43. data/grammars/source.yara.json +3 -2
  44. data/grammars/source.zeek.json +412 -0
  45. data/grammars/source.zenscript.json +282 -0
  46. data/grammars/source.zig.json +2 -11
  47. data/grammars/text.haml.json +1 -1
  48. data/grammars/text.html.php.blade.json +3 -3
  49. data/grammars/text.html.vue.json +41 -1
  50. data/grammars/text.slim.json +1 -1
  51. data/grammars/text.tex.latex.haskell.json +15 -4
  52. data/grammars/version +1 -1
  53. data/lib/linguist/VERSION +1 -1
  54. data/lib/linguist/blob_helper.rb +5 -10
  55. data/lib/linguist/generated.rb +10 -2
  56. data/lib/linguist/heuristics.yml +14 -3
  57. data/lib/linguist/language.rb +3 -2
  58. data/lib/linguist/languages.json +1 -1
  59. data/lib/linguist/languages.yml +151 -16
  60. data/lib/linguist/samples.json +9844 -1711
  61. data/lib/linguist/samples.rb +8 -5
  62. data/lib/linguist/shebang.rb +6 -0
  63. data/lib/linguist/vendor.yml +3 -0
  64. metadata +25 -10
  65. data/grammars/source.bro.json +0 -403
  66. data/grammars/source.scss.json +0 -1287
@@ -0,0 +1,282 @@
1
+ {
2
+ "name": "ZenScript",
3
+ "scopeName": "source.zenscript",
4
+ "patterns": [
5
+ {
6
+ "name": "constant.numeric.zenscript",
7
+ "match": "\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)([LlFfUuDd]|UL|ul)?\\b"
8
+ },
9
+ {
10
+ "include": "#code"
11
+ },
12
+ {
13
+ "name": "storage.type.object.array.zenscript",
14
+ "match": "\\b((?:[a-z]\\w*\\.)*[A-Z]+\\w*)(?=\\[)"
15
+ }
16
+ ],
17
+ "repository": {
18
+ "brackets": {
19
+ "patterns": [
20
+ {
21
+ "name": "keyword.other.zenscript",
22
+ "match": "(\u003c)\\b(.*?)(:(.*?(:(\\*|\\d+)?)?)?)(\u003e)",
23
+ "captures": {
24
+ "1": {
25
+ "name": "keyword.control.zenscript"
26
+ },
27
+ "2": {
28
+ "name": "keyword.other.zenscript"
29
+ },
30
+ "3": {
31
+ "name": "keyword.control.zenscript"
32
+ },
33
+ "4": {
34
+ "name": "variable.other.zenscript"
35
+ },
36
+ "5": {
37
+ "name": "keyword.control.zenscript"
38
+ },
39
+ "6": {
40
+ "name": "constant.numeric.zenscript"
41
+ },
42
+ "7": {
43
+ "name": "keyword.control.zenscript"
44
+ }
45
+ }
46
+ }
47
+ ]
48
+ },
49
+ "class": {
50
+ "name": "meta.class.zenscript",
51
+ "match": "(zenClass)\\s+(\\w+)",
52
+ "captures": {
53
+ "1": {
54
+ "name": "storage.type.zenscript"
55
+ },
56
+ "2": {
57
+ "name": "entity.name.type.class.zenscript"
58
+ }
59
+ }
60
+ },
61
+ "class-constructor": {
62
+ "name": "meta.class.zenscript",
63
+ "match": "\\b(zenConstructor)\\s*(?=\\()",
64
+ "captures": {
65
+ "1": {
66
+ "name": "entity.name.function.zenscript"
67
+ }
68
+ }
69
+ },
70
+ "code": {
71
+ "patterns": [
72
+ {
73
+ "include": "#class"
74
+ },
75
+ {
76
+ "include": "#class-constructor"
77
+ },
78
+ {
79
+ "include": "#functions"
80
+ },
81
+ {
82
+ "include": "#function-call"
83
+ },
84
+ {
85
+ "include": "#dots"
86
+ },
87
+ {
88
+ "include": "#quotes"
89
+ },
90
+ {
91
+ "include": "#brackets"
92
+ },
93
+ {
94
+ "include": "#preprocessors"
95
+ },
96
+ {
97
+ "include": "#comments"
98
+ },
99
+ {
100
+ "include": "#var"
101
+ },
102
+ {
103
+ "include": "#import"
104
+ },
105
+ {
106
+ "include": "#keywords"
107
+ },
108
+ {
109
+ "include": "#constants"
110
+ },
111
+ {
112
+ "include": "#operators"
113
+ }
114
+ ]
115
+ },
116
+ "comments": {
117
+ "patterns": [
118
+ {
119
+ "name": "comment.line.number-sign",
120
+ "match": "\\s*((#|//).*$\\n?)"
121
+ },
122
+ {
123
+ "name": "comment.block",
124
+ "begin": "\\/\\*",
125
+ "end": "\\*\\/",
126
+ "beginCaptures": {
127
+ "0": {
128
+ "name": "comment.block"
129
+ }
130
+ },
131
+ "endCaptures": {
132
+ "0": {
133
+ "name": "comment.block"
134
+ }
135
+ }
136
+ }
137
+ ]
138
+ },
139
+ "constants": {
140
+ "name": "constant.language.zenscript",
141
+ "match": "\\b(true|false|null)\\b"
142
+ },
143
+ "dots": {
144
+ "name": "plain.text.zenscript",
145
+ "match": "\\b(\\w+)(\\.)(\\w+)((\\.)(\\w+))*",
146
+ "captures": {
147
+ "1": {
148
+ "name": "storage.type.zenscript"
149
+ },
150
+ "2": {
151
+ "name": "keyword.control.zenscript"
152
+ },
153
+ "5": {
154
+ "name": "keyword.control.zenscript"
155
+ }
156
+ }
157
+ },
158
+ "function-call": {
159
+ "name": "meta.function-call.zenscript",
160
+ "match": "(?!function)([A-Za-z_$][\\w$]*)\\s*(?=\\()",
161
+ "captures": {
162
+ "1": {
163
+ "name": "entity.name.function.zenscript"
164
+ }
165
+ }
166
+ },
167
+ "functions": {
168
+ "name": "meta.function.zenscript",
169
+ "match": "function\\s+([A-Za-z_$][\\w$]*)\\s*(?=\\()",
170
+ "captures": {
171
+ "0": {
172
+ "name": "storage.type.function.zenscript"
173
+ },
174
+ "1": {
175
+ "name": "entity.name.function.zenscript"
176
+ }
177
+ }
178
+ },
179
+ "import": {
180
+ "name": "meta.import.zenscript",
181
+ "begin": "\\b(import)\\b\\s*",
182
+ "end": "\\s*(;)",
183
+ "beginCaptures": {
184
+ "1": {
185
+ "name": "keyword.other.import.zenscript"
186
+ }
187
+ },
188
+ "endCaptures": {
189
+ "1": {
190
+ "name": "punctuation.terminator.zenscript"
191
+ }
192
+ }
193
+ },
194
+ "keywords": {
195
+ "patterns": [
196
+ {
197
+ "name": "keyword.control.zenscript",
198
+ "match": "\\b(in|has|void|as|version|for|return|while|break|instanceof)\\b"
199
+ },
200
+ {
201
+ "name": "storage.type.zenscript",
202
+ "match": "\\b(any|bool|byte|short|int|long|float|double|string)\\b"
203
+ },
204
+ {
205
+ "name": "storage.type.zenscript",
206
+ "match": "\\b(?\u003c=(as\\s))[a-zA-Z]+\\b"
207
+ },
208
+ {
209
+ "name": "storage.type.function.zenscript",
210
+ "match": "\\b(function)\\b"
211
+ },
212
+ {
213
+ "name": "keyword.control.conditional.zenscript",
214
+ "match": "\\b(if|else)\\b"
215
+ }
216
+ ]
217
+ },
218
+ "operators": {
219
+ "patterns": [
220
+ {
221
+ "name": "keyword.operator",
222
+ "match": "(\\.\\.|\\+=|\\+|-=|-|\\*=|\\*|\\/=|\\/|%=|%|\\|=|\\||\\|\\||\u0026=|\u0026\u0026|\u0026|\\^=|\\^|\\?|:|~=|~|;|\u003c=|\u003c|\u003e=|\u003e|==|=|!=|!|\\$)"
223
+ }
224
+ ]
225
+ },
226
+ "preprocessors": {
227
+ "name": "constant.numeric.zenscript",
228
+ "match": "^(\\s*)(#)(debug|ignoreBracketErrors|norun|loader|priority|ikwid|profile|zslint|modloaded)\\b",
229
+ "captures": {
230
+ "1": {
231
+ "name": "keyword.control.zenscript"
232
+ },
233
+ "2": {
234
+ "name": "keyword.control.zenscript"
235
+ },
236
+ "3": {
237
+ "name": "variable.language.zenscript"
238
+ }
239
+ }
240
+ },
241
+ "quotes": {
242
+ "patterns": [
243
+ {
244
+ "name": "string.quoted.double.zenscript",
245
+ "contentName": "string.other.zenscript",
246
+ "begin": "\\\"",
247
+ "end": "\\\"",
248
+ "beginCaptures": {
249
+ "0": {
250
+ "name": "punctuation.definition.string.begin"
251
+ }
252
+ },
253
+ "endCaptures": {
254
+ "0": {
255
+ "name": "punctuation.definition.string.end"
256
+ }
257
+ }
258
+ },
259
+ {
260
+ "name": "string.quoted.single.zenscript",
261
+ "contentName": "string.other.zenscript",
262
+ "begin": "\\'",
263
+ "end": "\\'",
264
+ "beginCaptures": {
265
+ "0": {
266
+ "name": "punctuation.definition.string.begin"
267
+ }
268
+ },
269
+ "endCaptures": {
270
+ "0": {
271
+ "name": "punctuation.definition.string.end"
272
+ }
273
+ }
274
+ }
275
+ ]
276
+ },
277
+ "var": {
278
+ "name": "storage.type",
279
+ "match": "\\b(var|val|static|global)\\b"
280
+ }
281
+ }
282
+ }
@@ -197,16 +197,7 @@
197
197
  "multiline-strings": {
198
198
  "name": "string.quoted.other.zig",
199
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
- ]
200
+ "end": "$\\n?"
210
201
  },
211
202
  "oct-number": {
212
203
  "name": "constant.numeric.octal.zig",
@@ -246,7 +237,7 @@
246
237
  },
247
238
  "storage": {
248
239
  "name": "storage.zig",
249
- "match": "\\b(const|var|extern|packed|export|pub|noalias|inline|comptime|nakedcc|stdcallcc|volatile|align|linksection|threadlocal)\\b"
240
+ "match": "\\b(const|var|extern|packed|export|pub|noalias|inline|comptime|nakedcc|stdcallcc|volatile|align|linksection|threadlocal|allowzero)\\b"
250
241
  },
251
242
  "strings": {
252
243
  "name": "string.quoted.double.zig",
@@ -321,7 +321,7 @@
321
321
  "end": "^(?!\\1\\s+|\\n)",
322
322
  "patterns": [
323
323
  {
324
- "include": "source.scss"
324
+ "include": "source.css.scss"
325
325
  }
326
326
  ],
327
327
  "captures": {
@@ -3580,7 +3580,7 @@
3580
3580
  {
3581
3581
  "name": "meta.directive.blade",
3582
3582
  "contentName": "source.php",
3583
- "begin": "(?x)\n(?\u003c![A-Za-z0-9_@]) # Prepended @ or literal character escapes the sequence\n(\n @\n (?i: # Ordering not important as we everything will be matched up to opening parentheses\n auth\n |break\n |can\n |canany\n |cannot\n |case\n |choice\n |component\n |continue\n |dd\n |dump\n |each\n |elseauth\n |elsecan\n |elsecanany\n |elsecannot\n |elseguest\n |elseif\n |empty\n |extends\n |for\n |foreach\n |forelse\n |guest\n |hassection\n |if\n |include\n |includefirst\n |includeif\n |includewhen\n |inject\n |isset\n |json\n |lang\n |method\n |php\n |prepend\n |push\n |section\n |slot\n |stack\n |switch\n |unless\n |unset\n |while\n |yield\n )\n [\\t ]* # Whitespace between name and parentheses\n)\n(\\() # Followed by opening parentheses",
3583
+ "begin": "(?x)\n(?\u003c![A-Za-z0-9_@]) # Prepended @ or literal character escapes the sequence\n(\n @\n (?i: # Ordering not important as we everything will be matched up to opening parentheses\n auth\n |break\n |can\n |canany\n |cannot\n |case\n |choice\n |component\n |continue\n |dd\n |dump\n |each\n |elseauth\n |elsecan\n |elsecanany\n |elsecannot\n |elseguest\n |elseif\n |empty\n |error\n |extends\n |for\n |foreach\n |forelse\n |guest\n |hassection\n |if\n |include\n |includefirst\n |includeif\n |includewhen\n |inject\n |isset\n |json\n |lang\n |method\n |php\n |prepend\n |push\n |section\n |slot\n |stack\n |switch\n |unless\n |unset\n |while\n |yield\n )\n [\\t ]* # Whitespace between name and parentheses\n)\n(\\() # Followed by opening parentheses",
3584
3584
  "end": "\\)",
3585
3585
  "patterns": [
3586
3586
  {
@@ -3604,7 +3604,7 @@
3604
3604
  {
3605
3605
  "name": "meta.directive.blade",
3606
3606
  "contentName": "comment.blade",
3607
- "begin": "(?x)\n(?\u003c![A-Za-z0-9_@]) # Prepended @ or literal character escapes the sequence\n(\n @\n (?i: # Ordering not important as we everything will be matched up to opening parentheses\n append\n |csrf\n |default\n |else\n |endauth\n |endcan\n |endcanany\n |endcannot\n |endcomponent\n |endempty\n |endfor\n |endforeach\n |endforelse\n |endguest\n |endif\n |endisset\n |endlang\n |endprepend\n |endpush\n |endsection\n |endslot\n |endswitch\n |endunless\n |endwhile\n |overwrite\n |parent\n |show\n |stop\n )\n [\\t ]* # Whitespace between name and parentheses\n)\n(\\() # Followed by opening parentheses",
3607
+ "begin": "(?x)\n(?\u003c![A-Za-z0-9_@]) # Prepended @ or literal character escapes the sequence\n(\n @\n (?i: # Ordering not important as we everything will be matched up to opening parentheses\n append\n |csrf\n |default\n |else\n |endauth\n |endcan\n |endcanany\n |endcannot\n |endcomponent\n |endempty\n |enderror\n |endfor\n |endforeach\n |endforelse\n |endguest\n |endif\n |endisset\n |endlang\n |endprepend\n |endpush\n |endsection\n |endslot\n |endswitch\n |endunless\n |endwhile\n |overwrite\n |parent\n |show\n |stop\n )\n [\\t ]* # Whitespace between name and parentheses\n)\n(\\() # Followed by opening parentheses",
3608
3608
  "end": "\\)",
3609
3609
  "patterns": [
3610
3610
  {
@@ -3627,7 +3627,7 @@
3627
3627
  },
3628
3628
  {
3629
3629
  "name": "keyword.blade",
3630
- "match": "(?x)\n(?\u003c![A-Za-z0-9_@]) # Prepended @ or literal character escapes the sequence\n@\n(?: # Ordering not important as we everything will be matched up to word boundary\n (?i)append\n|(?i)auth\n|(?i)break\n|(?i)continue\n|(?i)csrf\n|(?i)default\n|(?i)else\n|(?i)elseauth\n|(?i)elseguest\n|(?i)empty\n|(?i)endauth\n|(?i)endcan\n|(?i)endcanany\n|(?i)endcannot\n|(?i)endcomponent\n|(?i)endempty\n|(?i)endfor\n|(?i)endforeach\n|(?i)endforelse\n|(?i)endguest\n|(?i)endif\n|(?i)endisset\n|(?i)endlang\n|(?i)endprepend\n|(?i)endpush\n|(?i)endsection\n|(?i)endslot\n|(?i)endswitch\n|(?i)endunless\n|endverbatim\n|(?i)endwhile\n|(?i)guest\n|(?i)lang\n|(?i)overwrite\n|(?i)parent\n|(?i)show\n|(?i)stop\n|verbatim\n)\n\\b"
3630
+ "match": "(?x)\n(?\u003c![A-Za-z0-9_@]) # Prepended @ or literal character escapes the sequence\n@\n(?: # Ordering not important as we everything will be matched up to word boundary\n (?i)append\n|(?i)auth\n|(?i)break\n|(?i)continue\n|(?i)csrf\n|(?i)default\n|(?i)else\n|(?i)elseauth\n|(?i)elseguest\n|(?i)empty\n|(?i)endauth\n|(?i)endcan\n|(?i)endcanany\n|(?i)endcannot\n|(?i)endcomponent\n|(?i)endempty\n|(?i)enderror\n|(?i)endfor\n|(?i)endforeach\n|(?i)endforelse\n|(?i)endguest\n|(?i)endif\n|(?i)endisset\n|(?i)endlang\n|(?i)endprepend\n|(?i)endpush\n|(?i)endsection\n|(?i)endslot\n|(?i)endswitch\n|(?i)endunless\n|endverbatim\n|(?i)endwhile\n|(?i)guest\n|(?i)lang\n|(?i)overwrite\n|(?i)parent\n|(?i)show\n|(?i)stop\n|verbatim\n)\n\\b"
3631
3631
  },
3632
3632
  {
3633
3633
  "name": "meta.embedded.block.blade",
@@ -340,7 +340,7 @@
340
340
  "end": "(?=\u003c/(?i:style))",
341
341
  "patterns": [
342
342
  {
343
- "include": "source.scss"
343
+ "include": "source.css.scss"
344
344
  }
345
345
  ],
346
346
  "beginCaptures": {
@@ -432,6 +432,46 @@
432
432
  }
433
433
  }
434
434
  },
435
+ {
436
+ "name": "source.ts.embedded.html",
437
+ "begin": "(?:^\\s+)?(\u003c)((?i:script))\\b(?=[^\u003e]*lang=(['\"])ts\\1?)",
438
+ "end": "(?\u003c=\u003c/(script|SCRIPT))(\u003e)(?:\\s*\\n)?",
439
+ "patterns": [
440
+ {
441
+ "include": "#tag-stuff"
442
+ },
443
+ {
444
+ "begin": "(?\u003c!\u003c/(?:script|SCRIPT))(\u003e)",
445
+ "end": "(\u003c/)((?i:script))",
446
+ "patterns": [
447
+ {
448
+ "include": "source.ts"
449
+ }
450
+ ],
451
+ "captures": {
452
+ "1": {
453
+ "name": "punctuation.definition.tag.begin.html"
454
+ },
455
+ "2": {
456
+ "name": "entity.name.tag.script.html"
457
+ }
458
+ }
459
+ }
460
+ ],
461
+ "beginCaptures": {
462
+ "1": {
463
+ "name": "punctuation.definition.tag.begin.html"
464
+ },
465
+ "2": {
466
+ "name": "entity.name.tag.script.html"
467
+ }
468
+ },
469
+ "endCaptures": {
470
+ "2": {
471
+ "name": "punctuation.definition.tag.html"
472
+ }
473
+ }
474
+ },
435
475
  {
436
476
  "name": "source.coffee.embedded.html",
437
477
  "begin": "(?:^\\s+)?(\u003c)((?i:script))\\b(?=[^\u003e]*lang=(['\"])coffee\\1?)",
@@ -118,7 +118,7 @@
118
118
  "end": "^(?!(\\1\\s)|\\s*$)",
119
119
  "patterns": [
120
120
  {
121
- "include": "source.scss"
121
+ "include": "source.css.scss"
122
122
  }
123
123
  ],
124
124
  "beginCaptures": {
@@ -423,7 +423,7 @@
423
423
  {
424
424
  "name": "meta.declaration.instance.deriving.haskell",
425
425
  "contentName": "meta.type-signature.haskell",
426
- "begin": "^(?:\u003e|\u003c) ([ \\t]*)(?:(deriving)(?:\\s+([\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*))?)\\s+(instance)(?:(?\u003c=[\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}'])(?![\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']))",
426
+ "begin": "^(?:\u003e|\u003c) ([ \\t]*)(?:(?:(deriving)(?:\\s+([\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*))?)\\s+|(deriving)\\s+(via)\\s+(.*)\\s+)?(instance)(?:(?\u003c=[\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}'])(?![\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']))",
427
427
  "end": "^(?!(?:\u003e|\u003c) \\1[ \\t]|(?:\u003e|\u003c) [ \\t]*$)|^(?!(?:\u003e|\u003c) )",
428
428
  "patterns": [
429
429
  {
@@ -431,9 +431,6 @@
431
431
  },
432
432
  {
433
433
  "include": "#type_signature"
434
- },
435
- {
436
- "include": "#deriving_via"
437
434
  }
438
435
  ],
439
436
  "beginCaptures": {
@@ -449,6 +446,20 @@
449
446
  },
450
447
  "4": {
451
448
  "name": "keyword.other.haskell"
449
+ },
450
+ "5": {
451
+ "name": "keyword.other.haskell"
452
+ },
453
+ "6": {
454
+ "name": "meta.type-signature.haskell",
455
+ "patterns": [
456
+ {
457
+ "include": "#type_signature"
458
+ }
459
+ ]
460
+ },
461
+ "7": {
462
+ "name": "keyword.other.haskell"
452
463
  }
453
464
  }
454
465
  }