github-linguist 6.1.0 → 6.2.0

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/grammars/annotation.liquidhaskell.haskell.json +14 -14
  3. data/grammars/hint.haskell.json +14 -14
  4. data/grammars/hint.message.haskell.json +14 -14
  5. data/grammars/hint.type.haskell.json +14 -14
  6. data/grammars/markdown.haxe.codeblock.json +26 -0
  7. data/grammars/markdown.hxml.codeblock.json +26 -0
  8. data/grammars/source.angelscript.json +1 -1
  9. data/grammars/source.ballerina.json +973 -61
  10. data/grammars/source.csound.json +1 -1
  11. data/grammars/source.emacs.lisp.json +35 -0
  12. data/grammars/source.firestore.json +289 -0
  13. data/grammars/source.gfm.json +7 -7
  14. data/grammars/source.haskell.json +14 -14
  15. data/grammars/source.hql.json +492 -0
  16. data/grammars/source.hsig.json +14 -14
  17. data/grammars/source.hx.json +14 -6
  18. data/grammars/source.hx.type.json +8 -0
  19. data/grammars/source.jison.json +1 -1
  20. data/grammars/source.js.json +1 -1
  21. data/grammars/source.powershell.json +384 -141
  22. data/grammars/source.q.json +120 -0
  23. data/grammars/source.q_output.json +348 -0
  24. data/grammars/source.rascal.json +0 -1
  25. data/grammars/source.sas.json +3 -3
  26. data/grammars/source.solidity.json +84 -13
  27. data/grammars/source.ts.json +226 -85
  28. data/grammars/source.tsx.json +230 -89
  29. data/grammars/source.viml.json +73 -18
  30. data/grammars/text.hamlc.json +1 -1
  31. data/grammars/text.html.markdown.source.gfm.apib.json +11 -2
  32. data/grammars/text.html.mediawiki.json +6 -6
  33. data/grammars/text.html.php.blade.json +3 -3
  34. data/grammars/text.tex.latex.haskell.json +14 -14
  35. data/lib/linguist/generated.rb +27 -1
  36. data/lib/linguist/heuristics.rb +8 -0
  37. data/lib/linguist/language.rb +12 -15
  38. data/lib/linguist/languages.json +1 -1
  39. data/lib/linguist/languages.yml +55 -10
  40. data/lib/linguist/samples.json +1623 -158
  41. data/lib/linguist/strategy/modeline.rb +11 -11
  42. data/lib/linguist/version.rb +1 -1
  43. metadata +9 -3
  44. data/grammars/source.j.json +0 -46
@@ -0,0 +1,492 @@
1
+ {
2
+ "name": "HQL",
3
+ "scopeName": "source.hql",
4
+ "patterns": [
5
+ {
6
+ "include": "#comments"
7
+ },
8
+ {
9
+ "name": "meta.create.hql",
10
+ "match": "(?i:^\\s*(create(?:\\s+or\\s+replace)?)\\s+(aggregate|intersect|IF\\sNOT\\sEXISTS|except|USE|conversion|database|domain|function|group|partition|cluster|(unique\\s+)?index|language|operator\\s+class|operator|rule|schema|sequence|table|tablespace|trigger|type|user|view)\\s+)",
11
+ "captures": {
12
+ "1": {
13
+ "name": "keyword.other.create.hql"
14
+ },
15
+ "2": {
16
+ "name": "keyword.other.hql"
17
+ },
18
+ "5": {
19
+ "name": "entity.name.function.hql"
20
+ }
21
+ }
22
+ },
23
+ {
24
+ "name": "meta.drop.hql",
25
+ "match": "(?i:^\\s*(drop)\\s+(aggregate|conversion|IF\\sEXISTS|database|domain|function|group|cluster|partition|index|language|operator class|operator|rule|schema|sequence|table|tablespace|trigger|type|user|view))",
26
+ "captures": {
27
+ "1": {
28
+ "name": "keyword.other.create.hql"
29
+ },
30
+ "2": {
31
+ "name": "keyword.other.hql"
32
+ }
33
+ }
34
+ },
35
+ {
36
+ "name": "meta.create.hql",
37
+ "match": "(?i:^\\s*(create)\\s+(aggregate|conversion|database|domain|IF\\sNOT\\sEXISTS|function|group|cluster|partition|index|language|operator class|operator|rule|schema|sequence|table|tablespace|trigger|type|user|view))",
38
+ "captures": {
39
+ "1": {
40
+ "name": "keyword.other.create.hql"
41
+ },
42
+ "2": {
43
+ "name": "keyword.other.hql"
44
+ }
45
+ }
46
+ },
47
+ {
48
+ "name": "meta.drop.hql",
49
+ "match": "(?i:\\s*(drop)\\s+(table)\\s+(\\w+)(\\s+cascade)?\\b)",
50
+ "captures": {
51
+ "1": {
52
+ "name": "keyword.other.create.hql"
53
+ },
54
+ "2": {
55
+ "name": "keyword.other.table.hql"
56
+ },
57
+ "3": {
58
+ "name": "entity.name.function.hql"
59
+ },
60
+ "4": {
61
+ "name": "keyword.other.cascade.hql"
62
+ }
63
+ }
64
+ },
65
+ {
66
+ "captures": {
67
+ "1": {
68
+ "name": "keyword.other.create.hql"
69
+ },
70
+ "2": {
71
+ "name": "keyword.other.table.hql"
72
+ },
73
+ "3": {
74
+ "name": "entity.name.function.hql"
75
+ },
76
+ "4": {
77
+ "name": "keyword.other.cascade.hql"
78
+ },
79
+ "5": {
80
+ "name": "meta.show.hql"
81
+ }
82
+ }
83
+ },
84
+ {
85
+ "name": "meta.alter.hql",
86
+ "match": "(?i:^\\s*(alter)\\s+(aggregate|conversion|database|domain|intersect|except|USE|function|group|partition|cluster|index|language|operator class|operator|rule|schema|sequence|table|tablespace|trigger|type|user|view)\\s+)",
87
+ "captures": {
88
+ "1": {
89
+ "name": "keyword.other.create.hql"
90
+ },
91
+ "2": {
92
+ "name": "keyword.other.table.hql"
93
+ }
94
+ }
95
+ },
96
+ {
97
+ "name": "meta.truncate.hql",
98
+ "match": "(?i:^\\s*(truncate)\\s+(aggregate|conversion|database|domain|intersect|except|USE|function|group|partition|cluster|index|language|operator class|operator|rule|schema|sequence|table|tablespace|trigger|type|user|view)\\s+)",
99
+ "captures": {
100
+ "1": {
101
+ "name": "keyword.other.create.hql"
102
+ },
103
+ "2": {
104
+ "name": "keyword.other.table.hql"
105
+ }
106
+ }
107
+ },
108
+ {
109
+ "name": "meta.show.hql",
110
+ "match": "(?i:^\\s*(show)\\s+(DATABASES|SCHEMAS|TABLES|TBLPROPERTIES|PARTITIONS|FUNCTIONS|INDEX(ES)?\\sCOLUMNS|CREATE\\sTABLE)\\s+)",
111
+ "captures": {
112
+ "1": {
113
+ "name": "keyword.other.create.hql"
114
+ },
115
+ "2": {
116
+ "name": "keyword.other.table.hql"
117
+ }
118
+ }
119
+ },
120
+ {
121
+ "name": "meta.describe.hql",
122
+ "match": "(?i:^\\s*(desc(ribe)?)\\s+(DATABASE|SCHEMA)\\s+)",
123
+ "captures": {
124
+ "1": {
125
+ "name": "keyword.other.create.hql"
126
+ },
127
+ "2": {
128
+ "name": "keyword.other.table.hql"
129
+ }
130
+ }
131
+ },
132
+ {
133
+ "match": "(?xi)\n\n\t\t\t\t# normal stuff, capture 1\n\t\t\t\t \\b(bigint|bigserial|bit|boolean|box|bytea|cidr|circle|tablesample|explain|date|double\\sprecision|inet|int|integer|line|lseg|macaddr|money|oid|path|point|polygon|real|serial|smallint|sysdate|text)\\b\n\n\t\t\t\t# numeric suffix, capture 2 + 3i\n\t\t\t\t|\\b(bit\\svarying|character\\s(?:varying)?|tinyint|var\\schar|float|interval)\\((\\d+)\\)\n\n\t\t\t\t# optional numeric suffix, capture 4 + 5i\n\t\t\t\t|\\b(char|number|varchar\\d?)\\b(?:\\((\\d+)\\))?\n\n\t\t\t\t# special case, capture 6 + 7i + 8i\n\t\t\t\t|\\b(numeric|decimal)\\b(?:\\((\\d+),(\\d+)\\))?\n\n\t\t\t\t# special case, captures 9, 10i, 11\n\t\t\t\t|\\b(times)(?:\\((\\d+)\\))(\\swithoutstimeszone\\b)?\n\n\t\t\t\t# special case, captures 12, 13, 14i, 15\n\t\t\t\t|\\b(timestamp)(?:(s)\\((\\d+)\\)(\\swithoutstimeszone\\b)?)?\n\n\t\t\t",
134
+ "captures": {
135
+ "1": {
136
+ "name": "storage.type.hql"
137
+ },
138
+ "10": {
139
+ "name": "constant.numeric.hql"
140
+ },
141
+ "11": {
142
+ "name": "storage.type.hql"
143
+ },
144
+ "12": {
145
+ "name": "storage.type.hql"
146
+ },
147
+ "13": {
148
+ "name": "storage.type.hql"
149
+ },
150
+ "14": {
151
+ "name": "constant.numeric.hql"
152
+ },
153
+ "15": {
154
+ "name": "storage.type.hql"
155
+ },
156
+ "2": {
157
+ "name": "storage.type.hql"
158
+ },
159
+ "3": {
160
+ "name": "constant.numeric.hql"
161
+ },
162
+ "4": {
163
+ "name": "storage.type.hql"
164
+ },
165
+ "5": {
166
+ "name": "constant.numeric.hql"
167
+ },
168
+ "6": {
169
+ "name": "storage.type.hql"
170
+ },
171
+ "7": {
172
+ "name": "constant.numeric.hql"
173
+ },
174
+ "8": {
175
+ "name": "constant.numeric.hql"
176
+ },
177
+ "9": {
178
+ "name": "storage.type.hql"
179
+ }
180
+ }
181
+ },
182
+ {
183
+ "name": "storage.modifier.hql",
184
+ "match": "(?i:\\b((?:primary|foreign)\\s+key|references|on\\sdelete(\\s+cascade)?|check|constraint)\\b)"
185
+ },
186
+ {
187
+ "name": "constant.numeric.hql",
188
+ "match": "\\b\\d+\\b"
189
+ },
190
+ {
191
+ "name": "keyword.other.DML.hql",
192
+ "match": "(?i:\\b(select(\\s+distinct)?|insert\\s+(ignore\\s+)?into|update|MAPJOIN|ROLLUP|CUBE|cast|intersect|except|between|to_date|from_unixtime|unix_timestamp|year|hour|month|day|dayofmonth|minute|second|weekofyear|datediff|from_utc_timestamp|to_utc_timestamp|if(\\s+not)?\\s+exists|if|USE|explode|inline|json_tuple|parse_url_tuple|posexplode|add_days|add_months|append_array|array_freq_count|array_index|assert_equals|assert_less_than|assert_true|bloom|bloom_and|bloom_contains|bloom_not|bloom_or|booking_week|cast_array|cast_map|ceiling|collect|collect_freq_count|collect_max|collect_merge_max|combine|combine_hyperloglog|combine_previous_sketch|combine_sketch|combine_unique|compute_stats|conditional_emit|convert_to_sketch|current_database|date_range|date_to_start_quarter|date_to_start_week|distributed_bloom|distributed_map|div|elt|estimated_reach|event_parser|ewah_bitmap|ewah_bitmap_and|ewah_bitmap_empty|ewah_bitmap_or|experiments|field|first_index|flatten_array|from_camel_case|from_json|geturl|greatest|group_concat|group_count|grouped_rank|hash_md5|hbase_balanced_key|hbase_batch_get|hbase_batch_put|hbase_cached_get|hbase_get|hbase_put|hll_est_cardinality|hyperloglog|index|inet_aton|inet_ntoa|initcap|intersect_array|ip2country|ip2latlon|ip2timezone|ipcountry|isnotnull|isnull|join_array|json_map|json_split|label|last_day|last_index|lcase|least|length|map_filter_keys|map_index|map_key_values|map_mode|matchpath|md5|moving_avg|multiday_count|negative|next_day|noop|noopstreaming|noopwithmap|noopwithmapstreaming|not|now|numeric_range|nvl|percentile|percentile_approx|pi|pmod|positive|pow|power|quarter|ranked_long_diff|ranked_long_sum|row_sequence|running_count|running_sum|salted_bigint|salted_bigint_key|set_difference|set_similarity|sha1|sha2|sign|sin|sketch_hashes|sketch_set|std|stddev|stddev_pop|stddev_samp|sum_array|throw_error|to_camel_case|to_json|to_unix_timestamp|truncate_array|ucase|unhex|union_hyperloglog|union_map|union_max|union_sketch|union_vector_sum|vector_add|vector_cross_product|vector_dot_product|vector_magnitude|vector_scalar_mult|windowingtablefunction|write_to_graphite|write_to_tsdb|xpath_boolean|xpath_double|xpath_float|xpath_int|xpath_long|xpath_number|xpath_short|xpath_string|date_add|date_sub|stack|java_method|rename|reflect|hash|xpath|get_json_object|size|map_keys|map_values|array_contains|sort_array|delete|from|set|where|group\\sby|partition\\sby|cluster\\sby|clustered\\sby|distribute\\sby|or|like|and|union(\\s+all)?|having|order\\sby|limit|offset|(inner|cross)\\s+join|join|straight_join|(left|right)(\\s+outer)?\\s+join|natural(\\s+(left|right)(\\s+outer)?)?\\s+join)\\b)"
193
+ },
194
+ {
195
+ "name": "keyword.other.DML.hql",
196
+ "match": "(?i:\\b(rename\\s+)?to\\b)"
197
+ },
198
+ {
199
+ "name": "keyword.other.DDL.create.II.hql",
200
+ "match": "(?i:\\b(on|((is\\s+)not\\s+)?null)\\b)"
201
+ },
202
+ {
203
+ "name": "keyword.other.DML.II.hql",
204
+ "match": "(?i:\\bvalues\\b)"
205
+ },
206
+ {
207
+ "name": "keyword.other.LUW.hql",
208
+ "match": "(?i:\\b(begin(\\s+work)?|start\\s+transaction|commit(\\s+work)?|rollback(\\s+work)?)\\b)"
209
+ },
210
+ {
211
+ "name": "keyword.other.authorization.hql",
212
+ "match": "(?i:\\b(grant(\\swith\\sgrant\\soption)?|revoke)\\b)"
213
+ },
214
+ {
215
+ "name": "keyword.other.data-integrity.hql",
216
+ "match": "(?i:(\\bnot\\s+)?\\bin\\b)"
217
+ },
218
+ {
219
+ "name": "keyword.other.object-comments.hql",
220
+ "match": "(?i:^\\s*(comment\\s+on\\s+(table|column|aggregate|constraint|database|domain|function|index|operator|rule|schema|sequence|trigger|type|view))\\s+.*?\\s+(is)\\s+)"
221
+ },
222
+ {
223
+ "name": "keyword.other.alias.hql",
224
+ "match": "(?i)\\bAS\\b"
225
+ },
226
+ {
227
+ "name": "keyword.other.order.hql",
228
+ "match": "(?i)\\b(DESC|ASC)\\b"
229
+ },
230
+ {
231
+ "name": "keyword.other.case.hql",
232
+ "match": "(?i)\\b(case|when|then|else|end)\\b"
233
+ },
234
+ {
235
+ "name": "keyword.operator.star.hql",
236
+ "match": "\\*"
237
+ },
238
+ {
239
+ "name": "keyword.operator.comparison.hql",
240
+ "match": "[!\u003c\u003e]?=|\u003c\u003e|\u003c|\u003e"
241
+ },
242
+ {
243
+ "name": "storage.type.II.hql",
244
+ "match": "(?i)\\b(COMMENT|STORED|LOAD|rlike|regexp|map|struct|named_struct|array|create_union|OVERWRITE|LOCATION|STREAMTABLE|ROW FORMAT|WINDOW|LEAD|LAG|FIRST_VALUE|LAST_VALUE|OVER|ROWS|UNBOUNDED|PRECEDING|FOLLOWING|RANK|ROW_NUMBER|DENSE_RANK|CUME_DIST|PERCENT_RANK|NTILE|COALESCE|CLUSTERED|PARTITIONED|BUCKETED)\\b"
245
+ },
246
+ {
247
+ "name": "keyword.operator.math.hql",
248
+ "match": "-|\\+|/"
249
+ },
250
+ {
251
+ "name": "keyword.operator.concatenator.hql",
252
+ "match": "\\|\\|"
253
+ },
254
+ {
255
+ "name": "support.function.scalar.hql",
256
+ "match": "(?i)\\b(CURRENT_(DATE|TIME(STAMP)?|USER)|(SESSION|SYSTEM)_USER)\\b"
257
+ },
258
+ {
259
+ "name": "entity.function.name.hql",
260
+ "match": "(?i)\\b(AVG|COUNT|MIN|MAX|SUM|DISTINCT|VARIANCE|var_pop|var_samp|stddev_pop|stddev_samp|covar_pop|covar_samp|corr|percentile|percentile_approx|histogram_numeric|collect_set|collect_list|ntile|round|floor|ceil|rand|exp|ln|log10|log2|log|pow|power|sqrt|bin|hex|unhex|conv|from_base|abs|pmod|sin|asin|cos|acos|tan|atan|degrees|radians|positive|negative|sign|e|pi)(?=\\s*\\()"
261
+ },
262
+ {
263
+ "name": "support.function.string.hql",
264
+ "match": "(?i)\\b(CONCATENATE|CONVERT|LOWER|SUBSTRING|TRANSLATE|TRIM|UPPER|ascii|base64|concat|context_ngrams|histogram_numeric|concat_ws|decode|encode|find_in_set|format_number|get_json_object|in_file|instr|lenght|locate|lower|lpad|ltrim|ngrams|parse_url|printf|regexp_extract|regexp_replace|repeat|reverse|rpad|rtrim|sentences|space|split|str_to_map|substr|translate|trim|unbase64|upper)\\b"
265
+ },
266
+ {
267
+ "match": "(\\w+?)\\.(\\w+)",
268
+ "captures": {
269
+ "1": {
270
+ "name": "constant.other.database-name.hql"
271
+ },
272
+ "2": {
273
+ "name": "constant.other.table-name.hql"
274
+ }
275
+ }
276
+ },
277
+ {
278
+ "include": "#strings"
279
+ },
280
+ {
281
+ "include": "#regexps"
282
+ }
283
+ ],
284
+ "repository": {
285
+ "comments": {
286
+ "patterns": [
287
+ {
288
+ "begin": "(^[ \\t]+)?(?=--)",
289
+ "end": "(?!\\G)",
290
+ "patterns": [
291
+ {
292
+ "name": "comment.line.double-dash.hql",
293
+ "begin": "--",
294
+ "end": "\\n",
295
+ "beginCaptures": {
296
+ "0": {
297
+ "name": "punctuation.definition.comment.hql"
298
+ }
299
+ }
300
+ }
301
+ ],
302
+ "beginCaptures": {
303
+ "1": {
304
+ "name": "punctuation.whitespace.comment.leading.hql"
305
+ }
306
+ }
307
+ }
308
+ ]
309
+ },
310
+ "regexps": {
311
+ "patterns": [
312
+ {
313
+ "name": "string.regexp.hql",
314
+ "begin": "/(?=\\S.*/)",
315
+ "end": "/",
316
+ "patterns": [
317
+ {
318
+ "include": "#string_interpolation"
319
+ },
320
+ {
321
+ "name": "constant.character.escape.slash.hql",
322
+ "match": "\\\\/"
323
+ }
324
+ ],
325
+ "beginCaptures": {
326
+ "0": {
327
+ "name": "punctuation.definition.string.begin.hql"
328
+ }
329
+ },
330
+ "endCaptures": {
331
+ "0": {
332
+ "name": "punctuation.definition.string.end.hql"
333
+ }
334
+ }
335
+ },
336
+ {
337
+ "name": "string.regexp.modr.hql",
338
+ "begin": "%r\\{",
339
+ "end": "\\}",
340
+ "patterns": [
341
+ {
342
+ "include": "#string_interpolation"
343
+ }
344
+ ],
345
+ "beginCaptures": {
346
+ "0": {
347
+ "name": "punctuation.definition.string.begin.hql"
348
+ }
349
+ },
350
+ "endCaptures": {
351
+ "0": {
352
+ "name": "punctuation.definition.string.end.hql"
353
+ }
354
+ }
355
+ }
356
+ ]
357
+ },
358
+ "string_escape": {
359
+ "name": "constant.character.escape.hql",
360
+ "match": "\\\\."
361
+ },
362
+ "string_interpolation": {
363
+ "name": "string.interpolated.hql",
364
+ "match": "(#\\{)([^\\}]*)(\\})",
365
+ "captures": {
366
+ "1": {
367
+ "name": "punctuation.definition.string.end.hql"
368
+ }
369
+ }
370
+ },
371
+ "strings": {
372
+ "patterns": [
373
+ {
374
+ "name": "string.quoted.single.hql",
375
+ "match": "(')[^'\\\\]*(')",
376
+ "captures": {
377
+ "1": {
378
+ "name": "punctuation.definition.string.begin.hql"
379
+ },
380
+ "3": {
381
+ "name": "punctuation.definition.string.end.hql"
382
+ }
383
+ }
384
+ },
385
+ {
386
+ "name": "string.quoted.single.hql",
387
+ "begin": "'",
388
+ "end": "'",
389
+ "patterns": [
390
+ {
391
+ "include": "#string_escape"
392
+ }
393
+ ],
394
+ "beginCaptures": {
395
+ "0": {
396
+ "name": "punctuation.definition.string.begin.hql"
397
+ }
398
+ },
399
+ "endCaptures": {
400
+ "0": {
401
+ "name": "punctuation.definition.string.end.hql"
402
+ }
403
+ }
404
+ },
405
+ {
406
+ "name": "string.quoted.other.backtick.hql",
407
+ "match": "(`)[^`\\\\]*(`)",
408
+ "captures": {
409
+ "1": {
410
+ "name": "punctuation.definition.string.begin.hql"
411
+ },
412
+ "3": {
413
+ "name": "punctuation.definition.string.end.hql"
414
+ }
415
+ }
416
+ },
417
+ {
418
+ "name": "string.quoted.other.backtick.hql",
419
+ "begin": "`",
420
+ "end": "`",
421
+ "patterns": [
422
+ {
423
+ "include": "#string_escape"
424
+ }
425
+ ],
426
+ "beginCaptures": {
427
+ "0": {
428
+ "name": "punctuation.definition.string.begin.hql"
429
+ }
430
+ },
431
+ "endCaptures": {
432
+ "0": {
433
+ "name": "punctuation.definition.string.end.hql"
434
+ }
435
+ }
436
+ },
437
+ {
438
+ "name": "string.quoted.double.hql",
439
+ "match": "(\")[^\"#]*(\")",
440
+ "captures": {
441
+ "1": {
442
+ "name": "punctuation.definition.string.begin.hql"
443
+ },
444
+ "3": {
445
+ "name": "punctuation.definition.string.end.hql"
446
+ }
447
+ }
448
+ },
449
+ {
450
+ "name": "string.quoted.double.hql",
451
+ "begin": "\"",
452
+ "end": "\"",
453
+ "patterns": [
454
+ {
455
+ "include": "#string_interpolation"
456
+ }
457
+ ],
458
+ "beginCaptures": {
459
+ "0": {
460
+ "name": "punctuation.definition.string.begin.hql"
461
+ }
462
+ },
463
+ "endCaptures": {
464
+ "0": {
465
+ "name": "punctuation.definition.string.end.hql"
466
+ }
467
+ }
468
+ },
469
+ {
470
+ "name": "string.other.quoted.brackets.hql",
471
+ "begin": "%\\{",
472
+ "end": "\\}",
473
+ "patterns": [
474
+ {
475
+ "include": "#string_interpolation"
476
+ }
477
+ ],
478
+ "beginCaptures": {
479
+ "0": {
480
+ "name": "punctuation.definition.string.begin.hql"
481
+ }
482
+ },
483
+ "endCaptures": {
484
+ "0": {
485
+ "name": "punctuation.definition.string.end.hql"
486
+ }
487
+ }
488
+ }
489
+ ]
490
+ }
491
+ }
492
+ }