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
@@ -374,7 +374,7 @@
374
374
  },
375
375
  {
376
376
  "name": "meta.variable-field.gitconfig",
377
- "begin": "(?i)\\b(email)\\s*(=)",
377
+ "begin": "(?i)\\b(email|url)\\s*(=)",
378
378
  "end": "$|(?=#|;)",
379
379
  "patterns": [
380
380
  {
@@ -10,6 +10,53 @@
10
10
  }
11
11
  ],
12
12
  "repository": {
13
+ "attributes": {
14
+ "patterns": [
15
+ {
16
+ "name": "meta.attributes.php",
17
+ "begin": "(\u003c\u003c)(?!\u003c)",
18
+ "end": "(\u003e\u003e)",
19
+ "patterns": [
20
+ {
21
+ "include": "#comments"
22
+ },
23
+ {
24
+ "name": "entity.other.attribute-name.php",
25
+ "match": "([A-Za-z_][A-Za-z0-9_]*)"
26
+ },
27
+ {
28
+ "begin": "(\\()",
29
+ "end": "(\\))",
30
+ "patterns": [
31
+ {
32
+ "include": "#language"
33
+ }
34
+ ],
35
+ "beginCaptures": {
36
+ "1": {
37
+ "name": "punctuation.definition.parameters.begin.php"
38
+ }
39
+ },
40
+ "endCaptures": {
41
+ "1": {
42
+ "name": "punctuation.definition.parameters.end.php"
43
+ }
44
+ }
45
+ }
46
+ ],
47
+ "beginCaptures": {
48
+ "1": {
49
+ "name": "punctuation.definition.attributes.php"
50
+ }
51
+ },
52
+ "endCaptures": {
53
+ "1": {
54
+ "name": "punctuation.definition.attributes.php"
55
+ }
56
+ }
57
+ }
58
+ ]
59
+ },
13
60
  "class-builtin": {
14
61
  "patterns": [
15
62
  {
@@ -202,6 +249,9 @@
202
249
  {
203
250
  "include": "#comments"
204
251
  },
252
+ {
253
+ "include": "#attributes"
254
+ },
205
255
  {
206
256
  "include": "#type-annotation"
207
257
  },
@@ -366,6 +416,55 @@
366
416
  }
367
417
  ]
368
418
  },
419
+ "implements": {
420
+ "patterns": [
421
+ {
422
+ "begin": "(?i)(implements)\\s+",
423
+ "end": "(?i)(?=[;{])",
424
+ "patterns": [
425
+ {
426
+ "include": "#comments"
427
+ },
428
+ {
429
+ "contentName": "meta.other.inherited-class.php",
430
+ "begin": "(?i)(?=[a-z0-9_\\\\]+)",
431
+ "end": "(?i)(?:\\s*(?:,|(?=[^a-z0-9_\\\\\\s]))\\s*)",
432
+ "patterns": [
433
+ {
434
+ "begin": "(?i)(?=\\\\?[a-z_0-9]+\\\\)",
435
+ "end": "(?i)([a-z_][a-z_0-9]*)?(?=[^a-z0-9_\\\\])",
436
+ "patterns": [
437
+ {
438
+ "include": "#namespace"
439
+ }
440
+ ],
441
+ "endCaptures": {
442
+ "1": {
443
+ "name": "entity.other.inherited-class.php"
444
+ }
445
+ }
446
+ },
447
+ {
448
+ "include": "#class-builtin"
449
+ },
450
+ {
451
+ "include": "#namespace"
452
+ },
453
+ {
454
+ "name": "entity.other.inherited-class.php",
455
+ "match": "(?i)[a-z_][a-z_0-9]*"
456
+ }
457
+ ]
458
+ }
459
+ ],
460
+ "beginCaptures": {
461
+ "1": {
462
+ "name": "storage.modifier.implements.php"
463
+ }
464
+ }
465
+ }
466
+ ]
467
+ },
369
468
  "instantiation": {
370
469
  "begin": "(?i)(new)\\s+",
371
470
  "end": "(?i)(?=[^$a-z0-9_\\\\])",
@@ -435,26 +534,12 @@
435
534
  "match": "\\\\[nrt\\\\\\$\\\"]"
436
535
  },
437
536
  {
438
- "begin": "(\\{)(?=\\$.*?\\})",
439
- "end": "(\\})",
440
- "patterns": [
441
- {
442
- "include": "#language"
443
- }
444
- ],
445
- "beginCaptures": {
446
- "1": {
447
- "name": "punctuation.definition.variable.php"
448
- }
449
- },
450
- "endCaptures": {
451
- "1": {
452
- "name": "punctuation.definition.variable.php"
453
- }
454
- }
537
+ "name": "variable.other.php",
538
+ "match": "(\\{\\$.*?\\})"
455
539
  },
456
540
  {
457
- "include": "#variable-name"
541
+ "name": "variable.other.php",
542
+ "match": "(\\$[a-zA-Z_][a-zA-Z0-9_]*((-\u003e[a-zA-Z_][a-zA-Z0-9_]*)|(\\[[a-zA-Z0-9_]+\\]))?)"
458
543
  }
459
544
  ]
460
545
  },
@@ -475,6 +560,15 @@
475
560
  {
476
561
  "include": "#comments"
477
562
  },
563
+ {
564
+ "begin": "(?=^\\s*\u003c\u003c)",
565
+ "end": "(?\u003c=\u003e\u003e)",
566
+ "patterns": [
567
+ {
568
+ "include": "#attributes"
569
+ }
570
+ ]
571
+ },
478
572
  {
479
573
  "include": "#xhp"
480
574
  },
@@ -495,6 +589,9 @@
495
589
  {
496
590
  "name": "keyword.operator.assignment.php",
497
591
  "match": "(=)"
592
+ },
593
+ {
594
+ "include": "#type-annotation"
498
595
  }
499
596
  ],
500
597
  "beginCaptures": {
@@ -521,6 +618,9 @@
521
618
  },
522
619
  {
523
620
  "include": "#generics"
621
+ },
622
+ {
623
+ "include": "#implements"
524
624
  }
525
625
  ],
526
626
  "beginCaptures": {
@@ -606,6 +706,9 @@
606
706
  {
607
707
  "include": "#generics"
608
708
  },
709
+ {
710
+ "include": "#implements"
711
+ },
609
712
  {
610
713
  "contentName": "meta.other.inherited-class.php",
611
714
  "begin": "(?i)(extends)\\s+",
@@ -641,51 +744,6 @@
641
744
  "name": "storage.modifier.extends.php"
642
745
  }
643
746
  }
644
- },
645
- {
646
- "begin": "(?i)(implements)\\s+",
647
- "end": "(?i)(?=[;{])",
648
- "patterns": [
649
- {
650
- "include": "#comments"
651
- },
652
- {
653
- "contentName": "meta.other.inherited-class.php",
654
- "begin": "(?i)(?=[a-z0-9_\\\\]+)",
655
- "end": "(?i)(?:\\s*(?:,|(?=[^a-z0-9_\\\\\\s]))\\s*)",
656
- "patterns": [
657
- {
658
- "begin": "(?i)(?=\\\\?[a-z_0-9]+\\\\)",
659
- "end": "(?i)([a-z_][a-z_0-9]*)?(?=[^a-z0-9_\\\\])",
660
- "patterns": [
661
- {
662
- "include": "#namespace"
663
- }
664
- ],
665
- "endCaptures": {
666
- "1": {
667
- "name": "entity.other.inherited-class.php"
668
- }
669
- }
670
- },
671
- {
672
- "include": "#class-builtin"
673
- },
674
- {
675
- "include": "#namespace"
676
- },
677
- {
678
- "name": "entity.other.inherited-class.php",
679
- "match": "(?i)[a-z_][a-z_0-9]*"
680
- }
681
- ]
682
- }
683
- ],
684
- "beginCaptures": {
685
- "1": {
686
- "name": "storage.modifier.implements.php"
687
- }
688
- }
689
747
  }
690
748
  ],
691
749
  "beginCaptures": {
@@ -725,27 +783,50 @@
725
783
  },
726
784
  {
727
785
  "name": "meta.catch.php",
728
- "begin": "\\b(catch)\\b\\s*\\(\\s*",
729
- "end": "([A-Za-z_][A-Za-z_0-9]*)\\s*((\\$+)[a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)\\s*\\)",
786
+ "begin": "\\b(catch)\\s*(\\()",
787
+ "end": "\\)",
730
788
  "patterns": [
731
789
  {
732
790
  "include": "#namespace"
791
+ },
792
+ {
793
+ "match": "(?xi)\n([a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*) # Exception class\n((?:\\s*\\|\\s*[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)*) # Optional additional exception classes\n\\s*\n((\\$+)[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*) # Variable",
794
+ "captures": {
795
+ "1": {
796
+ "name": "support.class.exception.php"
797
+ },
798
+ "2": {
799
+ "patterns": [
800
+ {
801
+ "name": "support.class.exception.php",
802
+ "match": "(?i)[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*"
803
+ },
804
+ {
805
+ "name": "punctuation.separator.delimiter.php",
806
+ "match": "\\|"
807
+ }
808
+ ]
809
+ },
810
+ "3": {
811
+ "name": "variable.other.php"
812
+ },
813
+ "4": {
814
+ "name": "punctuation.definition.variable.php"
815
+ }
816
+ }
733
817
  }
734
818
  ],
735
819
  "beginCaptures": {
736
820
  "1": {
737
821
  "name": "keyword.control.exception.catch.php"
822
+ },
823
+ "2": {
824
+ "name": "punctuation.definition.parameters.begin.bracket.round.php"
738
825
  }
739
826
  },
740
827
  "endCaptures": {
741
- "1": {
742
- "name": "support.class.exception.php"
743
- },
744
- "2": {
745
- "name": "variable.other.php"
746
- },
747
- "3": {
748
- "name": "punctuation.definition.variable.php"
828
+ "0": {
829
+ "name": "punctuation.definition.parameters.end.bracket.round.php"
749
830
  }
750
831
  }
751
832
  },
@@ -1048,7 +1129,11 @@
1048
1129
  },
1049
1130
  {
1050
1131
  "name": "keyword.operator.logical.php",
1051
- "match": "(?i)(!|\u0026\u0026|\\|\\|)|\\b(and|or|xor|as)\\b"
1132
+ "match": "(?i)(!|\u0026\u0026|\\|\\|)|\\b(and|or|xor)\\b"
1133
+ },
1134
+ {
1135
+ "name": "keyword.operator.type.php",
1136
+ "match": "(?i)\\b(is|as)\\b"
1052
1137
  },
1053
1138
  {
1054
1139
  "include": "#function-call"
@@ -1177,9 +1262,13 @@
1177
1262
  },
1178
1263
  "namespace": {
1179
1264
  "name": "support.other.namespace.php",
1180
- "begin": "(?i)(?:(namespace)|[a-z0-9_]+)?(\\\\)(?=.*?[^a-z_0-9\\\\])",
1265
+ "begin": "(?i)((namespace)|[a-z0-9_]+)?(\\\\)(?=.*?[^a-z_0-9\\\\])",
1181
1266
  "end": "(?i)(?=[a-z0-9_]*[^a-z0-9_\\\\])",
1182
1267
  "patterns": [
1268
+ {
1269
+ "name": "entity.name.type.namespace.php",
1270
+ "match": "(?i)[a-z0-9_]+(?=\\\\)"
1271
+ },
1183
1272
  {
1184
1273
  "match": "(?i)(\\\\)",
1185
1274
  "captures": {
@@ -1191,9 +1280,9 @@
1191
1280
  ],
1192
1281
  "beginCaptures": {
1193
1282
  "1": {
1194
- "name": "variable.language.namespace.php"
1283
+ "name": "entity.name.type.namespace.php"
1195
1284
  },
1196
- "2": {
1285
+ "3": {
1197
1286
  "name": "punctuation.separator.inheritance.php"
1198
1287
  }
1199
1288
  }
@@ -1483,6 +1572,10 @@
1483
1572
  "begin": "\"\\s*(?=(SELECT|INSERT|UPDATE|DELETE|CREATE|REPLACE|ALTER)\\b)",
1484
1573
  "end": "\"",
1485
1574
  "patterns": [
1575
+ {
1576
+ "name": "punctuation.definition.parameters.begin.bracket.round.php",
1577
+ "match": "\\("
1578
+ },
1486
1579
  {
1487
1580
  "name": "comment.line.number-sign.sql",
1488
1581
  "match": "#(\\\\\"|[^\"])*(?=\"|$\\n?)"
@@ -1547,6 +1640,10 @@
1547
1640
  "begin": "'\\s*(?=(SELECT|INSERT|UPDATE|DELETE|CREATE|REPLACE|ALTER)\\b)",
1548
1641
  "end": "'",
1549
1642
  "patterns": [
1643
+ {
1644
+ "name": "punctuation.definition.parameters.begin.bracket.round.php",
1645
+ "match": "\\("
1646
+ },
1550
1647
  {
1551
1648
  "name": "comment.line.number-sign.sql",
1552
1649
  "match": "#(\\\\'|[^'])*(?='|$\\n?)"
@@ -2110,30 +2207,24 @@
2110
2207
  },
2111
2208
  {
2112
2209
  "name": "storage.type.shape.php",
2113
- "begin": "(?=shape\\()",
2114
- "end": "\\)",
2210
+ "begin": "(shape\\()",
2211
+ "end": "((,|\\.\\.\\.)?\\s*\\))",
2115
2212
  "patterns": [
2116
2213
  {
2117
- "begin": "(shape\\()",
2118
- "end": "(=\u003e)",
2119
- "patterns": [
2120
- {
2121
- "include": "#strings"
2122
- },
2123
- {
2124
- "include": "#constants"
2125
- }
2126
- ],
2127
- "endCaptures": {
2128
- "1": {
2129
- "name": "keyword.operator.key.php"
2130
- }
2131
- }
2214
+ "include": "#type-annotation"
2132
2215
  },
2133
2216
  {
2134
- "include": "#type-annotation"
2217
+ "include": "#strings"
2218
+ },
2219
+ {
2220
+ "include": "#constants"
2135
2221
  }
2136
- ]
2222
+ ],
2223
+ "endCaptures": {
2224
+ "1": {
2225
+ "name": "keyword.operator.key.php"
2226
+ }
2227
+ }
2137
2228
  },
2138
2229
  {
2139
2230
  "begin": "\\(",
@@ -2146,6 +2237,9 @@
2146
2237
  },
2147
2238
  {
2148
2239
  "include": "#class-name"
2240
+ },
2241
+ {
2242
+ "include": "#comments"
2149
2243
  }
2150
2244
  ]
2151
2245
  },
@@ -2157,7 +2251,12 @@
2157
2251
  {
2158
2252
  "include": "#namespace"
2159
2253
  }
2160
- ]
2254
+ ],
2255
+ "endCaptures": {
2256
+ "0": {
2257
+ "name": "entity.name.function.php"
2258
+ }
2259
+ }
2161
2260
  },
2162
2261
  "var_basic": {
2163
2262
  "patterns": [
@@ -2452,6 +2551,9 @@
2452
2551
  {
2453
2552
  "include": "#xhp-tag-termination"
2454
2553
  },
2554
+ {
2555
+ "include": "#xhp-html-comments"
2556
+ },
2455
2557
  {
2456
2558
  "include": "#xhp-tag-attributes"
2457
2559
  }
@@ -2484,7 +2586,7 @@
2484
2586
  "xhp-tag-termination": {
2485
2587
  "patterns": [
2486
2588
  {
2487
- "begin": "(\u003e)",
2589
+ "begin": "(?\u003c!--)(\u003e)",
2488
2590
  "end": "(\u003c/)",
2489
2591
  "patterns": [
2490
2592
  {