github-linguist 7.5.1 → 7.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. checksums.yaml +4 -4
  2. data/grammars/annotation.liquidhaskell.haskell.json +122 -24
  3. data/grammars/etc.json +7 -0
  4. data/grammars/hint.haskell.json +122 -24
  5. data/grammars/hint.message.haskell.json +122 -24
  6. data/grammars/hint.type.haskell.json +122 -24
  7. data/grammars/injections.etc.json +48 -10
  8. data/grammars/source.abnf.json +180 -353
  9. data/grammars/source.ballerina.json +205 -50
  10. data/grammars/source.bnf.json +191 -0
  11. data/grammars/source.cabal.json +1 -1
  12. data/grammars/source.ditroff.desc.json +1 -1
  13. data/grammars/source.ebnf.json +157 -147
  14. data/grammars/source.editorconfig.json +30 -5
  15. data/grammars/source.emacs.lisp.json +4 -4
  16. data/grammars/source.gremlin.json +200 -0
  17. data/grammars/source.haproxy-config.json +65 -13
  18. data/grammars/source.haskell.json +122 -24
  19. data/grammars/source.hql.json +1 -1
  20. data/grammars/source.hsig.json +122 -24
  21. data/grammars/source.hx.json +5 -5
  22. data/grammars/source.hxml.json +4 -4
  23. data/grammars/source.ideal.json +4 -4
  24. data/grammars/source.igor.json +325 -0
  25. data/grammars/source.jlex.json +322 -0
  26. data/grammars/source.julia.json +132 -1
  27. data/grammars/source.lean.json +103 -54
  28. data/grammars/source.lex.json +232 -0
  29. data/grammars/source.lex.regexp.json +269 -0
  30. data/grammars/source.logos.json +1 -1
  31. data/grammars/source.meson.json +1 -1
  32. data/grammars/source.mlir.json +389 -0
  33. data/grammars/source.nanorc.json +3 -0
  34. data/grammars/source.pic.json +19 -19
  35. data/grammars/source.plist.json +336 -0
  36. data/grammars/source.powershell.json +2 -2
  37. data/grammars/source.purescript.json +2 -2
  38. data/grammars/source.rascal.json +1 -0
  39. data/grammars/source.regexp.extended.json +544 -6
  40. data/grammars/source.regexp.json +408 -31
  41. data/grammars/source.renpy.json +3 -1
  42. data/grammars/source.scala.json +199 -97
  43. data/grammars/source.smpl.json +314 -0
  44. data/grammars/source.solidity.json +1 -1
  45. data/grammars/source.sourcepawn.json +654 -0
  46. data/grammars/source.sqf.json +5 -1
  47. data/grammars/source.swift.json +56 -11
  48. data/grammars/source.sy.json +800 -0
  49. data/grammars/source.ts.json +64 -47
  50. data/grammars/source.tsx.json +65 -48
  51. data/grammars/source.v.json +1184 -0
  52. data/grammars/source.viml.json +31 -31
  53. data/grammars/source.wollok.json +1 -1
  54. data/grammars/source.xojo.json +2 -2
  55. data/grammars/source.yacc.json +626 -0
  56. data/grammars/source.yara.json +1 -1
  57. data/grammars/source.yasnippet.json +15 -25
  58. data/grammars/source.zeek.json +4 -4
  59. data/grammars/source.zig.json +594 -195
  60. data/grammars/text.eml.basic.json +19 -6
  61. data/grammars/text.html.php.blade.json +3 -3
  62. data/grammars/text.plain.json +18 -0
  63. data/grammars/text.roff.json +926 -437
  64. data/grammars/text.runoff.json +3 -3
  65. data/grammars/text.tex.latex.haskell.json +122 -24
  66. data/grammars/text.texinfo.json +1525 -0
  67. data/grammars/text.xml.plist.json +664 -0
  68. data/grammars/text.xml.svg.json +556 -0
  69. data/grammars/version +1 -1
  70. data/lib/linguist.rb +3 -1
  71. data/lib/linguist/VERSION +1 -1
  72. data/lib/linguist/generated.rb +62 -17
  73. data/lib/linguist/heuristics.yml +13 -0
  74. data/lib/linguist/language.rb +1 -11
  75. data/lib/linguist/languages.json +1 -1
  76. data/lib/linguist/languages.yml +179 -19
  77. data/lib/linguist/samples.json +2778 -732
  78. data/lib/linguist/strategy/manpage.rb +42 -0
  79. metadata +22 -5
  80. data/grammars/source.bison.json +0 -55
  81. data/grammars/source.sp.json +0 -113
@@ -2,6 +2,33 @@
2
2
  "name": "Regular Expression",
3
3
  "scopeName": "source.regexp",
4
4
  "patterns": [
5
+ {
6
+ "begin": "\\A\\s*(?:/\\s*)?(\\(\\?\\^?[A-Za-wyz]*x[A-Za-z]*[-A-Za-wyz]*\\))",
7
+ "end": "(?=A)B",
8
+ "patterns": [
9
+ {
10
+ "include": "source.regexp.extended"
11
+ }
12
+ ],
13
+ "beginCaptures": {
14
+ "1": {
15
+ "patterns": [
16
+ {
17
+ "include": "#group"
18
+ }
19
+ ]
20
+ }
21
+ }
22
+ },
23
+ {
24
+ "begin": "\\A(?:\\xC2\\xAD|\\xAD){2}",
25
+ "end": "(?=A)B",
26
+ "patterns": [
27
+ {
28
+ "include": "source.sy"
29
+ }
30
+ ]
31
+ },
5
32
  {
6
33
  "include": "#main"
7
34
  }
@@ -152,6 +179,28 @@
152
179
  }
153
180
  ]
154
181
  },
182
+ "calloutBrackets": {
183
+ "begin": "{",
184
+ "end": "}",
185
+ "patterns": [
186
+ {
187
+ "include": "#calloutBrackets"
188
+ },
189
+ {
190
+ "include": "#main"
191
+ }
192
+ ],
193
+ "beginCaptures": {
194
+ "0": {
195
+ "name": "punctuation.definition.bracket.curly.begin.regexp"
196
+ }
197
+ },
198
+ "endCaptures": {
199
+ "0": {
200
+ "name": "punctuation.definition.bracket.curly.end.regexp"
201
+ }
202
+ }
203
+ },
155
204
  "class": {
156
205
  "name": "meta.character-class.set.regexp",
157
206
  "begin": "\\[",
@@ -676,7 +725,7 @@
676
725
  "match": "\\\\X"
677
726
  },
678
727
  {
679
- "name": "constnat.character.escape.linebreak-grapheme.regexp",
728
+ "name": "constant.character.escape.linebreak-grapheme.regexp",
680
729
  "match": "\\\\R"
681
730
  },
682
731
  {
@@ -691,14 +740,110 @@
691
740
  "name": "constant.character.escape.meta-char.regexp",
692
741
  "match": "\\\\M-."
693
742
  },
743
+ {
744
+ "name": "constant.character.escape.any-char.regexp",
745
+ "match": "\\\\O"
746
+ },
747
+ {
748
+ "name": "keyword.control.anchor.text-boundary.regexp",
749
+ "match": "\\\\[yY]"
750
+ },
694
751
  {
695
752
  "name": "constant.character.escape.misc.regexp",
696
753
  "match": "\\\\."
697
754
  }
698
755
  ]
699
756
  },
700
- "group": {
757
+ "fixedGroups": {
701
758
  "patterns": [
759
+ {
760
+ "name": "meta.group-reference.reset.regexp",
761
+ "match": "(\\()(\\?[R0])(\\))",
762
+ "captures": {
763
+ "1": {
764
+ "name": "punctuation.definition.group.begin.regexp"
765
+ },
766
+ "2": {
767
+ "name": "keyword.other.back-reference.regexp"
768
+ },
769
+ "3": {
770
+ "name": "punctuation.definition.group.end.regexp"
771
+ }
772
+ }
773
+ },
774
+ {
775
+ "name": "meta.group.scoped-modifiers.regexp",
776
+ "match": "(\\(\\?)((?:y{[\\w]+}|[-A-Za-z^])*)(\\))",
777
+ "captures": {
778
+ "1": {
779
+ "name": "punctuation.definition.group.begin.regexp"
780
+ },
781
+ "2": {
782
+ "patterns": [
783
+ {
784
+ "include": "#scopedModifiers"
785
+ }
786
+ ]
787
+ },
788
+ "3": {
789
+ "name": "punctuation.definition.group.end.regexp"
790
+ }
791
+ }
792
+ },
793
+ {
794
+ "name": "meta.control-verb.regexp",
795
+ "match": "(\\(\\*)(\\w*)(?:([:=])([^\\s()]*))?(\\))",
796
+ "captures": {
797
+ "1": {
798
+ "name": "punctuation.definition.group.begin.regexp"
799
+ },
800
+ "2": {
801
+ "name": "keyword.control.verb.regexp"
802
+ },
803
+ "3": {
804
+ "name": "punctuation.separator.key-value.regexp"
805
+ },
806
+ "4": {
807
+ "name": "variable.parameter.control-verb.regexp"
808
+ },
809
+ "5": {
810
+ "name": "punctuation.definition.group.begin.regexp"
811
+ }
812
+ }
813
+ },
814
+ {
815
+ "name": "meta.group-reference.named.regexp",
816
+ "match": "(\\()(\\?(?:\u0026|P[\u003e=]))(\\w+)(\\))",
817
+ "captures": {
818
+ "1": {
819
+ "name": "punctuation.definition.group.begin.regexp"
820
+ },
821
+ "2": {
822
+ "name": "keyword.other.back-reference.regexp"
823
+ },
824
+ "3": {
825
+ "name": "entity.group.name.regexp"
826
+ },
827
+ "4": {
828
+ "name": "punctuation.definition.group.begin.regexp"
829
+ }
830
+ }
831
+ },
832
+ {
833
+ "name": "meta.group-reference.relative.regexp",
834
+ "match": "(\\()(\\?[-+]\\d+)(\\))",
835
+ "captures": {
836
+ "1": {
837
+ "name": "punctuation.definition.group.begin.regexp"
838
+ },
839
+ "2": {
840
+ "name": "keyword.other.back-reference.regexp"
841
+ },
842
+ "3": {
843
+ "name": "punctuation.definition.group.end.regexp"
844
+ }
845
+ }
846
+ },
702
847
  {
703
848
  "name": "meta.callout.regexp",
704
849
  "match": "(\\()(\\?C\\d*)(\\))",
@@ -714,6 +859,144 @@
714
859
  }
715
860
  }
716
861
  },
862
+ {
863
+ "name": "meta.callout.regexp",
864
+ "match": "(?x)\n(\\(\\*)\n([_A-Za-z][_A-Za-z0-9]*) # Name\n((\\[)([_A-Za-z][_A-Za-z0-9]*)(\\])) # [tag]\n(\\))",
865
+ "captures": {
866
+ "1": {
867
+ "name": "punctuation.definition.group.begin.regexp"
868
+ },
869
+ "2": {
870
+ "name": "entity.name.callout.regexp"
871
+ },
872
+ "3": {
873
+ "name": "entity.name.tag.callout-tag.regexp"
874
+ },
875
+ "4": {
876
+ "name": "punctuation.definition.callout-tag.begin.regexp"
877
+ },
878
+ "5": {
879
+ "name": "callout-tag.constant.other.regexp"
880
+ },
881
+ "6": {
882
+ "name": "punctuation.definition.callout-tag.end.regexp"
883
+ },
884
+ "7": {
885
+ "name": "punctuation.definition.group.end.regexp"
886
+ }
887
+ }
888
+ },
889
+ {
890
+ "name": "meta.absent-function.clear-range.regexp",
891
+ "match": "(\\()(\\?~)(\\|)(\\))",
892
+ "captures": {
893
+ "1": {
894
+ "name": "punctuation.definition.group.begin.regexp"
895
+ },
896
+ "2": {
897
+ "name": "keyword.control.flow.regexp"
898
+ },
899
+ "3": {
900
+ "name": "punctuation.separator.delimiter.pipe.regexp"
901
+ },
902
+ "4": {
903
+ "name": "punctuation.definition.group.end.regexp"
904
+ }
905
+ }
906
+ },
907
+ {
908
+ "name": "meta.absent-stopper.regexp",
909
+ "match": "(\\()(\\?~)(\\|)([^|\\)]*)(\\))",
910
+ "captures": {
911
+ "1": {
912
+ "name": "punctuation.definition.group.begin.regexp"
913
+ },
914
+ "2": {
915
+ "name": "keyword.control.flow.regexp"
916
+ },
917
+ "3": {
918
+ "name": "punctuation.separator.delimiter.pipe.regexp"
919
+ },
920
+ "4": {
921
+ "name": "variable.parameter.absent-function.regexp",
922
+ "patterns": [
923
+ {
924
+ "include": "#main"
925
+ }
926
+ ]
927
+ },
928
+ "5": {
929
+ "name": "punctuation.definition.group.end.regexp"
930
+ }
931
+ }
932
+ },
933
+ {
934
+ "name": "meta.absent-expression.regexp",
935
+ "match": "(?x)\n(\\()\n(\\?~)\n(\\|) ([^|\\)]*)\n(\\|) ([^|\\)]*)\n(\\))",
936
+ "captures": {
937
+ "1": {
938
+ "name": "punctuation.definition.group.begin.regexp"
939
+ },
940
+ "2": {
941
+ "name": "keyword.control.flow.regexp"
942
+ },
943
+ "3": {
944
+ "name": "punctuation.separator.delimiter.pipe.regexp"
945
+ },
946
+ "4": {
947
+ "name": "variable.parameter.absent-function.regexp",
948
+ "patterns": [
949
+ {
950
+ "include": "#main"
951
+ }
952
+ ]
953
+ },
954
+ "5": {
955
+ "name": "punctuation.separator.delimiter.pipe.regexp"
956
+ },
957
+ "6": {
958
+ "name": "variable.parameter.absent-function.regexp",
959
+ "patterns": [
960
+ {
961
+ "include": "#main"
962
+ }
963
+ ]
964
+ },
965
+ "7": {
966
+ "name": "punctuation.definition.group.end.regexp"
967
+ }
968
+ }
969
+ },
970
+ {
971
+ "name": "meta.absent-repeater.regexp",
972
+ "match": "(\\()(\\?~)([^|\\)]*)(\\))",
973
+ "captures": {
974
+ "1": {
975
+ "name": "punctuation.definition.group.begin.regexp"
976
+ },
977
+ "2": {
978
+ "name": "keyword.control.flow.regexp"
979
+ },
980
+ "3": {
981
+ "name": "variable.parameter.absent-function.regexp",
982
+ "patterns": [
983
+ {
984
+ "include": "#main"
985
+ }
986
+ ]
987
+ },
988
+ "4": {
989
+ "name": "punctuation.definition.group.end.regexp"
990
+ }
991
+ }
992
+ }
993
+ ]
994
+ },
995
+ "group": {
996
+ "patterns": [
997
+ {
998
+ "include": "#fixedGroups"
999
+ },
717
1000
  {
718
1001
  "name": "meta.group.named.regexp",
719
1002
  "begin": "\\(\\?(?=P?[\u003c'])",
@@ -769,7 +1052,7 @@
769
1052
  },
770
1053
  {
771
1054
  "name": "meta.group.non-capturing.regexp",
772
- "begin": "(\\(\\?)([-A-Za-z^]*)(:)",
1055
+ "begin": "(\\(\\?)((?:y{[\\w]+}|[-A-Za-z^])*)(:)",
773
1056
  "end": "\\)",
774
1057
  "patterns": [
775
1058
  {
@@ -818,74 +1101,150 @@
818
1101
  }
819
1102
  },
820
1103
  {
821
- "name": "meta.group.scoped-modifiers.regexp",
822
- "match": "(\\(\\?)([-A-Za-z^]*)(\\))",
823
- "captures": {
1104
+ "name": "meta.group.script-run.regexp",
1105
+ "begin": "(\\(\\*)((?:atomic_)?script_run|a?sr)(:)",
1106
+ "end": "\\)",
1107
+ "patterns": [
1108
+ {
1109
+ "include": "#main"
1110
+ }
1111
+ ],
1112
+ "beginCaptures": {
824
1113
  "1": {
825
1114
  "name": "punctuation.definition.group.begin.regexp"
826
1115
  },
827
1116
  "2": {
828
- "patterns": [
829
- {
830
- "include": "#scopedModifiers"
831
- }
832
- ]
1117
+ "name": "keyword.control.verb.regexp"
833
1118
  },
834
1119
  "3": {
1120
+ "name": "punctuation.separator.colon.regexp"
1121
+ }
1122
+ },
1123
+ "endCaptures": {
1124
+ "0": {
835
1125
  "name": "punctuation.definition.group.end.regexp"
836
1126
  }
837
1127
  }
838
1128
  },
839
1129
  {
840
- "name": "meta.control-verb.regexp",
841
- "match": "(\\(\\*)(\\w*)(?:([:=])([^\\s()]*))?(\\))",
842
- "captures": {
1130
+ "name": "meta.group.callout.contents.regexp",
1131
+ "begin": "(\\(\\?{1,2})({)",
1132
+ "end": "(?x)\n(}) # Last closing bracket\n((\\[)([_A-Za-z][_A-Za-z0-9]*)(\\]))? # [tag]\n(X|\u003c|\u003e)? # Callout direction\n(?:[^\\)]*) # Silently skip unexpected characters\n(\\)) # Closing bracket",
1133
+ "patterns": [
1134
+ {
1135
+ "include": "#calloutBrackets"
1136
+ },
1137
+ {
1138
+ "include": "#main"
1139
+ }
1140
+ ],
1141
+ "beginCaptures": {
843
1142
  "1": {
844
1143
  "name": "punctuation.definition.group.begin.regexp"
845
1144
  },
846
1145
  "2": {
847
- "name": "keyword.control.verb.regexp"
1146
+ "name": "punctuation.definition.bracket.curly.begin.regexp"
1147
+ }
1148
+ },
1149
+ "endCaptures": {
1150
+ "1": {
1151
+ "name": "punctuation.definition.bracket.curly.end.regexp"
1152
+ },
1153
+ "2": {
1154
+ "name": "entity.name.tag.callout-tag.regexp"
848
1155
  },
849
1156
  "3": {
850
- "name": "punctuation.separator.key-value.regexp"
1157
+ "name": "punctuation.definition.callout-tag.begin.regexp"
851
1158
  },
852
1159
  "4": {
853
- "name": "variable.parameter.control-verb.regexp"
1160
+ "name": "callout-tag.constant.other.regexp"
854
1161
  },
855
1162
  "5": {
856
- "name": "punctuation.definition.group.begin.regexp"
1163
+ "name": "punctuation.definition.callout-tag.end.regexp"
1164
+ },
1165
+ "6": {
1166
+ "name": "constant.language.callout-direction.regexp"
1167
+ },
1168
+ "7": {
1169
+ "name": "punctuation.definition.group.end.regexp"
857
1170
  }
858
1171
  }
859
1172
  },
860
1173
  {
861
- "name": "meta.group-reference.named.regexp",
862
- "match": "(\\()(\\?(?:\u0026|P[\u003e=]))(\\w+)(\\))",
863
- "captures": {
1174
+ "name": "meta.group.callout.regexp",
1175
+ "begin": "(?x)\n(\\(\\*)\n([_A-Za-z][_A-Za-z0-9]*) # Name\n((\\[)([_A-Za-z][_A-Za-z0-9]*)(\\]))? # [tag]\n({)",
1176
+ "end": "(?x)\n(})\n(?:[^\\)]*)\n(?:(\\))|(?=$))",
1177
+ "patterns": [
1178
+ {
1179
+ "include": "#main"
1180
+ },
1181
+ {
1182
+ "name": "variable.parameter.argument.regexp",
1183
+ "match": "[-\\w]+"
1184
+ }
1185
+ ],
1186
+ "beginCaptures": {
864
1187
  "1": {
865
1188
  "name": "punctuation.definition.group.begin.regexp"
866
1189
  },
867
1190
  "2": {
868
- "name": "keyword.other.back-reference.regexp"
1191
+ "name": "entity.name.callout.regexp"
869
1192
  },
870
1193
  "3": {
871
- "name": "entity.group.name.regexp"
1194
+ "name": "entity.name.tag.callout-tag.regexp"
872
1195
  },
873
1196
  "4": {
874
- "name": "punctuation.definition.group.begin.regexp"
1197
+ "name": "punctuation.definition.callout-tag.begin.regexp"
1198
+ },
1199
+ "5": {
1200
+ "name": "callout-tag.constant.other.regexp"
1201
+ },
1202
+ "6": {
1203
+ "name": "punctuation.definition.callout-tag.end.regexp"
1204
+ },
1205
+ "7": {
1206
+ "name": "punctuation.definition.arguments.begin.regexp"
1207
+ }
1208
+ },
1209
+ "endCaptures": {
1210
+ "1": {
1211
+ "name": "punctuation.definition.arguments.end.regexp"
1212
+ },
1213
+ "2": {
1214
+ "name": "punctuation.definition.group.end.regexp"
875
1215
  }
876
1216
  }
877
1217
  },
878
1218
  {
879
- "name": "meta.group-reference.relative.regexp",
880
- "match": "(\\()(\\?[-+]\\d+)(\\))",
881
- "captures": {
1219
+ "name": "meta.absent-function.regexp",
1220
+ "begin": "(\\()(\\?~)(\\|)",
1221
+ "end": "\\)",
1222
+ "patterns": [
1223
+ {
1224
+ "name": "punctuation.separator.delimiter.pipe.regexp",
1225
+ "match": "\\|"
1226
+ },
1227
+ {
1228
+ "name": "variable.parameter.argument.regexp",
1229
+ "match": "[-\\w]+"
1230
+ },
1231
+ {
1232
+ "include": "#main"
1233
+ }
1234
+ ],
1235
+ "beginCaptures": {
882
1236
  "1": {
883
1237
  "name": "punctuation.definition.group.begin.regexp"
884
1238
  },
885
1239
  "2": {
886
- "name": "keyword.other.back-reference.regexp"
1240
+ "name": "keyword.control.flow.regexp"
887
1241
  },
888
1242
  "3": {
1243
+ "name": "punctuation.separator.delimiter.pipe.regexp"
1244
+ }
1245
+ },
1246
+ "endCaptures": {
1247
+ "0": {
889
1248
  "name": "punctuation.definition.group.end.regexp"
890
1249
  }
891
1250
  }
@@ -1010,9 +1369,27 @@
1010
1369
  },
1011
1370
  "scopedModifiers": {
1012
1371
  "patterns": [
1372
+ {
1373
+ "name": "meta.text-segment-mode.regexp",
1374
+ "match": "(y)({)(\\w+)(})",
1375
+ "captures": {
1376
+ "1": {
1377
+ "name": "storage.modifier.flag.y.regexp"
1378
+ },
1379
+ "2": {
1380
+ "name": "punctuation.definition.option.bracket.curly.begin.regexp"
1381
+ },
1382
+ "3": {
1383
+ "name": "variable.parameter.option-mode.regexp"
1384
+ },
1385
+ "4": {
1386
+ "name": "punctuation.definition.option.bracket.curly.end.regexp"
1387
+ }
1388
+ }
1389
+ },
1013
1390
  {
1014
1391
  "name": "keyword.operator.modifier.reset.regexp",
1015
- "match": "(?\u003c=\\?)\\^"
1392
+ "match": "(?:(?\u003c=\\?)|\\G|^)\\^"
1016
1393
  },
1017
1394
  {
1018
1395
  "name": "keyword.operator.modifier.negate.regexp",
@@ -1040,10 +1417,10 @@
1040
1417
  "match": "(?\u003c![^\\\\]\\\\|^\\\\)(\\$\\{)\\s*(?!\\d|-)[-\\w]+\\s*(\\})",
1041
1418
  "captures": {
1042
1419
  "1": {
1043
- "name": "punctuation.definition.variable.begin.tmcg"
1420
+ "name": "punctuation.definition.variable.begin.regexp"
1044
1421
  },
1045
1422
  "2": {
1046
- "name": "punctuation.definition.variable.end.tmcg"
1423
+ "name": "punctuation.definition.variable.end.regexp"
1047
1424
  }
1048
1425
  }
1049
1426
  }