github-linguist 6.4.1 → 7.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/bin/{linguist → github-linguist} +0 -0
- data/grammars/source.abap.json +35 -6
- data/grammars/source.apl.json +4 -8
- data/grammars/source.ballerina.json +82 -3
- data/grammars/source.bdf.json +419 -0
- data/grammars/source.c++.json +25 -3
- data/grammars/source.c.json +6 -3
- data/grammars/source.chapel.json +3 -3
- data/grammars/source.coq.json +2 -2
- data/grammars/source.cs.json +83 -73
- data/grammars/source.csound.json +1 -1
- data/grammars/source.dart.json +1 -1
- data/grammars/source.elixir.json +112 -137
- data/grammars/source.emacs.lisp.json +179 -4
- data/grammars/source.figctrl.json +252 -0
- data/grammars/source.figfont.json +121 -0
- data/grammars/source.fontdir.json +99 -0
- data/grammars/source.fstar.json +439 -0
- data/grammars/source.hx.json +27 -9
- data/grammars/source.j.json +260 -0
- data/grammars/source.julia.json +24 -12
- data/grammars/source.lisp.json +3 -3
- data/grammars/source.mupad.json +1 -1
- data/grammars/source.pony.json +3 -3
- data/grammars/source.powershell.json +2 -2
- data/grammars/source.protobuf.json +87 -5
- data/grammars/source.purescript.json +5 -2
- data/grammars/source.python.json +17 -12
- data/grammars/source.rascal.json +0 -1
- data/grammars/source.reg.json +159 -0
- data/grammars/source.slice.json +2755 -0
- data/grammars/source.solidity.json +2 -2
- data/grammars/source.ts.json +225 -132
- data/grammars/source.tsx.json +235 -142
- data/grammars/source.viml.json +4 -4
- data/grammars/source.xlfd.json +462 -0
- data/grammars/source.yasnippet.json +387 -0
- data/grammars/text.elixir.json +17 -5
- data/grammars/text.html.basic.json +622 -2264
- data/grammars/text.html.elixir.json +10 -1
- data/grammars/text.html.php.blade.json +7 -3
- data/grammars/version +1 -0
- data/lib/linguist.rb +2 -0
- data/lib/linguist/VERSION +1 -1
- data/lib/linguist/generated.rb +14 -1
- data/lib/linguist/heuristics.rb +77 -468
- data/lib/linguist/heuristics.yml +404 -0
- data/lib/linguist/languages.json +1 -1
- data/lib/linguist/languages.yml +86 -6
- data/lib/linguist/samples.json +2624 -483
- data/lib/linguist/strategy/xml.rb +30 -0
- metadata +20 -7
@@ -0,0 +1,252 @@
|
|
1
|
+
{
|
2
|
+
"name": "FIGlet Control File",
|
3
|
+
"scopeName": "source.figctrl",
|
4
|
+
"patterns": [
|
5
|
+
{
|
6
|
+
"name": "keyword.control.file.signature.figctrl",
|
7
|
+
"match": "\\Aflc2a(?=\\s|$)"
|
8
|
+
},
|
9
|
+
{
|
10
|
+
"include": "#main"
|
11
|
+
}
|
12
|
+
],
|
13
|
+
"repository": {
|
14
|
+
"char": {
|
15
|
+
"patterns": [
|
16
|
+
{
|
17
|
+
"name": "constant.character.escape.figctrl",
|
18
|
+
"match": "(\\\\)[ abefnrtv\\\\]",
|
19
|
+
"captures": {
|
20
|
+
"1": {
|
21
|
+
"name": "punctuation.definition.escape.backslash.figctrl"
|
22
|
+
}
|
23
|
+
}
|
24
|
+
},
|
25
|
+
{
|
26
|
+
"name": "constant.character.escape.codepoint.figctrl",
|
27
|
+
"match": "(\\\\)[-+]?(?:0[Xx][A-Fa-f0-9]*|[0-9]+)",
|
28
|
+
"captures": {
|
29
|
+
"1": {
|
30
|
+
"name": "punctuation.definition.escape.backslash.figctrl"
|
31
|
+
}
|
32
|
+
}
|
33
|
+
},
|
34
|
+
{
|
35
|
+
"name": "string.unquoted.character.literal.figctrl",
|
36
|
+
"match": "[^\\s\\\\]"
|
37
|
+
}
|
38
|
+
]
|
39
|
+
},
|
40
|
+
"comment": {
|
41
|
+
"name": "comment.line.number-sign.figctrl",
|
42
|
+
"begin": "^#",
|
43
|
+
"end": "$",
|
44
|
+
"beginCaptures": {
|
45
|
+
"0": {
|
46
|
+
"name": "punctuation.definition.comment.figctrl"
|
47
|
+
}
|
48
|
+
}
|
49
|
+
},
|
50
|
+
"extendedCommands": {
|
51
|
+
"patterns": [
|
52
|
+
{
|
53
|
+
"name": "meta.extended.command.input-encoding.figctrl",
|
54
|
+
"begin": "^[bfhju]",
|
55
|
+
"end": "$",
|
56
|
+
"patterns": [
|
57
|
+
{
|
58
|
+
"include": "#invalidArgument"
|
59
|
+
}
|
60
|
+
],
|
61
|
+
"beginCaptures": {
|
62
|
+
"0": {
|
63
|
+
"name": "keyword.operator.command.figctrl"
|
64
|
+
}
|
65
|
+
}
|
66
|
+
},
|
67
|
+
{
|
68
|
+
"name": "meta.extended.command.input-encoding.figctrl",
|
69
|
+
"begin": "^g",
|
70
|
+
"end": "$",
|
71
|
+
"patterns": [
|
72
|
+
{
|
73
|
+
"match": "\\G\\s*(L|R)\\s*([0-3])?",
|
74
|
+
"captures": {
|
75
|
+
"1": {
|
76
|
+
"name": "storage.type.var.byte-half.figctrl"
|
77
|
+
},
|
78
|
+
"2": {
|
79
|
+
"name": "constant.numeric.decimal.integer.int.figctrl"
|
80
|
+
}
|
81
|
+
}
|
82
|
+
},
|
83
|
+
{
|
84
|
+
"match": "\\G\\s*([0-3])(?:\\s*(94x94|94|96)\\s*(\\\\ |\\S+))?",
|
85
|
+
"captures": {
|
86
|
+
"1": {
|
87
|
+
"name": "constant.numeric.decimal.integer.int.figctrl"
|
88
|
+
},
|
89
|
+
"2": {
|
90
|
+
"name": "constant.language.size.figctrl"
|
91
|
+
},
|
92
|
+
"3": {
|
93
|
+
"patterns": [
|
94
|
+
{
|
95
|
+
"include": "#char"
|
96
|
+
}
|
97
|
+
]
|
98
|
+
}
|
99
|
+
}
|
100
|
+
},
|
101
|
+
{
|
102
|
+
"include": "#invalidArgument"
|
103
|
+
}
|
104
|
+
],
|
105
|
+
"beginCaptures": {
|
106
|
+
"0": {
|
107
|
+
"name": "keyword.operator.command.figctrl"
|
108
|
+
}
|
109
|
+
}
|
110
|
+
}
|
111
|
+
]
|
112
|
+
},
|
113
|
+
"invalidArgument": {
|
114
|
+
"name": "invalid.illegal.unexpected-argument.figctrl",
|
115
|
+
"match": "\\S+"
|
116
|
+
},
|
117
|
+
"main": {
|
118
|
+
"patterns": [
|
119
|
+
{
|
120
|
+
"include": "#comment"
|
121
|
+
},
|
122
|
+
{
|
123
|
+
"include": "#transform"
|
124
|
+
},
|
125
|
+
{
|
126
|
+
"include": "#extendedCommands"
|
127
|
+
},
|
128
|
+
{
|
129
|
+
"include": "#transformArgs"
|
130
|
+
}
|
131
|
+
]
|
132
|
+
},
|
133
|
+
"number": {
|
134
|
+
"patterns": [
|
135
|
+
{
|
136
|
+
"name": "constant.numeric.hexadecimal.hex.integer.int.figctrl",
|
137
|
+
"match": "[-+]?0[Xx][0-9A-Fa-f]*"
|
138
|
+
},
|
139
|
+
{
|
140
|
+
"name": "constant.numeric.decimal.integer.int.figctrl",
|
141
|
+
"match": "[-+]?[0-9]+"
|
142
|
+
}
|
143
|
+
]
|
144
|
+
},
|
145
|
+
"transform": {
|
146
|
+
"name": "meta.transform.command.figctrl",
|
147
|
+
"begin": "^t",
|
148
|
+
"end": "$",
|
149
|
+
"patterns": [
|
150
|
+
{
|
151
|
+
"include": "#transformArgs"
|
152
|
+
}
|
153
|
+
],
|
154
|
+
"beginCaptures": {
|
155
|
+
"0": {
|
156
|
+
"name": "keyword.operator.command.figctrl"
|
157
|
+
}
|
158
|
+
}
|
159
|
+
},
|
160
|
+
"transformArgs": {
|
161
|
+
"name": "meta.transform.arguments.figctrl",
|
162
|
+
"match": "(?x)\n(?:^|\\G) \\s*\n\n# 1: meta.transform.argument.from.figctrl\n(\n\t(?:\n\t\t# 2: include: “#number”\n\t\t([-+]?0[Xx][0-9A-Fa-f]*|[-+]?[0-9]+)\n\t\t|\n\t\t# 3: include: “#char”\n\t\t(\\\\[ ]|(?:\\\\-)?[^-\\s]+)\n\t)\n\t(?:\n\t\t# 4: punctuation.separator.dash.range.figctrl\n\t\t(-)\n\t\t\n\t\t(?:\n\t\t\t# 5: include: “#number”\n\t\t\t([-+]?0[Xx][0-9A-Fa-f]*|[-+]?[0-9]+)\n\t\t\t|\n\t\t\t# 6: include: “#char”\n\t\t\t(\\\\[ ]|(?:\\\\-)?[^-\\s]+)\n\t\t)\n\t)?\n)\n\n\\s+\n\n# 7: meta.transform.argument.to.figctrl\n(\n\t(?:\n\t\t# 8: include: “#number”\n\t\t([-+]?0[Xx][0-9A-Fa-f]*|[-+]?[0-9]+)\n\t\t|\n\t\t# 9: include: “#char”\n\t\t(\\\\[ ]|(?:\\\\-)?[^-\\s]+)\n\t)\n\t(?:\n\t\t# 10: punctuation.separator.dash.range.figctrl\n\t\t(-)\n\t\t\n\t\t(?:\n\t\t\t# 11: include: “#number”\n\t\t\t([-+]?0[Xx][0-9A-Fa-f]*|[-+]?[0-9]+)\n\t\t\t|\n\t\t\t# 12: include: “#char”\n\t\t\t(\\\\[ ]|(?:\\\\-)?[^-\\s]+)\n\t\t)\n\t)?\n)\n\n# 13: Possible trailing comment\n(\\s+\\S.*)?",
|
163
|
+
"captures": {
|
164
|
+
"1": {
|
165
|
+
"name": "meta.transform.argument.from.figctrl"
|
166
|
+
},
|
167
|
+
"10": {
|
168
|
+
"name": "punctuation.separator.dash.range.figctrl"
|
169
|
+
},
|
170
|
+
"11": {
|
171
|
+
"patterns": [
|
172
|
+
{
|
173
|
+
"include": "#number"
|
174
|
+
}
|
175
|
+
]
|
176
|
+
},
|
177
|
+
"12": {
|
178
|
+
"patterns": [
|
179
|
+
{
|
180
|
+
"include": "#char"
|
181
|
+
}
|
182
|
+
]
|
183
|
+
},
|
184
|
+
"13": {
|
185
|
+
"patterns": [
|
186
|
+
{
|
187
|
+
"name": "comment.line.number-sign.figctrl",
|
188
|
+
"match": "(#).*",
|
189
|
+
"captures": {
|
190
|
+
"1": {
|
191
|
+
"name": "punctuation.definition.comment.figctrl"
|
192
|
+
}
|
193
|
+
}
|
194
|
+
},
|
195
|
+
{
|
196
|
+
"name": "comment.line.implicit.figctrl",
|
197
|
+
"match": "[^\\s#].*"
|
198
|
+
}
|
199
|
+
]
|
200
|
+
},
|
201
|
+
"2": {
|
202
|
+
"patterns": [
|
203
|
+
{
|
204
|
+
"include": "#number"
|
205
|
+
}
|
206
|
+
]
|
207
|
+
},
|
208
|
+
"3": {
|
209
|
+
"patterns": [
|
210
|
+
{
|
211
|
+
"include": "#char"
|
212
|
+
}
|
213
|
+
]
|
214
|
+
},
|
215
|
+
"4": {
|
216
|
+
"name": "punctuation.separator.dash.range.figctrl"
|
217
|
+
},
|
218
|
+
"5": {
|
219
|
+
"patterns": [
|
220
|
+
{
|
221
|
+
"include": "#number"
|
222
|
+
}
|
223
|
+
]
|
224
|
+
},
|
225
|
+
"6": {
|
226
|
+
"patterns": [
|
227
|
+
{
|
228
|
+
"include": "#char"
|
229
|
+
}
|
230
|
+
]
|
231
|
+
},
|
232
|
+
"7": {
|
233
|
+
"name": "meta.transform.argument.to.figctrl"
|
234
|
+
},
|
235
|
+
"8": {
|
236
|
+
"patterns": [
|
237
|
+
{
|
238
|
+
"include": "#number"
|
239
|
+
}
|
240
|
+
]
|
241
|
+
},
|
242
|
+
"9": {
|
243
|
+
"patterns": [
|
244
|
+
{
|
245
|
+
"include": "#char"
|
246
|
+
}
|
247
|
+
]
|
248
|
+
}
|
249
|
+
}
|
250
|
+
}
|
251
|
+
}
|
252
|
+
}
|
@@ -0,0 +1,121 @@
|
|
1
|
+
{
|
2
|
+
"name": "FIGlet Font",
|
3
|
+
"scopeName": "source.figfont",
|
4
|
+
"patterns": [
|
5
|
+
{
|
6
|
+
"include": "#main"
|
7
|
+
}
|
8
|
+
],
|
9
|
+
"repository": {
|
10
|
+
"codeTag": {
|
11
|
+
"name": "meta.code-tag.figfont",
|
12
|
+
"match": "(?x) ^(?!.+[@#]$)\n( (-(?:0[Xx])?0*1)(?=\\s|$) # Invalid -1\n| (\\+?(?:[1-9][0-9]*|0(?=\\s|$))) # Decimal\n| (\\+?0[0-7]+) # Octal\n| (\\+?0[Xx][0-9A-Fa-f]+) # Hex\n)\n(?:\\s+(\\S.*))?\n(?=\\s*$)",
|
13
|
+
"captures": {
|
14
|
+
"1": {
|
15
|
+
"name": "meta.codepoint.figfont"
|
16
|
+
},
|
17
|
+
"2": {
|
18
|
+
"name": "invalid.illegal.reserved-codepoint.figfont"
|
19
|
+
},
|
20
|
+
"3": {
|
21
|
+
"name": "constant.numeric.decimal.integer.int.figfont"
|
22
|
+
},
|
23
|
+
"4": {
|
24
|
+
"name": "constant.numeric.octal.integer.int.figfont"
|
25
|
+
},
|
26
|
+
"5": {
|
27
|
+
"name": "constant.numeric.hexadecimal.hex.integer.int.figfont"
|
28
|
+
},
|
29
|
+
"6": {
|
30
|
+
"name": "string.unquoted.description.figfont"
|
31
|
+
}
|
32
|
+
}
|
33
|
+
},
|
34
|
+
"codeTagTable": {
|
35
|
+
"name": "meta.translation-table.figfont",
|
36
|
+
"contentName": "string.interpolated.code-tag.figfont",
|
37
|
+
"begin": "(?x) ^(?!.+[@#]$)\n( (-(?:[1-9][0-9]*|0(?=\\s|$))) # Decimal\n| (-0[0-7]+) # Octal\n| (-0[Xx][0-9A-Fa-f]+) # Hex\n)\n(?:\\s+(\\S.*))?\n\\s*$\\n?",
|
38
|
+
"end": "(?\u003c=@@|##)[ \\t]*$",
|
39
|
+
"patterns": [
|
40
|
+
{
|
41
|
+
"include": "#endmarks"
|
42
|
+
}
|
43
|
+
],
|
44
|
+
"beginCaptures": {
|
45
|
+
"0": {
|
46
|
+
"name": "meta.code-tag.figfont"
|
47
|
+
},
|
48
|
+
"1": {
|
49
|
+
"name": "meta.negative.codepoint.figfont"
|
50
|
+
},
|
51
|
+
"2": {
|
52
|
+
"name": "constant.numeric.decimal.integer.int.figfont"
|
53
|
+
},
|
54
|
+
"3": {
|
55
|
+
"name": "constant.numeric.octal.integer.int.figfont"
|
56
|
+
},
|
57
|
+
"4": {
|
58
|
+
"name": "constant.numeric.hexadecimal.hex.integer.int.figfont"
|
59
|
+
},
|
60
|
+
"5": {
|
61
|
+
"name": "string.unquoted.description.figfont"
|
62
|
+
}
|
63
|
+
}
|
64
|
+
},
|
65
|
+
"endmarks": {
|
66
|
+
"name": "keyword.operator.endmark.character.figfont",
|
67
|
+
"match": "(?:@+|#+)[ \\t]*$"
|
68
|
+
},
|
69
|
+
"fontData": {
|
70
|
+
"name": "constant.character.sub-character.figfont",
|
71
|
+
"match": "[^#@\\s]+|#+(?!#*[ \\t]*$)|@+(?!@*[ \\t]*$)"
|
72
|
+
},
|
73
|
+
"integer": {
|
74
|
+
"name": "constant.numeric.decimal.integer.int.figfont",
|
75
|
+
"match": "[-+]?[0-9]+"
|
76
|
+
},
|
77
|
+
"main": {
|
78
|
+
"patterns": [
|
79
|
+
{
|
80
|
+
"include": "#prologue"
|
81
|
+
},
|
82
|
+
{
|
83
|
+
"include": "#codeTag"
|
84
|
+
},
|
85
|
+
{
|
86
|
+
"include": "#codeTagTable"
|
87
|
+
},
|
88
|
+
{
|
89
|
+
"include": "#fontData"
|
90
|
+
},
|
91
|
+
{
|
92
|
+
"include": "#endmarks"
|
93
|
+
}
|
94
|
+
]
|
95
|
+
},
|
96
|
+
"prologue": {
|
97
|
+
"name": "meta.prologue.figfont",
|
98
|
+
"contentName": "comment.block.freeform.figfont",
|
99
|
+
"begin": "^([ft]lf2a)(\\S|\\x7F)(\\s+.+)?\\s*$",
|
100
|
+
"end": "^\\s*(?=\\2(?!.*(?i:hard\\W?blank))|.{0,6}[#@]\\s*$)",
|
101
|
+
"beginCaptures": {
|
102
|
+
"0": {
|
103
|
+
"name": "meta.header-line.figfont"
|
104
|
+
},
|
105
|
+
"1": {
|
106
|
+
"name": "keyword.control.file.signature.figfont"
|
107
|
+
},
|
108
|
+
"2": {
|
109
|
+
"name": "variable.parameter.hardblank.figfont"
|
110
|
+
},
|
111
|
+
"3": {
|
112
|
+
"patterns": [
|
113
|
+
{
|
114
|
+
"include": "#integer"
|
115
|
+
}
|
116
|
+
]
|
117
|
+
}
|
118
|
+
}
|
119
|
+
}
|
120
|
+
}
|
121
|
+
}
|
@@ -0,0 +1,99 @@
|
|
1
|
+
{
|
2
|
+
"name": "X Font Directory Index",
|
3
|
+
"scopeName": "source.fontdir",
|
4
|
+
"patterns": [
|
5
|
+
{
|
6
|
+
"include": "#main"
|
7
|
+
}
|
8
|
+
],
|
9
|
+
"repository": {
|
10
|
+
"comment": {
|
11
|
+
"name": "comment.line.bang.exclamation-mark.fontdir",
|
12
|
+
"begin": "^!",
|
13
|
+
"end": "(?=$)",
|
14
|
+
"beginCaptures": {
|
15
|
+
"0": {
|
16
|
+
"name": "punctuation.definition.comment.fontdir"
|
17
|
+
}
|
18
|
+
}
|
19
|
+
},
|
20
|
+
"entryCount": {
|
21
|
+
"name": "constant.numeric.integer.int.decimal.fontdir",
|
22
|
+
"match": "\\A([0-9]+)(?=\\s|$)"
|
23
|
+
},
|
24
|
+
"entryName": {
|
25
|
+
"patterns": [
|
26
|
+
{
|
27
|
+
"include": "#string"
|
28
|
+
},
|
29
|
+
{
|
30
|
+
"name": "string.unquoted.font-name.fontdir",
|
31
|
+
"match": "^(?:[^-\\s]|\\s(?!-|\\S+$)|(?\u003c!\\s)-)+"
|
32
|
+
}
|
33
|
+
]
|
34
|
+
},
|
35
|
+
"keywords": {
|
36
|
+
"name": "keyword.control.directive.font-name-aliases.fontdir",
|
37
|
+
"match": "^(FILE_NAMES_ALIASES)(?=\\s|$)"
|
38
|
+
},
|
39
|
+
"main": {
|
40
|
+
"patterns": [
|
41
|
+
{
|
42
|
+
"include": "#comment"
|
43
|
+
},
|
44
|
+
{
|
45
|
+
"include": "#keywords"
|
46
|
+
},
|
47
|
+
{
|
48
|
+
"include": "#entryCount"
|
49
|
+
},
|
50
|
+
{
|
51
|
+
"include": "#entryName"
|
52
|
+
},
|
53
|
+
{
|
54
|
+
"include": "source.xlfd#name"
|
55
|
+
},
|
56
|
+
{
|
57
|
+
"include": "#otherField"
|
58
|
+
}
|
59
|
+
]
|
60
|
+
},
|
61
|
+
"otherField": {
|
62
|
+
"patterns": [
|
63
|
+
{
|
64
|
+
"include": "#string"
|
65
|
+
},
|
66
|
+
{
|
67
|
+
"name": "constant.language.other.fontdir",
|
68
|
+
"match": "(?\u003c=\\s)\\S+$"
|
69
|
+
}
|
70
|
+
]
|
71
|
+
},
|
72
|
+
"string": {
|
73
|
+
"name": "string.quoted.double.font-name.fontdir",
|
74
|
+
"begin": "\"",
|
75
|
+
"end": "\"|(?=$)",
|
76
|
+
"patterns": [
|
77
|
+
{
|
78
|
+
"name": "constant.character.escape.backslash.fontdir",
|
79
|
+
"match": "(\\\\).",
|
80
|
+
"captures": {
|
81
|
+
"1": {
|
82
|
+
"name": "punctuation.definition.escape.backslash.fontdir"
|
83
|
+
}
|
84
|
+
}
|
85
|
+
}
|
86
|
+
],
|
87
|
+
"beginCaptures": {
|
88
|
+
"0": {
|
89
|
+
"name": "punctuation.definition.string.begin.fontdir"
|
90
|
+
}
|
91
|
+
},
|
92
|
+
"endCaptures": {
|
93
|
+
"0": {
|
94
|
+
"name": "punctuation.definition.string.end.fontdir"
|
95
|
+
}
|
96
|
+
}
|
97
|
+
}
|
98
|
+
}
|
99
|
+
}
|