github-linguist 7.6.1 → 7.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (111) hide show
  1. checksums.yaml +5 -5
  2. data/bin/github-linguist +17 -4
  3. data/grammars/annotation.liquidhaskell.haskell.json +58 -11
  4. data/grammars/etc.json +212 -3
  5. data/grammars/hidden.manref.json +29 -0
  6. data/grammars/hint.haskell.json +58 -11
  7. data/grammars/hint.message.haskell.json +58 -11
  8. data/grammars/hint.type.haskell.json +58 -11
  9. data/grammars/injections.etc.json +601 -1
  10. data/grammars/markdown.plantuml.codeblock.json +26 -0
  11. data/grammars/source.4dm.json +1100 -0
  12. data/grammars/source.abap.json +7 -7
  13. data/grammars/source.abnf.json +23 -1
  14. data/grammars/source.agda.json +32 -202
  15. data/grammars/source.ahk.json +9 -5
  16. data/grammars/source.angelscript.json +1 -1
  17. data/grammars/source.ballerina.json +54 -18
  18. data/grammars/source.chapel.json +4 -4
  19. data/grammars/source.csound.json +1 -1
  20. data/grammars/source.css.json +2 -2
  21. data/grammars/source.css.scss.json +164 -15
  22. data/grammars/source.curlrc.json +869 -65
  23. data/grammars/source.dart.json +58 -32
  24. data/grammars/source.dircolors.json +137 -0
  25. data/grammars/source.direct-x.json +135 -0
  26. data/grammars/source.ebnf.json +67 -39
  27. data/grammars/source.editorconfig.json +23 -5
  28. data/grammars/source.elixir.json +51 -0
  29. data/grammars/source.elm.json +1 -1
  30. data/grammars/source.emacs.lisp.json +10 -0
  31. data/grammars/source.faust.json +119 -0
  32. data/grammars/source.gcode.json +166 -8
  33. data/grammars/source.gfm.json +1 -1
  34. data/grammars/source.gitconfig.json +1 -1
  35. data/grammars/source.hack.json +200 -98
  36. data/grammars/source.haskell.json +58 -11
  37. data/grammars/source.hlsl.json +9 -5
  38. data/grammars/source.hosts.json +40 -0
  39. data/grammars/source.hsig.json +58 -11
  40. data/grammars/source.hx.json +4 -0
  41. data/grammars/source.igor.json +46 -2
  42. data/grammars/source.ini.npmrc.json +311 -0
  43. data/grammars/source.inno.json +133 -0
  44. data/grammars/source.inputrc.json +500 -0
  45. data/grammars/source.js.json +4 -4
  46. data/grammars/source.julia.json +69 -23
  47. data/grammars/source.kotlin.json +1 -1
  48. data/grammars/source.lean.json +19 -3
  49. data/grammars/source.lean.markdown.json +2598 -0
  50. data/grammars/source.lex.json +4 -4
  51. data/grammars/source.m4.json +141 -99
  52. data/grammars/source.man-conf.json +46 -34
  53. data/grammars/source.matlab.json +437 -184
  54. data/grammars/source.mcfunction-snapshot.json +21388 -561
  55. data/grammars/source.mcfunction.json +55 -5
  56. data/grammars/source.meson.json +1 -1
  57. data/grammars/source.mlir.json +37 -317
  58. data/grammars/source.mrc.json +740 -0
  59. data/grammars/source.nasl.json +155 -0
  60. data/grammars/source.nextflow.json +2 -2
  61. data/grammars/source.odin-ehr.json +806 -0
  62. data/grammars/source.odin.json +402 -0
  63. data/grammars/source.opts.json +12 -2
  64. data/grammars/source.p4.json +21 -5
  65. data/grammars/source.prisma.json +435 -0
  66. data/grammars/source.python.json +2 -0
  67. data/grammars/source.qasm.json +66 -0
  68. data/grammars/source.ql.json +1408 -0
  69. data/grammars/source.reason.json +28 -16
  70. data/grammars/source.rego.json +124 -0
  71. data/grammars/source.sass.json +158 -3
  72. data/grammars/source.scala.json +53 -18
  73. data/grammars/source.ssh-config.json +1 -14
  74. data/grammars/source.swift.json +162 -2
  75. data/grammars/source.sy.json +2088 -183
  76. data/grammars/source.terraform.json +576 -132
  77. data/grammars/source.tnsaudit.json +256 -0
  78. data/grammars/source.ts.json +159 -51
  79. data/grammars/source.tsx.json +160 -52
  80. data/grammars/source.v.json +559 -764
  81. data/grammars/source.vim-snippet.json +645 -0
  82. data/grammars/source.viml.json +6 -6
  83. data/grammars/source.webassembly.json +10 -0
  84. data/grammars/source.wgetrc.json +1640 -0
  85. data/grammars/source.wsd.json +775 -0
  86. data/grammars/source.zig.json +169 -304
  87. data/grammars/text.html.php.blade.json +1 -1
  88. data/grammars/text.html.riot.json +788 -0
  89. data/grammars/text.muse.json +1471 -0
  90. data/grammars/text.tex.latex.haskell.json +58 -11
  91. data/grammars/text.vim-help.json +383 -0
  92. data/grammars/version +1 -1
  93. data/lib/linguist/VERSION +1 -1
  94. data/lib/linguist/blob_helper.rb +4 -2
  95. data/lib/linguist/file_blob.rb +1 -1
  96. data/lib/linguist/generated.rb +60 -13
  97. data/lib/linguist/heuristics.yml +64 -4
  98. data/lib/linguist/languages.json +1 -1
  99. data/lib/linguist/languages.yml +336 -45
  100. data/lib/linguist/lazy_blob.rb +10 -10
  101. data/lib/linguist/linguist.bundle +0 -0
  102. data/lib/linguist/samples.json +43560 -31457
  103. data/lib/linguist/shebang.rb +5 -3
  104. data/lib/linguist/vendor.yml +9 -0
  105. metadata +29 -10
  106. data/grammars/source.LS.json +0 -85
  107. data/grammars/source.MCPOST.json +0 -54
  108. data/grammars/source.MOD.json +0 -55
  109. data/grammars/source.apt.json +0 -18
  110. data/grammars/source.jlex.json +0 -322
  111. data/grammars/source.yaml-ext.json +0 -324
@@ -46,6 +46,14 @@
46
46
  }
47
47
  }
48
48
  },
49
+ {
50
+ "match": "([a-z0-9_\\.\\-\\/]+)",
51
+ "captures": {
52
+ "1": {
53
+ "name": "entity.name.function.mcfunction"
54
+ }
55
+ }
56
+ },
49
57
  {
50
58
  "begin": "(\\[)",
51
59
  "end": "(\\])",
@@ -194,6 +202,21 @@
194
202
  }
195
203
  }
196
204
  },
205
+ "command.token.block_predicate_without_namespace": {
206
+ "name": "meta.command.token.block_predicate_without_namespace.mcfunction",
207
+ "begin": "(?\u003c= )(?=(\\#)?([a-z0-9_\\.\\-\\/]+)(\\[ *([a-z_][a-z0-9_]*) *\\=))",
208
+ "end": "(?=\\n)|(?:(?\u003c=\\])(?!\\{)|(?\u003c=\\}))([^ \\n]*)",
209
+ "patterns": [
210
+ {
211
+ "include": "#block_predicate"
212
+ }
213
+ ],
214
+ "endCaptures": {
215
+ "1": {
216
+ "name": "invalid.illegal.mcfunction"
217
+ }
218
+ }
219
+ },
197
220
  "command.token.boolean": {
198
221
  "name": "meta.command.token.boolean.mcfunction",
199
222
  "match": "(?\u003c= )(true|false)(?=[ \\n]|$)",
@@ -224,6 +247,18 @@
224
247
  }
225
248
  }
226
249
  },
250
+ "command.token.greedy_parent": {
251
+ "name": "meta.command.token.greedy_parent.mcfunction",
252
+ "match": "((?\u003c=^say | say ))(.*)$",
253
+ "captures": {
254
+ "1": {
255
+ "name": "entity.name.mcfunction"
256
+ },
257
+ "2": {
258
+ "name": "string.quoted.mcfunction"
259
+ }
260
+ }
261
+ },
227
262
  "command.token.literal": {
228
263
  "name": "meta.command.token.literal.mcfunction",
229
264
  "match": "(?\u003c= )([a-z_][a-z0-9_]*)(?=[ \\n]|$)",
@@ -362,7 +397,7 @@
362
397
  },
363
398
  "command.token.root_redirect": {
364
399
  "name": "meta.command.token.root_redirect.mcfunction",
365
- "match": "(?\u003c= )(run) ?([a-z_][a-z0-9_]*)?(?=[ \\n]|$)",
400
+ "match": "(?\u003c= )(run) ([a-z_][a-z0-9_]*)?(?=[ \\n]|$)",
366
401
  "captures": {
367
402
  "1": {
368
403
  "name": "entity.name.mcfunction"
@@ -556,6 +591,9 @@
556
591
  {
557
592
  "include": "#command.token.block_predicate"
558
593
  },
594
+ {
595
+ "include": "#command.token.block_predicate_without_namespace"
596
+ },
559
597
  {
560
598
  "include": "#command.token.resource_location"
561
599
  },
@@ -580,6 +618,9 @@
580
618
  {
581
619
  "include": "#command.token.root_redirect"
582
620
  },
621
+ {
622
+ "include": "#command.token.greedy_parent"
623
+ },
583
624
  {
584
625
  "include": "#command.token.literal"
585
626
  },
@@ -672,25 +713,34 @@
672
713
  "patterns": [
673
714
  {
674
715
  "name": "meta.comment.block.annotation.mcfunction",
675
- "match": "((\\@\\w*)\\b.*)$",
716
+ "match": "((\\@\\w*)\\b(.*))$",
676
717
  "captures": {
677
718
  "1": {
678
719
  "name": "comment.block.mcfunction"
679
720
  },
680
721
  "2": {
681
722
  "name": "markup.heading.mcfunction"
723
+ },
724
+ "3": {
725
+ "name": "comment.block.mcfunction"
682
726
  }
683
727
  }
684
728
  },
685
729
  {
686
730
  "name": "meta.comment.block.heading.mcfunction",
687
- "match": "((\\#.*))$",
731
+ "match": "((\u003e)((.*)))$",
688
732
  "captures": {
689
733
  "1": {
690
734
  "name": "comment.block.mcfunction"
691
735
  },
692
736
  "2": {
693
- "name": "markup.heading.mcfunction"
737
+ "name": "markup.list.mcfunction"
738
+ },
739
+ "3": {
740
+ "name": "markup.bold.mcfunction"
741
+ },
742
+ "4": {
743
+ "name": "markup.list.mcfunction"
694
744
  }
695
745
  }
696
746
  },
@@ -930,7 +980,7 @@
930
980
  "nbt_path.property": {
931
981
  "patterns": [
932
982
  {
933
- "begin": "(\\.)?(\\w+)(\\[)",
983
+ "begin": "(\\.)?(\\w+)?(\\[)",
934
984
  "end": "(\\])|(?=\\n)",
935
985
  "patterns": [
936
986
  {
@@ -59,7 +59,7 @@
59
59
  },
60
60
  {
61
61
  "name": "support.function.builtin.meson",
62
- "match": "(?x)\\b(add_global_arguments|add_project_arguments|add_global_link_arguments|add_project_link_arguments|add_test_setup|add_languages|alias_target|assert|benchmark|both_libraries|build_target|configuration_data|configure_file|custom_target|declare_dependency|dependency|disabler|environment|error|executable|generator|gettext|get_option|get_variable|files|find_library|find_program|include_directories|import|install_data|install_headers|install_man|install_subdir|is_disabler|is_variable|jar|join_paths|library|message|option|project|run_target|run_command|set_variable|subdir|subdir_done|subproject|shared_library|shared_module|static_library|test|vcs_tag|warning\n)\\b\\s*(?=\\()"
62
+ "match": "(?x)\\b(add_global_arguments|add_project_arguments|add_global_link_arguments|add_project_link_arguments|add_test_setup|add_languages|alias_target|assert|benchmark|both_libraries|build_target|configuration_data|configure_file|custom_target|declare_dependency|dependency|disabler|environment|error|executable|generator|gettext|get_option|get_variable|files|find_library|find_program|include_directories|import|install_data|install_headers|install_man|install_subdir|is_disabler|is_variable|jar|join_paths|library|message|option|project|run_target|run_command|set_variable|subdir|subdir_done|subproject|summary|shared_library|shared_module|static_library|test|vcs_tag|warning\n)\\b\\s*(?=\\()"
63
63
  }
64
64
  ],
65
65
  "repository": {
@@ -3,28 +3,15 @@
3
3
  "scopeName": "source.mlir",
4
4
  "patterns": [
5
5
  {
6
- "name": "keyword.module.mlir",
7
- "match": "\\b(module)\\b"
6
+ "include": "#comment"
7
+ },
8
+ {
9
+ "include": "#string"
8
10
  },
9
11
  {
10
12
  "name": "support.function.mlir",
11
- "begin": "\\b(func)\\b\\s*(@[a-zA-Z_][a-zA-Z_0-9\\.]*)",
12
- "end": "}",
13
- "patterns": [
14
- {
15
- "include": "#function_params"
16
- },
17
- {
18
- "include": "#function_attributes"
19
- },
20
- {
21
- "include": "#function_results"
22
- },
23
- {
24
- "include": "#region"
25
- }
26
- ],
27
- "beginCaptures": {
13
+ "match": "\\b(func)\\b\\s*(@[\\w_][\\w\\d_.$]*)",
14
+ "captures": {
28
15
  "1": {
29
16
  "name": "keyword.function.mlir"
30
17
  },
@@ -34,145 +21,41 @@
34
21
  }
35
22
  },
36
23
  {
37
- "name": "comment.line.double-slash.mlir",
38
- "include": "#comment"
24
+ "name": "keyword.module.mlir",
25
+ "match": "\\b(attributes|br|call|constant|loc|return)\\b"
26
+ },
27
+ {
28
+ "include": "#identifier"
29
+ },
30
+ {
31
+ "include": "#branch_target"
32
+ },
33
+ {
34
+ "include": "#attribute"
35
+ },
36
+ {
37
+ "include": "#types"
38
+ },
39
+ {
40
+ "include": "#integer"
39
41
  }
40
42
  ],
41
43
  "repository": {
42
- "attribute_keywords": {
43
- "match": "\\b(dense|none|opaque|sparse)\\b",
44
- "captures": {
45
- "1": {
46
- "name": "keyword.attributes.mlir"
47
- }
48
- }
49
- },
50
- "attributes": {
51
- "name": "meta.attributes.mlir",
52
- "begin": "{",
53
- "end": "}",
54
- "patterns": [
55
- {
56
- "include": "#attribute_keywords"
57
- },
58
- {
59
- "include": "#constant"
60
- }
61
- ]
62
- },
63
- "bool_constant": {
64
- "name": "constant.language.mlir",
65
- "match": "\\b(true|false)\\b",
66
- "captures": {
67
- "1": {
68
- "name": "constant.language.mlir"
69
- }
70
- }
44
+ "attribute": {
45
+ "name": "meta.attribute.mlir",
46
+ "match": "\\W[\\w_][\\w\\d_.$]*\\s*="
71
47
  },
72
48
  "branch_target": {
73
- "name": "meta.branch_target.mlir",
74
- "begin": "(\\^bb[\\w\\d_$\\.-]+)",
75
- "end": "[:,\\n]",
76
- "patterns": [
77
- {
78
- "include": "#branch_target_region"
79
- },
80
- {
81
- "include": "#comment"
82
- }
83
- ],
84
- "beginCaptures": {
85
- "1": {
86
- "name": "entity.name.label.mlir"
87
- }
88
- }
89
- },
90
- "branch_target_region": {
91
- "name": "meta.branch_target.mlir",
92
- "begin": "\\(",
93
- "end": "\\)",
94
- "patterns": [
95
- {
96
- "include": "#identifier"
97
- },
98
- {
99
- "include": "#types"
100
- }
101
- ]
49
+ "name": "entity.name.label.mlir",
50
+ "match": "\\^bb[\\w\\d_$\\.-]+"
102
51
  },
103
52
  "comment": {
104
53
  "name": "comment.line.double-slash.mlir",
105
54
  "match": "//.*$"
106
55
  },
107
- "constant": {
108
- "name": "constants.other.mlir",
109
- "patterns": [
110
- {
111
- "include": "#bool_constant"
112
- },
113
- {
114
- "include": "#integer"
115
- },
116
- {
117
- "include": "#string"
118
- }
119
- ]
120
- },
121
- "container": {
122
- "name": "meta.types.container.mlir",
123
- "begin": "(complex|tuple)\u003c",
124
- "end": "\u003e",
125
- "patterns": [
126
- {
127
- "include": "#types"
128
- }
129
- ],
130
- "beginCaptures": {
131
- "1": {
132
- "name": "keyword.container.mlir"
133
- }
134
- }
135
- },
136
- "function_attributes": {
137
- "name": "meta.attributes.function.mlir",
138
- "begin": "(attributes)\\s*{",
139
- "end": "}",
140
- "patterns": [
141
- {
142
- "include": "#constant"
143
- }
144
- ],
145
- "beginCaptures": {
146
- "1": {
147
- "name": "keyword.attributes.mlir"
148
- }
149
- }
150
- },
151
- "function_params": {
152
- "begin": "\\(",
153
- "end": "\\)",
154
- "patterns": [
155
- {
156
- "include": "#identifier"
157
- },
158
- {
159
- "include": "#types"
160
- }
161
- ]
162
- },
163
- "function_results": {
164
- "name": "meta.function.results.mlir",
165
- "begin": "-\u003e\\s*\\(",
166
- "end": "\\)",
167
- "patterns": [
168
- {
169
- "include": "#types"
170
- }
171
- ]
172
- },
173
56
  "identifier": {
174
57
  "name": "meta.identifier.mlir",
175
- "match": "[\\%#][a-zA-Z0-9][\\w\\d_]*",
58
+ "match": "[\\%#@][\\w_][\\w\\d_.$]*",
176
59
  "captures": {
177
60
  "0": {
178
61
  "name": "variable.mlir"
@@ -180,143 +63,11 @@
180
63
  }
181
64
  },
182
65
  "integer": {
183
- "name": "constant.numeric.mlir",
184
- "match": "[1-9][0-9]*"
185
- },
186
- "loc": {
187
- "name": "meta.loc.mlir",
188
- "begin": "\\b(loc)\\(",
189
- "end": "\\)",
190
- "patterns": [
191
- {
192
- "include": "#loc_fusedloc"
193
- },
194
- {
195
- "include": "#loc_nameloc"
196
- },
197
- {
198
- "include": "#op_generic"
199
- }
200
- ],
201
- "beginCaptures": {
202
- "1": {
203
- "name": "keyword.loc.mlir"
204
- }
205
- }
206
- },
207
- "loc_fusedloc": {
208
- "name": "meta.location.mlir",
209
- "begin": "(fused)(\u003c.*\u003e)?\\[",
210
- "end": "\\]",
211
- "patterns": [
212
- {
213
- "include": "#string"
214
- }
215
- ],
216
- "beginCaptures": {
217
- "1": {
218
- "name": "keyword.loc.mlir"
219
- },
220
- "2": {
221
- "patterns": [
222
- {
223
- "include": "#string"
224
- }
225
- ]
226
- }
227
- }
228
- },
229
- "loc_nameloc": {
230
- "name": "meta.location.mlir",
231
- "patterns": [
232
- {
233
- "include": "#string"
234
- }
235
- ]
236
- },
237
- "op": {
238
- "patterns": [
239
- {
240
- "include": "#terminator"
241
- },
242
- {
243
- "include": "#op_generic"
244
- }
245
- ]
246
- },
247
- "op_generic": {
248
- "name": "meta.op.generic.mlir",
249
- "begin": "((%[\\w\\d_]*)\\s*)=\\s*(?=\")",
250
- "end": "\\n",
251
- "patterns": [
252
- {
253
- "include": "#comment"
254
- },
255
- {
256
- "include": "#attributes"
257
- },
258
- {
259
- "include": "#identifier"
260
- },
261
- {
262
- "include": "#loc"
263
- },
264
- {
265
- "include": "#string"
266
- },
267
- {
268
- "include": "#types"
269
- }
270
- ],
271
- "beginCaptures": {
272
- "2": {
273
- "name": "variable.mlir"
274
- }
275
- }
276
- },
277
- "region": {
278
- "name": "meta.region.mlir",
279
- "begin": "{",
280
- "end": "(?=})",
281
- "patterns": [
282
- {
283
- "include": "#branch_target"
284
- },
285
- {
286
- "include": "#op"
287
- },
288
- {
289
- "include": "#attributes"
290
- },
291
- {
292
- "include": "#comment"
293
- },
294
- {
295
- "include": "#string"
296
- }
297
- ]
298
- },
299
- "shaped_container": {
300
- "name": "meta.types.standard.shaped_container.mlir",
301
- "begin": "(memref|tensor|vector)\u003c",
302
- "end": "\u003e",
303
- "patterns": [
304
- {
305
- "include": "#types"
306
- }
307
- ],
308
- "beginCaptures": {
309
- "1": {
310
- "name": "keyword.shaped_container.mlir"
311
- }
312
- }
313
- },
314
- "standard_simple_types": {
315
- "name": "meta.types.standard.simple.mlir",
316
- "match": "\\b(index|i[1-9]\\d*|f16|bf16|f32|f64)\\b",
66
+ "name": "meta.identifier.mlir",
67
+ "match": "[\\Wx]([0-9]+)",
317
68
  "captures": {
318
69
  "1": {
319
- "name": "keyword.types.standard.simple.mlir"
70
+ "name": "constant.numeric.mlir"
320
71
  }
321
72
  }
322
73
  },
@@ -345,45 +96,14 @@
345
96
  }
346
97
  }
347
98
  },
348
- "terminator": {
349
- "begin": "(br|cond_br|return)",
350
- "end": "\\n",
351
- "patterns": [
352
- {
353
- "include": "#comment"
354
- },
355
- {
356
- "include": "#branch_target"
357
- },
358
- {
359
- "include": "#identifier"
360
- },
361
- {
362
- "include": "#types"
363
- },
364
- {
365
- "include": "#loc"
366
- }
367
- ],
368
- "beginCaptures": {
99
+ "types": {
100
+ "name": "meta.types.simple.mlir",
101
+ "match": "[\\Wx](index|i[1-9][0-9]*|f16|bf16|f32|f64|memref|tensor|vector)\\b",
102
+ "captures": {
369
103
  "1": {
370
- "name": "keyword.control.mlir"
104
+ "name": "storage.type.mlir"
371
105
  }
372
106
  }
373
- },
374
- "types": {
375
- "name": "meta.types.mlir",
376
- "patterns": [
377
- {
378
- "include": "#container"
379
- },
380
- {
381
- "include": "#shaped_container"
382
- },
383
- {
384
- "include": "#standard_simple_types"
385
- }
386
- ]
387
107
  }
388
108
  }
389
109
  }