github-linguist 5.0.0 → 5.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/bin/git-linguist +10 -2
  3. data/bin/linguist +26 -9
  4. data/grammars/config.xcompose.json +83 -0
  5. data/grammars/hint.haskell.json +21 -30
  6. data/grammars/hint.message.haskell.json +21 -30
  7. data/grammars/hint.type.haskell.json +21 -30
  8. data/grammars/source.bsl.json +42 -28
  9. data/grammars/source.cs.json +656 -131
  10. data/grammars/source.csound-document.json +142 -25
  11. data/grammars/source.csound-score.json +13 -10
  12. data/grammars/source.csound.json +136 -81
  13. data/grammars/source.css.json +1501 -331
  14. data/grammars/source.css.less.json +3 -3
  15. data/grammars/source.d.json +60 -44
  16. data/grammars/source.gn.json +240 -138
  17. data/grammars/source.graphql.json +781 -155
  18. data/grammars/source.haskell.json +21 -30
  19. data/grammars/source.js.json +46 -46
  20. data/grammars/source.mask.json +1 -1
  21. data/grammars/source.perl6fe.json +1151 -763
  22. data/grammars/source.python.json +45 -23
  23. data/grammars/source.quoting.perl6fe.json +2170 -0
  24. data/grammars/source.reason.json +296 -0
  25. data/grammars/source.regexp.perl6fe.json +27 -0
  26. data/grammars/source.rust.json +522 -125
  27. data/grammars/source.sdbl.json +2 -2
  28. data/grammars/source.shell.json +125 -161
  29. data/grammars/source.solidity.json +137 -0
  30. data/grammars/source.ts.json +385 -137
  31. data/grammars/source.tsx.json +394 -167
  32. data/grammars/source.yaml.json +176 -171
  33. data/grammars/text.html.php.blade.json +2 -2
  34. data/grammars/text.tex.latex.haskell.json +1 -10
  35. data/lib/linguist/generated.rb +50 -4
  36. data/lib/linguist/heuristics.rb +1 -1
  37. data/lib/linguist/language.rb +12 -8
  38. data/lib/linguist/languages.json +1 -1
  39. data/lib/linguist/languages.yml +38 -1
  40. data/lib/linguist/samples.json +4605 -581
  41. data/lib/linguist/vendor.yml +6 -0
  42. data/lib/linguist/version.rb +1 -1
  43. metadata +10 -7
  44. data/grammars/source.hy.json +0 -270
@@ -19,6 +19,9 @@
19
19
  {
20
20
  "include": "#erb"
21
21
  },
22
+ {
23
+ "include": "#comment"
24
+ },
22
25
  {
23
26
  "match": "\\t+",
24
27
  "name": "invalid.illegal.whitespace.yaml"
@@ -28,7 +31,7 @@
28
31
  "name": "punctuation.definition.directives.end.yaml"
29
32
  },
30
33
  {
31
- "begin": "^(\\s*)(?!-\\s*)(\\S+\\s*(:))\\s*(?=\\||>)",
34
+ "begin": "^(\\s*)(?!-\\s*)(\\S+)\\s*(:)\\s*(?=\\||>)",
32
35
  "beginCaptures": {
33
36
  "2": {
34
37
  "name": "entity.name.tag.yaml"
@@ -49,7 +52,7 @@
49
52
  ]
50
53
  },
51
54
  {
52
- "begin": "^(\\s*)(?:(-)|(?:(?:(-)\\s*)?(\\S+\\s*(:))))\\s*(?=\\||>)",
55
+ "begin": "^(\\s*)(?:(-)|(?:(?:(-)\\s*)?(\\S+)\\s*(:)))\\s*(?=\\||>)",
53
56
  "beginCaptures": {
54
57
  "2": {
55
58
  "name": "punctuation.definition.entry.yaml"
@@ -76,27 +79,25 @@
76
79
  ]
77
80
  },
78
81
  {
82
+ "match": "(<<)\\s*(:)\\s+(.+)$",
79
83
  "captures": {
80
84
  "1": {
81
- "name": "punctuation.definition.entry.yaml"
85
+ "name": "entity.name.tag.merge.yaml"
82
86
  },
83
87
  "2": {
84
- "name": "entity.name.tag.yaml"
85
- },
86
- "3": {
87
88
  "name": "punctuation.separator.key-value.yaml"
88
89
  },
89
- "4": {
90
- "name": "punctuation.definition.entry.yaml"
91
- },
92
- "5": {
93
- "name": "constant.numeric.yaml"
90
+ "3": {
91
+ "patterns": [
92
+ {
93
+ "include": "#variables"
94
+ }
95
+ ]
94
96
  }
95
- },
96
- "match": "(?:(?:(?:(-)\\s*)?([^\\s#'\"][^#'\"]*?(:)(?=\\s)))|(-))\\s*(((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f)?)\\s*($|(?=#)(?!#{))"
97
+ }
97
98
  },
98
99
  {
99
- "begin": "(?:(?:(?:(-)\\s*)?([^\\s#'\"][^#'\"]*?(:)(?=\\s)))|(-))[ ]*",
100
+ "begin": "(?>^\\s*(-)?\\s*)([^!{@#%&*>,'\"][^#'\"]*?)(:)\\s+((!!)omap)?",
100
101
  "beginCaptures": {
101
102
  "1": {
102
103
  "name": "punctuation.definition.entry.yaml"
@@ -108,184 +109,117 @@
108
109
  "name": "punctuation.separator.key-value.yaml"
109
110
  },
110
111
  "4": {
111
- "name": "punctuation.definition.entry.yaml"
112
+ "name": "keyword.other.omap.yaml"
113
+ },
114
+ "5": {
115
+ "name": "punctuation.definition.tag.omap.yaml"
112
116
  }
113
117
  },
114
- "end": "(?=^\\s*(-|[^!@#%&*>,].*:))",
118
+ "end": "(?=^\\s*(-|[^!{@#%&*>,].*:\\s+))",
115
119
  "patterns": [
116
120
  {
117
- "match": "(?<=^|\\s)((#(?!{)).*)",
118
- "captures": {
119
- "1": {
120
- "name": "comment.line.number-sign.yaml"
121
- },
122
- "2": {
123
- "name": "punctuation.definition.comment.yaml"
124
- }
125
- }
126
- },
127
- {
128
- "match": "\\!\\s*",
129
- "name": "string.unquoted.yaml"
130
- },
131
- {
132
- "include": "#constants"
133
- },
134
- {
135
- "include": "#double_quoted_string"
136
- },
137
- {
138
- "include": "#single_quoted_string"
139
- },
140
- {
141
- "match": "[^\"'\\n](?!#(?!{))([^#\\n]|((?<!\\s)#))*",
142
- "name": "string.unquoted.yaml"
121
+ "include": "#scalar-content"
143
122
  }
144
123
  ]
145
124
  },
146
125
  {
147
- "captures": {
126
+ "begin": "(-)?\\s*(?:((')([^']*?)('))|((\")([^\"]*?)(\")))(:)\\s+((!!)omap)?",
127
+ "beginCaptures": {
148
128
  "1": {
149
129
  "name": "punctuation.definition.entry.yaml"
150
130
  },
151
131
  "2": {
152
- "name": "entity.name.tag.yaml"
132
+ "name": "string.quoted.single.yaml"
153
133
  },
154
134
  "3": {
155
- "name": "punctuation.separator.key-value.yaml"
135
+ "name": "punctuation.definition.string.begin.yaml"
156
136
  },
157
137
  "4": {
158
- "name": "punctuation.definition.entry.yaml"
159
- }
160
- },
161
- "match": "(?:(?:(-\\s*)?(\\w+\\s*(:)))|(-))\\s*([0-9]{4}-[0-9]{2}-[0-9]{2})\\s*($|(?=#)(?!#\\{))",
162
- "name": "constant.other.date.yaml"
163
- },
164
- {
165
- "captures": {
166
- "1": {
167
138
  "name": "entity.name.tag.yaml"
168
139
  },
169
- "2": {
170
- "name": "punctuation.separator.key-value.yaml"
140
+ "5": {
141
+ "name": "punctuation.definition.string.end.yaml"
171
142
  },
172
- "3": {
173
- "name": "keyword.other.omap.yaml"
143
+ "6": {
144
+ "name": "string.quoted.double.yaml"
174
145
  },
175
- "4": {
176
- "name": "punctuation.definition.keyword.yaml"
177
- }
178
- },
179
- "match": "(\\w.*?)(:)\\s*((\\!\\!)omap)?",
180
- "name": "meta.tag.yaml"
181
- },
182
- {
183
- "captures": {
184
- "1": {
185
- "name": "punctuation.definition.variable.yaml"
186
- }
187
- },
188
- "match": "(\\&|\\*)\\w.*?$",
189
- "name": "variable.other.yaml"
190
- },
191
- {
192
- "include": "#double_quoted_string"
193
- },
194
- {
195
- "include": "#single_quoted_string"
196
- },
197
- {
198
- "begin": "`",
199
- "beginCaptures": {
200
- "0": {
146
+ "7": {
201
147
  "name": "punctuation.definition.string.begin.yaml"
202
- }
203
- },
204
- "end": "`",
205
- "endCaptures": {
206
- "0": {
148
+ },
149
+ "8": {
150
+ "name": "entity.name.tag.yaml"
151
+ },
152
+ "9": {
207
153
  "name": "punctuation.definition.string.end.yaml"
154
+ },
155
+ "10": {
156
+ "name": "punctuation.separator.key-value.yaml"
157
+ },
158
+ "11": {
159
+ "name": "keyword.other.omap.yaml"
160
+ },
161
+ "12": {
162
+ "name": "punctuation.definition.tag.omap.yaml"
208
163
  }
209
164
  },
210
- "name": "string.interpolated.yaml",
165
+ "end": "(?=^\\s*(-|[^!{@#%&*>,].*:\\s+))",
211
166
  "patterns": [
212
167
  {
213
- "include": "#escaped_char"
214
- },
215
- {
216
- "include": "#erb"
168
+ "include": "#scalar-content"
217
169
  }
218
170
  ]
219
171
  },
220
172
  {
221
- "captures": {
173
+ "begin": "(-)\\s+(?:((!!)omap)|(?![!@#%&*>,]))",
174
+ "beginCaptures": {
222
175
  "1": {
223
- "name": "entity.name.tag.yaml"
176
+ "name": "punctuation.definition.entry.yaml"
224
177
  },
225
178
  "2": {
226
- "name": "keyword.operator.merge-key.yaml"
179
+ "name": "keyword.other.omap.yaml"
227
180
  },
228
181
  "3": {
229
- "name": "punctuation.definition.keyword.yaml"
230
- }
231
- },
232
- "match": "(\\<\\<): ((\\*).*)$",
233
- "name": "keyword.operator.merge-key.yaml"
234
- },
235
- {
236
- "disabled": "1",
237
- "match": "( |\t)+$",
238
- "name": "invalid.deprecated.trailing-whitespace.yaml"
239
- },
240
- {
241
- "begin": "(^[ \\t]+)?(?<!\\$)(?<=^|[ \\t])(?=#)(?!#\\{)",
242
- "beginCaptures": {
243
- "1": {
244
- "name": "punctuation.whitespace.comment.leading.yaml"
182
+ "name": "punctuation.definition.tag.omap.yaml"
245
183
  }
246
184
  },
247
- "end": "(?!\\G)",
185
+ "end": "(?=^\\s*(-|[^!{@#%&*>,].*:))",
248
186
  "patterns": [
249
187
  {
250
- "begin": "#",
251
- "beginCaptures": {
252
- "0": {
253
- "name": "punctuation.definition.comment.yaml"
254
- }
255
- },
256
- "end": "\\n",
257
- "name": "comment.line.number-sign.yaml"
188
+ "include": "#scalar-content"
258
189
  }
259
190
  ]
260
191
  },
261
192
  {
262
- "match": "-",
263
- "name": "keyword.operator.symbol"
193
+ "include": "#variables"
264
194
  },
265
195
  {
266
- "begin": "^(?=\\t)",
267
- "end": "(?=[^\\t])",
268
- "name": "meta.leading-tabs.yaml",
269
- "patterns": [
270
- {
271
- "captures": {
272
- "1": {
273
- "name": "meta.odd-tab"
274
- },
275
- "2": {
276
- "name": "meta.even-tab"
277
- }
278
- },
279
- "match": "(\\t)(\\t)?"
280
- }
281
- ]
196
+ "include": "#strings"
282
197
  }
283
198
  ],
284
199
  "repository": {
200
+ "comment": {
201
+ "match": "(?<=^|\\s)((#(?!{)).*)",
202
+ "captures": {
203
+ "1": {
204
+ "name": "comment.line.number-sign.yaml"
205
+ },
206
+ "2": {
207
+ "name": "punctuation.definition.comment.yaml"
208
+ }
209
+ }
210
+ },
285
211
  "constants": {
286
212
  "match": "(?<=\\s)(true|false|null)(?=\\s*$)",
287
213
  "name": "constant.language.yaml"
288
214
  },
215
+ "date": {
216
+ "match": "([0-9]{4}-[0-9]{2}-[0-9]{2})\\s*($|(?=#)(?!#{))",
217
+ "captures": {
218
+ "1": {
219
+ "name": "constant.other.date.yaml"
220
+ }
221
+ }
222
+ },
289
223
  "erb": {
290
224
  "begin": "<%+(?!>)=?",
291
225
  "beginCaptures": {
@@ -323,51 +257,122 @@
323
257
  "match": "\\\\.",
324
258
  "name": "constant.character.escape.yaml"
325
259
  },
326
- "double_quoted_string": {
327
- "begin": "\"",
328
- "beginCaptures": {
329
- "0": {
330
- "name": "punctuation.definition.string.begin.yaml"
331
- }
332
- },
333
- "end": "\"",
334
- "endCaptures": {
335
- "0": {
336
- "name": "punctuation.definition.string.end.yaml"
260
+ "numeric": {
261
+ "match": "(((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f)?)\\s*($|(?=#)(?!#{))",
262
+ "captures": {
263
+ "1": {
264
+ "name": "constant.numeric.yaml"
337
265
  }
338
- },
339
- "name": "string.quoted.double.yaml",
266
+ }
267
+ },
268
+ "strings": {
340
269
  "patterns": [
341
270
  {
342
- "include": "#escaped_char"
271
+ "begin": "\"",
272
+ "beginCaptures": {
273
+ "0": {
274
+ "name": "punctuation.definition.string.begin.yaml"
275
+ }
276
+ },
277
+ "end": "\"",
278
+ "endCaptures": {
279
+ "0": {
280
+ "name": "punctuation.definition.string.end.yaml"
281
+ }
282
+ },
283
+ "name": "string.quoted.double.yaml",
284
+ "patterns": [
285
+ {
286
+ "include": "#escaped_char"
287
+ },
288
+ {
289
+ "include": "#erb"
290
+ }
291
+ ]
343
292
  },
344
293
  {
345
- "include": "#erb"
294
+ "begin": "'",
295
+ "beginCaptures": {
296
+ "0": {
297
+ "name": "punctuation.definition.string.begin.yaml"
298
+ }
299
+ },
300
+ "end": "'",
301
+ "endCaptures": {
302
+ "0": {
303
+ "name": "punctuation.definition.string.end.yaml"
304
+ }
305
+ },
306
+ "name": "string.quoted.single.yaml",
307
+ "patterns": [
308
+ {
309
+ "include": "#escaped_char"
310
+ },
311
+ {
312
+ "include": "#erb"
313
+ }
314
+ ]
315
+ },
316
+ {
317
+ "begin": "`",
318
+ "beginCaptures": {
319
+ "0": {
320
+ "name": "punctuation.definition.string.begin.yaml"
321
+ }
322
+ },
323
+ "end": "`",
324
+ "endCaptures": {
325
+ "0": {
326
+ "name": "punctuation.definition.string.end.yaml"
327
+ }
328
+ },
329
+ "name": "string.interpolated.yaml",
330
+ "patterns": [
331
+ {
332
+ "include": "#escaped_char"
333
+ },
334
+ {
335
+ "include": "#erb"
336
+ }
337
+ ]
338
+ },
339
+ {
340
+ "match": "[^\\s\"'\\n](?!\\s*#(?!{))([^#\\n]|((?<!\\s)#))*",
341
+ "name": "string.unquoted.yaml"
346
342
  }
347
343
  ]
348
344
  },
349
- "single_quoted_string": {
350
- "begin": "'",
351
- "beginCaptures": {
352
- "0": {
353
- "name": "punctuation.definition.string.begin.yaml"
354
- }
355
- },
356
- "end": "'",
357
- "endCaptures": {
358
- "0": {
359
- "name": "punctuation.definition.string.end.yaml"
360
- }
361
- },
362
- "name": "string.quoted.single.yaml",
345
+ "scalar-content": {
363
346
  "patterns": [
364
347
  {
365
- "include": "#escaped_char"
348
+ "include": "#comment"
366
349
  },
367
350
  {
368
- "include": "#erb"
351
+ "match": "!(?=\\s)",
352
+ "name": "punctuation.definition.tag.non-specific.yaml"
353
+ },
354
+ {
355
+ "include": "#constants"
356
+ },
357
+ {
358
+ "include": "#date"
359
+ },
360
+ {
361
+ "include": "#numeric"
362
+ },
363
+ {
364
+ "include": "#strings"
369
365
  }
370
366
  ]
367
+ },
368
+ "variables": {
369
+ "captures": {
370
+ "1": {
371
+ "name": "punctuation.definition.variable.yaml"
372
+ }
373
+ },
374
+ "match": "(&|\\*)\\w+$",
375
+ "name": "variable.other.yaml"
371
376
  }
372
377
  }
373
378
  }