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
@@ -0,0 +1,191 @@
1
+ {
2
+ "name": "Backus-Naur Form",
3
+ "scopeName": "source.bnf",
4
+ "patterns": [
5
+ {
6
+ "include": "#main"
7
+ }
8
+ ],
9
+ "repository": {
10
+ "comment": {
11
+ "name": "comment.line.semicolon.bnf",
12
+ "begin": ";",
13
+ "end": "$",
14
+ "beginCaptures": {
15
+ "0": {
16
+ "name": "punctuation.definition.comment.bnf"
17
+ }
18
+ }
19
+ },
20
+ "main": {
21
+ "patterns": [
22
+ {
23
+ "include": "#rule"
24
+ },
25
+ {
26
+ "include": "#comment"
27
+ }
28
+ ]
29
+ },
30
+ "rhs": {
31
+ "patterns": [
32
+ {
33
+ "name": "keyword.operator.logical.or.alternation.pipe.bnf",
34
+ "match": "\\|"
35
+ },
36
+ {
37
+ "name": "keyword.operator.logical.repetition.asterisk.star.bnf",
38
+ "match": "\\*"
39
+ },
40
+ {
41
+ "name": "keyword.operator.logical.repetition.plus.bnf",
42
+ "match": "\\+"
43
+ },
44
+ {
45
+ "name": "meta.optional.bnf",
46
+ "begin": "\\[",
47
+ "end": "\\]",
48
+ "patterns": [
49
+ {
50
+ "include": "#rhs"
51
+ }
52
+ ],
53
+ "beginCaptures": {
54
+ "0": {
55
+ "name": "punctuation.definition.square.bracket.begin.bnf"
56
+ }
57
+ },
58
+ "endCaptures": {
59
+ "0": {
60
+ "name": "punctuation.definition.square.bracket.end.bnf"
61
+ }
62
+ }
63
+ },
64
+ {
65
+ "name": "meta.repetition.bnf",
66
+ "begin": "{",
67
+ "end": "}",
68
+ "patterns": [
69
+ {
70
+ "include": "#rhs"
71
+ }
72
+ ],
73
+ "beginCaptures": {
74
+ "0": {
75
+ "name": "punctuation.definition.curly.bracket.begin.bnf"
76
+ }
77
+ },
78
+ "endCaptures": {
79
+ "0": {
80
+ "name": "punctuation.definition.curly.bracket.end.bnf"
81
+ }
82
+ }
83
+ },
84
+ {
85
+ "name": "meta.group.bnf",
86
+ "begin": "\\(",
87
+ "end": "\\)",
88
+ "patterns": [
89
+ {
90
+ "include": "#rhs"
91
+ }
92
+ ],
93
+ "beginCaptures": {
94
+ "0": {
95
+ "name": "punctuation.definition.round.bracket.begin.bnf"
96
+ }
97
+ },
98
+ "endCaptures": {
99
+ "0": {
100
+ "name": "punctuation.definition.round.bracket.end.bnf"
101
+ }
102
+ }
103
+ },
104
+ {
105
+ "name": "meta.lhs.bnf",
106
+ "contentName": "constant.language.term.bnf",
107
+ "begin": "\u003c",
108
+ "end": "\u003e|(?=$)",
109
+ "beginCaptures": {
110
+ "0": {
111
+ "name": "punctuation.definition.angle.bracket.begin.bnf"
112
+ }
113
+ },
114
+ "endCaptures": {
115
+ "0": {
116
+ "name": "punctuation.definition.angle.bracket.end.bnf"
117
+ }
118
+ }
119
+ },
120
+ {
121
+ "name": "string.quoted.double.bnf",
122
+ "begin": "\"",
123
+ "end": "\"",
124
+ "beginCaptures": {
125
+ "0": {
126
+ "name": "punctuation.definition.string.begin.bnf"
127
+ }
128
+ },
129
+ "endCaptures": {
130
+ "0": {
131
+ "name": "punctuation.definition.string.end.bnf"
132
+ }
133
+ }
134
+ },
135
+ {
136
+ "name": "string.quoted.single.bnf",
137
+ "begin": "'",
138
+ "end": "'",
139
+ "beginCaptures": {
140
+ "0": {
141
+ "name": "punctuation.definition.string.begin.bnf"
142
+ }
143
+ },
144
+ "endCaptures": {
145
+ "0": {
146
+ "name": "punctuation.definition.string.end.bnf"
147
+ }
148
+ }
149
+ }
150
+ ]
151
+ },
152
+ "rule": {
153
+ "name": "meta.rule.bnf",
154
+ "begin": "(?=\u003c)",
155
+ "end": "$|(?=;)",
156
+ "patterns": [
157
+ {
158
+ "name": "meta.lhs.bnf",
159
+ "contentName": "entity.name.rule.identifier.bnf",
160
+ "begin": "\\G\u003c",
161
+ "end": "\u003e|(?=$|;)",
162
+ "beginCaptures": {
163
+ "0": {
164
+ "name": "punctuation.definition.angle.bracket.begin.bnf"
165
+ }
166
+ },
167
+ "endCaptures": {
168
+ "0": {
169
+ "name": "punctuation.definition.angle.bracket.end.bnf"
170
+ }
171
+ }
172
+ },
173
+ {
174
+ "name": "meta.rhs.bnf",
175
+ "begin": "::=",
176
+ "end": "(?=$|;)",
177
+ "patterns": [
178
+ {
179
+ "include": "#rhs"
180
+ }
181
+ ],
182
+ "beginCaptures": {
183
+ "0": {
184
+ "name": "keyword.operator.assignment.bnf"
185
+ }
186
+ }
187
+ }
188
+ ]
189
+ }
190
+ }
191
+ }
@@ -41,7 +41,7 @@
41
41
  },
42
42
  {
43
43
  "name": "module-type",
44
- "match": "(benchmark|executable|flag|source-repository|test-suite)\\s+(\\S+)",
44
+ "match": "(benchmark|common|executable|flag|source-repository|test-suite)\\s+(\\S+)",
45
45
  "captures": {
46
46
  "1": {
47
47
  "name": "entity.name.function"
@@ -156,7 +156,7 @@
156
156
  }
157
157
  },
158
158
  {
159
- "begin": "(?x)^\\s* (biggestfont|broken|checksum|designsize|encoding|family|fonts|hor|image_generator |internalname|name|orientation|paper(?:length|width)|pass_filenames|postpro|prepro |print|res|sizescale|slant|spacewidth|spare\\d|special|styles|tcommand|unicode |unitwidth|unscaled_charwidths|use_charnames_in_special|vert|X11|(?:lbp|pcl)[a-z]+) (?=\\s)",
159
+ "begin": "(?x)^\\s*\n(biggestfont|broken|checksum|designsize|encoding|family|fonts|hor|image_generator\n|internalname|name|orientation|paper(?:length|width)|pass_filenames|postpro|prepro\n|print|res|sizescale|slant|spacewidth|spare\\d|special|styles|tcommand|unicode\n|unitwidth|unscaled_charwidths|use_charnames_in_special|vert|X11|(?:lbp|pcl)[a-z]+)\n(?=\\s)",
160
160
  "end": "(?=$|#)",
161
161
  "patterns": [
162
162
  {
@@ -1,202 +1,212 @@
1
1
  {
2
- "name": "EBNF",
2
+ "name": "Extended Backus-Naur Form",
3
3
  "scopeName": "source.ebnf",
4
4
  "patterns": [
5
5
  {
6
- "include": "#comment"
7
- },
8
- {
9
- "name": "meta.syntax-rule.ebnf",
10
- "begin": "\\s*(\\b(?:\\w|\\s|[\\-_0-9])+\\b)\\s*(=)",
11
- "end": ";",
12
- "patterns": [
13
- {
14
- "include": "#comment"
15
- },
16
- {
17
- "include": "#subrules"
18
- }
19
- ],
20
- "captures": {
21
- "1": {
22
- "name": "entity.name.function.ebnf"
23
- },
24
- "2": {
25
- "name": "keyword.operator.definition.ebnf"
26
- }
27
- },
28
- "endCaptures": {
29
- "0": {
30
- "name": "punctuation.terminator.syntax-rule.ebnf"
31
- }
32
- }
6
+ "include": "#main"
33
7
  }
34
8
  ],
35
9
  "repository": {
36
10
  "comment": {
37
11
  "name": "comment.block.ebnf",
38
- "begin": "\\(\\*(?!\\))",
39
- "end": "\\*\\)"
40
- },
41
- "double-quote-string": {
42
- "name": "string.quoted.double.ebnf",
43
- "begin": "\"",
44
- "end": "\""
45
- },
46
- "group": {
47
- "begin": "\\(",
48
- "end": "\\)",
49
- "patterns": [
50
- {
51
- "include": "#subrules"
52
- }
53
- ],
12
+ "begin": "\\(\\*",
13
+ "end": "\\*\\)",
54
14
  "beginCaptures": {
55
15
  "0": {
56
- "name": "keyword.other.group.begin.ebnf"
16
+ "name": "punctuation.definition.comment.begin.ebnf"
57
17
  }
58
18
  },
59
19
  "endCaptures": {
60
20
  "0": {
61
- "name": "keyword.other.group.end.ebnf"
21
+ "name": "punctuation.definition.comment.end.ebnf"
62
22
  }
63
23
  }
64
24
  },
65
- "invalid": {
66
- "name": "invalid.illegal.ebnf",
67
- "match": "\\(\\s*[*:/]\\s*\\)"
68
- },
69
- "non-terminal": {
70
- "name": "variable.other.non-terminal.ebnf",
71
- "match": "\\w[\\w\\-_0-9]*\\w"
72
- },
73
- "operator": {
25
+ "main": {
74
26
  "patterns": [
75
27
  {
76
- "include": "#operator-alternative"
28
+ "include": "#comment"
77
29
  },
78
30
  {
79
- "include": "#operator-concatenation"
31
+ "include": "#rule"
80
32
  },
81
33
  {
82
- "include": "#operator-exception"
34
+ "include": "#special"
83
35
  }
84
36
  ]
85
37
  },
86
- "operator-alternative": {
87
- "name": "keyword.operator.alternative.ebnf",
88
- "match": "\\|"
89
- },
90
- "operator-concatenation": {
91
- "name": "keyword.operator.concatenation.ebnf",
92
- "match": ","
93
- },
94
- "operator-exception": {
95
- "name": "keyword.operator.exception.ebnf",
96
- "match": "-"
97
- },
98
- "optional": {
99
- "begin": "\\[",
100
- "end": "\\]",
38
+ "rhs": {
101
39
  "patterns": [
102
40
  {
103
- "include": "#subrules"
104
- }
105
- ],
106
- "beginCaptures": {
107
- "0": {
108
- "name": "keyword.other.optional.begin.ebnf"
109
- }
110
- },
111
- "endCaptures": {
112
- "0": {
113
- "name": "keyword.other.optional.end.ebnf"
114
- }
115
- }
116
- },
117
- "repetition": {
118
- "begin": "{",
119
- "end": "}",
120
- "patterns": [
41
+ "name": "punctuation.delimiter.comma.ebnf",
42
+ "match": ","
43
+ },
121
44
  {
122
- "include": "#subrules"
123
- }
124
- ],
125
- "beginCaptures": {
126
- "0": {
127
- "name": "keyword.other.repetition.begin.ebnf"
128
- }
129
- },
130
- "endCaptures": {
131
- "0": {
132
- "name": "keyword.other.repetition.end.ebnf"
133
- }
134
- }
135
- },
136
- "repetition-numbered": {
137
- "match": "(\\d+)\\s*(\\*)",
138
- "captures": {
139
- "1": {
140
- "name": "constant.numeric.integer.ebnf"
45
+ "name": "keyword.operator.logical.or.alternation.pipe.ebnf",
46
+ "match": "\\|"
141
47
  },
142
- "2": {
143
- "name": "keyword.operator.repetition.ebnf"
144
- }
145
- }
146
- },
147
- "single-quote-string": {
148
- "name": "string.quoted.single.ebnf",
149
- "begin": "'",
150
- "end": "'"
151
- },
152
- "special-sequence": {
153
- "name": "entity.other.attribute-name.ebnf",
154
- "begin": "\\?",
155
- "end": "\\?",
156
- "beginCaptures": {
157
- "0": {
158
- "name": "keyword.other.special-sequence.begin.ebnf"
159
- }
160
- },
161
- "endCaptures": {
162
- "0": {
163
- "name": "keyword.other.special-sequence.end.ebnf"
164
- }
165
- }
166
- },
167
- "subrules": {
168
- "patterns": [
169
48
  {
170
- "include": "#invalid"
49
+ "name": "keyword.operator.logical.minus.hyphen.exception.ebnf",
50
+ "match": "-"
171
51
  },
172
52
  {
173
- "include": "#optional"
53
+ "name": "keyword.operator.logical.repetition.asterisk.star.ebnf",
54
+ "match": "\\*"
174
55
  },
175
56
  {
176
- "include": "#repetition"
57
+ "include": "#special"
177
58
  },
178
59
  {
179
- "include": "#group"
60
+ "name": "string.quoted.double.ebnf",
61
+ "begin": "\"",
62
+ "end": "\"",
63
+ "beginCaptures": {
64
+ "0": {
65
+ "name": "punctuation.definition.string.begin.ebnf"
66
+ }
67
+ },
68
+ "endCaptures": {
69
+ "0": {
70
+ "name": "punctuation.definition.string.end.ebnf"
71
+ }
72
+ }
180
73
  },
181
74
  {
182
- "include": "#repetition-numbered"
75
+ "name": "string.quoted.single.ebnf",
76
+ "begin": "'",
77
+ "end": "'",
78
+ "beginCaptures": {
79
+ "0": {
80
+ "name": "punctuation.definition.string.begin.ebnf"
81
+ }
82
+ },
83
+ "endCaptures": {
84
+ "0": {
85
+ "name": "punctuation.definition.string.end.ebnf"
86
+ }
87
+ }
183
88
  },
184
89
  {
185
- "include": "#non-terminal"
90
+ "name": "meta.optional.ebnf",
91
+ "begin": "\\[",
92
+ "end": "\\]",
93
+ "patterns": [
94
+ {
95
+ "include": "#rhs"
96
+ }
97
+ ],
98
+ "beginCaptures": {
99
+ "0": {
100
+ "name": "punctuation.definition.square.bracket.begin.ebnf"
101
+ }
102
+ },
103
+ "endCaptures": {
104
+ "0": {
105
+ "name": "punctuation.definition.square.bracket.end.ebnf"
106
+ }
107
+ }
186
108
  },
187
109
  {
188
- "include": "#operator"
110
+ "name": "meta.repetition.ebnf",
111
+ "begin": "{",
112
+ "end": "}",
113
+ "patterns": [
114
+ {
115
+ "include": "#rhs"
116
+ }
117
+ ],
118
+ "beginCaptures": {
119
+ "0": {
120
+ "name": "punctuation.definition.curly.bracket.begin.ebnf"
121
+ }
122
+ },
123
+ "endCaptures": {
124
+ "0": {
125
+ "name": "punctuation.definition.curly.bracket.end.ebnf"
126
+ }
127
+ }
189
128
  },
190
129
  {
191
- "include": "#single-quote-string"
130
+ "name": "meta.group.ebnf",
131
+ "begin": "\\(",
132
+ "end": "\\)",
133
+ "patterns": [
134
+ {
135
+ "include": "#rhs"
136
+ }
137
+ ],
138
+ "beginCaptures": {
139
+ "0": {
140
+ "name": "punctuation.definition.round.bracket.begin.ebnf"
141
+ }
142
+ },
143
+ "endCaptures": {
144
+ "0": {
145
+ "name": "punctuation.definition.round.bracket.end.ebnf"
146
+ }
147
+ }
192
148
  },
193
149
  {
194
- "include": "#double-quote-string"
150
+ "include": "#comment"
195
151
  },
196
152
  {
197
- "include": "#special-sequence"
153
+ "name": "variable.parameter.argument.identifier.reference.ebnf",
154
+ "match": "[A-Za-z][A-Za-z0-9_]*"
198
155
  }
199
156
  ]
157
+ },
158
+ "rule": {
159
+ "begin": "(?=[A-Za-z][A-Za-z0-9_]*)",
160
+ "end": ";",
161
+ "patterns": [
162
+ {
163
+ "name": "meta.lhs.ebnf",
164
+ "begin": "\\G",
165
+ "end": "(?=[=;])",
166
+ "patterns": [
167
+ {
168
+ "name": "entity.name.rule.identifier.ebnf",
169
+ "match": "[A-Za-z][A-Za-z0-9_]*"
170
+ }
171
+ ]
172
+ },
173
+ {
174
+ "name": "meta.rhs.ebnf",
175
+ "begin": "=",
176
+ "end": "(?=;)",
177
+ "patterns": [
178
+ {
179
+ "include": "#rhs"
180
+ }
181
+ ],
182
+ "beginCaptures": {
183
+ "0": {
184
+ "name": "keyword.operator.assignment.ebnf"
185
+ }
186
+ }
187
+ }
188
+ ],
189
+ "endCaptures": {
190
+ "0": {
191
+ "name": "punctuation.terminator.statement.ebnf"
192
+ }
193
+ }
194
+ },
195
+ "special": {
196
+ "name": "meta.pragma.directive.special.ebnf",
197
+ "contentName": "support.constant.language.pragma.ebnf",
198
+ "begin": "\\?",
199
+ "end": "\\?",
200
+ "beginCaptures": {
201
+ "0": {
202
+ "name": "keyword.operator.pragma.begin.ebnf"
203
+ }
204
+ },
205
+ "endCaptures": {
206
+ "0": {
207
+ "name": "keyword.operator.pragma.end.ebnf"
208
+ }
209
+ }
200
210
  }
201
211
  }
202
212
  }