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.
- checksums.yaml +4 -4
- data/bin/git-linguist +10 -2
- data/bin/linguist +26 -9
- data/grammars/config.xcompose.json +83 -0
- data/grammars/hint.haskell.json +21 -30
- data/grammars/hint.message.haskell.json +21 -30
- data/grammars/hint.type.haskell.json +21 -30
- data/grammars/source.bsl.json +42 -28
- data/grammars/source.cs.json +656 -131
- data/grammars/source.csound-document.json +142 -25
- data/grammars/source.csound-score.json +13 -10
- data/grammars/source.csound.json +136 -81
- data/grammars/source.css.json +1501 -331
- data/grammars/source.css.less.json +3 -3
- data/grammars/source.d.json +60 -44
- data/grammars/source.gn.json +240 -138
- data/grammars/source.graphql.json +781 -155
- data/grammars/source.haskell.json +21 -30
- data/grammars/source.js.json +46 -46
- data/grammars/source.mask.json +1 -1
- data/grammars/source.perl6fe.json +1151 -763
- data/grammars/source.python.json +45 -23
- data/grammars/source.quoting.perl6fe.json +2170 -0
- data/grammars/source.reason.json +296 -0
- data/grammars/source.regexp.perl6fe.json +27 -0
- data/grammars/source.rust.json +522 -125
- data/grammars/source.sdbl.json +2 -2
- data/grammars/source.shell.json +125 -161
- data/grammars/source.solidity.json +137 -0
- data/grammars/source.ts.json +385 -137
- data/grammars/source.tsx.json +394 -167
- data/grammars/source.yaml.json +176 -171
- data/grammars/text.html.php.blade.json +2 -2
- data/grammars/text.tex.latex.haskell.json +1 -10
- data/lib/linguist/generated.rb +50 -4
- data/lib/linguist/heuristics.rb +1 -1
- data/lib/linguist/language.rb +12 -8
- data/lib/linguist/languages.json +1 -1
- data/lib/linguist/languages.yml +38 -1
- data/lib/linguist/samples.json +4605 -581
- data/lib/linguist/vendor.yml +6 -0
- data/lib/linguist/version.rb +1 -1
- metadata +10 -7
- data/grammars/source.hy.json +0 -270
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f657560e2d59c601319fa6bab23bc7c0f4d784c3
|
4
|
+
data.tar.gz: 8544744619b6cdcfd6a2708315eab6bc963e6415
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 38766f43d638fb5344544cc4392993556bfd464d7f68f7b9b262a2b171a3c34367f96a9ac67b855308424be0d597d325ac62abfa2cdead5a9a82185a7fcc1df5
|
7
|
+
data.tar.gz: 15b7a2864d79889e5a09ee12c0c372c0b77ac55391fec99eae2226f12d88d58eb47c8da27f743100a1ab35e8296d10e72da19a662ca1133aa4fc84d525cd0809
|
data/bin/git-linguist
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
+
$LOAD_PATH[0, 0] = File.join(File.dirname(__FILE__), '..', 'lib')
|
4
|
+
|
3
5
|
require 'linguist'
|
4
6
|
require 'rugged'
|
5
7
|
require 'optparse'
|
@@ -102,10 +104,16 @@ def git_linguist(args)
|
|
102
104
|
commit = nil
|
103
105
|
|
104
106
|
parser = OptionParser.new do |opts|
|
105
|
-
opts.banner =
|
107
|
+
opts.banner = <<-HELP
|
108
|
+
Linguist v#{Linguist::VERSION}
|
109
|
+
Detect language type and determine language breakdown for a given Git repository.
|
110
|
+
|
111
|
+
Usage:
|
112
|
+
git-linguist [OPTIONS] stats|breakdown|dump-cache|clear|disable"
|
113
|
+
HELP
|
106
114
|
|
107
115
|
opts.on("-f", "--force", "Force a full rescan") { incremental = false }
|
108
|
-
opts.on("--commit=COMMIT", "Commit to index") { |v| commit = v}
|
116
|
+
opts.on("-c", "--commit=COMMIT", "Commit to index") { |v| commit = v}
|
109
117
|
end
|
110
118
|
|
111
119
|
parser.parse!(args)
|
data/bin/linguist
CHANGED
@@ -1,29 +1,37 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
#
|
3
|
+
$LOAD_PATH[0, 0] = File.join(File.dirname(__FILE__), '..', 'lib')
|
4
|
+
|
6
5
|
require 'linguist'
|
7
6
|
require 'rugged'
|
7
|
+
require 'json'
|
8
|
+
require 'optparse'
|
8
9
|
|
9
10
|
path = ARGV[0] || Dir.pwd
|
10
11
|
|
11
|
-
# special case if not given a directory
|
12
|
+
# special case if not given a directory
|
13
|
+
# but still given the --breakdown or --json options/
|
12
14
|
if path == "--breakdown"
|
13
15
|
path = Dir.pwd
|
14
16
|
breakdown = true
|
17
|
+
elsif path == "--json"
|
18
|
+
path = Dir.pwd
|
19
|
+
json_breakdown = true
|
15
20
|
end
|
16
21
|
|
17
22
|
ARGV.shift
|
18
23
|
breakdown = true if ARGV[0] == "--breakdown"
|
24
|
+
json_breakdown = true if ARGV[0] == "--json"
|
19
25
|
|
20
26
|
if File.directory?(path)
|
21
27
|
rugged = Rugged::Repository.new(path)
|
22
28
|
repo = Linguist::Repository.new(rugged, rugged.head.target_id)
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
29
|
+
if !json_breakdown
|
30
|
+
repo.languages.sort_by { |_, size| size }.reverse.each do |language, size|
|
31
|
+
percentage = ((size / repo.size.to_f) * 100)
|
32
|
+
percentage = sprintf '%.2f' % percentage
|
33
|
+
puts "%-7s %s" % ["#{percentage}%", language]
|
34
|
+
end
|
27
35
|
end
|
28
36
|
if breakdown
|
29
37
|
puts
|
@@ -35,6 +43,8 @@ if File.directory?(path)
|
|
35
43
|
end
|
36
44
|
puts
|
37
45
|
end
|
46
|
+
elsif json_breakdown
|
47
|
+
puts JSON.dump(repo.breakdown_by_file)
|
38
48
|
end
|
39
49
|
elsif File.file?(path)
|
40
50
|
blob = Linguist::FileBlob.new(path, Dir.pwd)
|
@@ -63,5 +73,12 @@ elsif File.file?(path)
|
|
63
73
|
puts " appears to be a vendored file"
|
64
74
|
end
|
65
75
|
else
|
66
|
-
abort
|
76
|
+
abort <<-HELP
|
77
|
+
Linguist v#{Linguist::VERSION}
|
78
|
+
Detect language type for a file, or, given a directory, determine language breakdown.
|
79
|
+
|
80
|
+
Usage: linguist <path>
|
81
|
+
linguist <path> [--breakdown] [--json]
|
82
|
+
linguist [--breakdown] [--json]
|
83
|
+
HELP
|
67
84
|
end
|
@@ -0,0 +1,83 @@
|
|
1
|
+
{
|
2
|
+
"scopeName": "config.xcompose",
|
3
|
+
"name": "XCompose",
|
4
|
+
"fileTypes": [
|
5
|
+
"XCompose"
|
6
|
+
],
|
7
|
+
"patterns": [
|
8
|
+
{
|
9
|
+
"include": "#comment"
|
10
|
+
},
|
11
|
+
{
|
12
|
+
"include": "#multikey"
|
13
|
+
},
|
14
|
+
{
|
15
|
+
"include": "#key"
|
16
|
+
},
|
17
|
+
{
|
18
|
+
"include": "#quoted"
|
19
|
+
},
|
20
|
+
{
|
21
|
+
"include": "#function"
|
22
|
+
},
|
23
|
+
{
|
24
|
+
"include": "#colon"
|
25
|
+
},
|
26
|
+
{
|
27
|
+
"include": "#unicode"
|
28
|
+
},
|
29
|
+
{
|
30
|
+
"include": "#keyword"
|
31
|
+
}
|
32
|
+
],
|
33
|
+
"repository": {
|
34
|
+
"comment": {
|
35
|
+
"match": "#.*",
|
36
|
+
"name": "comment.block.xcompose"
|
37
|
+
},
|
38
|
+
"multikey": {
|
39
|
+
"match": "(?x) ( < ) ( Multi_key ) ( > )",
|
40
|
+
"captures": {
|
41
|
+
"1": {
|
42
|
+
"name": "entity.function.xcompose"
|
43
|
+
},
|
44
|
+
"2": {
|
45
|
+
"name": "declaror.class.xcompose"
|
46
|
+
},
|
47
|
+
"3": {
|
48
|
+
"name": "entity.function.xcompose"
|
49
|
+
}
|
50
|
+
}
|
51
|
+
},
|
52
|
+
"key": {
|
53
|
+
"match": "(?x) ( < ) ( \\S+ ) ( > )",
|
54
|
+
"captures": {
|
55
|
+
"1": {
|
56
|
+
"name": "entity.function.xcompose"
|
57
|
+
},
|
58
|
+
"2": {
|
59
|
+
"name": "keyword.xcompose.xcompose"
|
60
|
+
},
|
61
|
+
"3": {
|
62
|
+
"name": "entity.function.xcompose"
|
63
|
+
}
|
64
|
+
}
|
65
|
+
},
|
66
|
+
"quoted": {
|
67
|
+
"match": "\".*\"",
|
68
|
+
"name": "string.quoted.double.xcompose"
|
69
|
+
},
|
70
|
+
"colon": {
|
71
|
+
"match": ":",
|
72
|
+
"name": "entity.function.xcompose"
|
73
|
+
},
|
74
|
+
"keyword": {
|
75
|
+
"match": "\binclude\b",
|
76
|
+
"name": "entity.function.xcompose"
|
77
|
+
},
|
78
|
+
"unicode": {
|
79
|
+
"match": "U[0-9A-Fa-f]+",
|
80
|
+
"name": "storage.modifier.unicode.xcompose"
|
81
|
+
}
|
82
|
+
}
|
83
|
+
}
|
data/grammars/hint.haskell.json
CHANGED
@@ -11,18 +11,18 @@
|
|
11
11
|
"classNameOne": "[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*",
|
12
12
|
"functionName": "(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*",
|
13
13
|
"className": "[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*",
|
14
|
-
"operatorChar": "[\\p{S}\\p{P}
|
15
|
-
"operator": "[\\p{S}\\p{P}
|
16
|
-
"operatorFun": "(?:\\((?!--+\\))[\\p{S}\\p{P}
|
14
|
+
"operatorChar": "(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"']))",
|
15
|
+
"operator": "(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"']))+",
|
16
|
+
"operatorFun": "(?:\\((?!--+\\))(?:[\\p{S}\\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Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*))",
|
@@ -95,11 +95,6 @@
|
|
95
95
|
{
|
96
96
|
"begin": "(^[ \\t]+)?(?=--+\\s+[|^])",
|
97
97
|
"end": "(?!\\G)",
|
98
|
-
"beginCaptures": {
|
99
|
-
"1": {
|
100
|
-
"name": "punctuation.whitespace.comment.leading.haskell"
|
101
|
-
}
|
102
|
-
},
|
103
98
|
"patterns": [
|
104
99
|
{
|
105
100
|
"name": "comment.line.double-dash.haddock.haskell",
|
@@ -117,13 +112,8 @@
|
|
117
112
|
]
|
118
113
|
},
|
119
114
|
{
|
120
|
-
"begin": "(^[ \\t]+)?(?=--+(?![\\p{S}\\p{P}
|
115
|
+
"begin": "(^[ \\t]+)?(?=--+(?!(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"']))))",
|
121
116
|
"end": "(?!\\G)",
|
122
|
-
"beginCaptures": {
|
123
|
-
"1": {
|
124
|
-
"name": "punctuation.whitespace.comment.leading.haskell"
|
125
|
-
}
|
126
|
-
},
|
127
117
|
"patterns": [
|
128
118
|
{
|
129
119
|
"name": "comment.line.double-dash.haskell",
|
@@ -166,7 +156,7 @@
|
|
166
156
|
"patterns": [
|
167
157
|
{
|
168
158
|
"name": "entity.name.function.infix.haskell",
|
169
|
-
"match": "(?:\\((?!--+\\))[\\p{S}\\p{P}
|
159
|
+
"match": "(?:\\((?!--+\\))(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"']))+\\))"
|
170
160
|
}
|
171
161
|
]
|
172
162
|
},
|
@@ -176,6 +166,7 @@
|
|
176
166
|
"name": "meta.declaration.exports.haskell",
|
177
167
|
"begin": "\\(",
|
178
168
|
"end": "\\)",
|
169
|
+
"applyEndPatternLast": 1,
|
179
170
|
"patterns": [
|
180
171
|
{
|
181
172
|
"include": "#comments"
|
@@ -251,7 +242,7 @@
|
|
251
242
|
"patterns": [
|
252
243
|
{
|
253
244
|
"name": "meta.function.type-declaration.haskell",
|
254
|
-
"begin": "^([ \\t]*)(?:(?:((?:(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*|(?:\\((?!--+\\))[\\p{S}\\p{P}
|
245
|
+
"begin": "^([ \\t]*)(?:(?:((?:(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*|(?:\\((?!--+\\))(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"']))+\\)))(?:(?:\\s*,\\s*)(?:(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*|(?:\\((?!--+\\))(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"']))+\\))))*))(?:\\s*((?<!(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"'])))(?:::|∷)(?!(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"']))))))",
|
255
246
|
"end": "^(?!\\1[ \\t]|[ \\t]*$)",
|
256
247
|
"contentName": "meta.type-signature.haskell",
|
257
248
|
"beginCaptures": {
|
@@ -281,7 +272,7 @@
|
|
281
272
|
"patterns": [
|
282
273
|
{
|
283
274
|
"name": "meta.ctor.type-declaration.haskell",
|
284
|
-
"begin": "^([ \\t]*)(?:(?:((?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*|(?:\\((?!--+\\))[\\p{S}\\p{P}
|
275
|
+
"begin": "^([ \\t]*)(?:(?:((?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*|(?:\\((?!--+\\))(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"']))+\\)))(?:(?:\\s*,\\s*)(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*|(?:\\((?!--+\\))(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"']))+\\))))*))(?:\\s*((?<!(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"'])))(?:::|∷)(?!(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"']))))))",
|
285
276
|
"end": "^(?!\\1[ \\t]|[ \\t]*$)",
|
286
277
|
"contentName": "meta.type-signature.haskell",
|
287
278
|
"beginCaptures": {
|
@@ -311,8 +302,8 @@
|
|
311
302
|
"patterns": [
|
312
303
|
{
|
313
304
|
"name": "meta.record-field.type-declaration.haskell",
|
314
|
-
"begin": "(?:(?=[\\p{Ll}_\\p{Lu}\\p{Lt}])(?<![\\p{Ll}_\\p{Lu}\\p{Lt}']))(?:(?:((?:(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\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[\\]`{}_\"']))))))",
|
306
|
+
"end": "(?=(?:(?:((?:(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*|(?:\\((?!--+\\))(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"']))+\\)))(?:(?:\\s*,\\s*)(?:(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*|(?:\\((?!--+\\))(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"']))+\\))))*))(?:\\s*((?<!(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"'])))(?:::|∷)(?!(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"']))))))|})",
|
316
307
|
"contentName": "meta.type-signature.haskell",
|
317
308
|
"beginCaptures": {
|
318
309
|
"1": {
|
@@ -360,11 +351,11 @@
|
|
360
351
|
},
|
361
352
|
{
|
362
353
|
"name": "keyword.other.arrow.haskell",
|
363
|
-
"match": "(?<![\\p{S}\\p{P}
|
354
|
+
"match": "(?<!(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"'])))(->|→)(?!(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"'])))"
|
364
355
|
},
|
365
356
|
{
|
366
357
|
"name": "keyword.other.big-arrow.haskell",
|
367
|
-
"match": "(?<![\\p{S}\\p{P}
|
358
|
+
"match": "(?<!(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"'])))(=>|⇒)(?!(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"'])))"
|
368
359
|
},
|
369
360
|
{
|
370
361
|
"include": "#operator"
|
@@ -886,7 +877,7 @@
|
|
886
877
|
"patterns": [
|
887
878
|
{
|
888
879
|
"name": "string.quoted.single.haskell",
|
889
|
-
"match": "(')((?:[\\ -\\[\\]-~]|\\\\(?:NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|[abfnrtv\\\\\\\"'\\&])|(?:\\\\o[0-7]+)|(?:\\\\x[0-9A-Fa-f]+)|(?:\\\\\\^[A-Z@\\[\\]\\\\^_])|[\\p{S}\\p{P}
|
880
|
+
"match": "(')((?:[\\ -\\[\\]-~]|\\\\(?:NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|[abfnrtv\\\\\\\"'\\&])|(?:\\\\o[0-7]+)|(?:\\\\x[0-9A-Fa-f]+)|(?:\\\\\\^[A-Z@\\[\\]\\\\^_])|(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"']))))(')",
|
890
881
|
"captures": {
|
891
882
|
"1": {
|
892
883
|
"name": "punctuation.definition.string.begin.haskell"
|
@@ -908,7 +899,7 @@
|
|
908
899
|
"scoped_type": {
|
909
900
|
"patterns": [
|
910
901
|
{
|
911
|
-
"match": "\\(((?<paren>(?:[^\\(\\)]|\\(\\g<paren>\\))*)(?<![\\p{S}\\p{P}
|
902
|
+
"match": "\\(((?<paren>(?:[^\\(\\)]|\\(\\g<paren>\\))*)(?<!(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"'])))(?:::|∷)(?!(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"'])))(?<paren2>(?:[^\\(\\)]|\\(\\g<paren2>\\))*))\\)",
|
912
903
|
"captures": {
|
913
904
|
"1": {
|
914
905
|
"patterns": [
|
@@ -920,7 +911,7 @@
|
|
920
911
|
}
|
921
912
|
},
|
922
913
|
{
|
923
|
-
"match": "((?<![\\p{S}\\p{P}
|
914
|
+
"match": "((?<!(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"'])))(?:::|∷)(?!(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"']))))(.*?)(?=(?<!(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"'])))(<-|=)(?!(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"'])))|$)",
|
924
915
|
"captures": {
|
925
916
|
"1": {
|
926
917
|
"name": "keyword.other.double-colon.haskell"
|
@@ -940,7 +931,7 @@
|
|
940
931
|
"scoped_type_override": {
|
941
932
|
"patterns": [
|
942
933
|
{
|
943
|
-
"match": "^([ \\t]*)(?:(?:((?:(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*|(?:\\((?!--+\\))[\\p{S}\\p{P}
|
934
|
+
"match": "^([ \\t]*)(?:(?:((?:(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*|(?:\\((?!--+\\))(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"']))+\\)))(?:(?:\\s*,\\s*)(?:(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*|(?:\\((?!--+\\))(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"']))+\\))))*))(?:\\s*((?<!(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"'])))(?:::|∷)(?!(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"']))))))(.*)(?<!(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"'])))(<-|=)(?!(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"'])))",
|
944
935
|
"captures": {
|
945
936
|
"2": {
|
946
937
|
"patterns": [
|
@@ -1006,7 +997,7 @@
|
|
1006
997
|
"patterns": [
|
1007
998
|
{
|
1008
999
|
"name": "keyword.operator.haskell",
|
1009
|
-
"match": "[\\p{S}\\p{P}
|
1000
|
+
"match": "(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"']))+"
|
1010
1001
|
}
|
1011
1002
|
]
|
1012
1003
|
},
|
@@ -11,18 +11,18 @@
|
|
11
11
|
"classNameOne": "[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*",
|
12
12
|
"functionName": "(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*",
|
13
13
|
"className": "[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*",
|
14
|
-
"operatorChar": "[\\p{S}\\p{P}
|
15
|
-
"operator": "[\\p{S}\\p{P}
|
16
|
-
"operatorFun": "(?:\\((?!--+\\))[\\p{S}\\p{P}
|
14
|
+
"operatorChar": "(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"']))",
|
15
|
+
"operator": "(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"']))+",
|
16
|
+
"operatorFun": "(?:\\((?!--+\\))(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"']))+\\))",
|
17
17
|
"basicChar": "[\\ -\\[\\]-~]",
|
18
18
|
"escapeChar": "\\\\(?:NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|[abfnrtv\\\\\\\"'\\&])",
|
19
19
|
"octalChar": "(?:\\\\o[0-7]+)",
|
20
20
|
"hexChar": "(?:\\\\x[0-9A-Fa-f]+)",
|
21
21
|
"controlChar": "(?:\\\\\\^[A-Z@\\[\\]\\\\^_])",
|
22
|
-
"character": "(?:[\\ -\\[\\]-~]|\\\\(?:NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|[abfnrtv\\\\\\\"'\\&])|(?:\\\\o[0-7]+)|(?:\\\\x[0-9A-Fa-f]+)|(?:\\\\\\^[A-Z@\\[\\]\\\\^_])|[\\p{S}\\p{P}
|
23
|
-
"functionTypeDeclaration": "(?:(?:((?:(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{L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ll}_\\p{Lu}\\p{Lt}']))where(?:(?<=[\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}'])(?![\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}'])))(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*|(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*))",
|
@@ -119,11 +119,6 @@
|
|
119
119
|
{
|
120
120
|
"begin": "(^[ \\t]+)?(?=--+\\s+[|^])",
|
121
121
|
"end": "(?!\\G)",
|
122
|
-
"beginCaptures": {
|
123
|
-
"1": {
|
124
|
-
"name": "punctuation.whitespace.comment.leading.haskell"
|
125
|
-
}
|
126
|
-
},
|
127
122
|
"patterns": [
|
128
123
|
{
|
129
124
|
"name": "comment.line.double-dash.haddock.haskell",
|
@@ -141,13 +136,8 @@
|
|
141
136
|
]
|
142
137
|
},
|
143
138
|
{
|
144
|
-
"begin": "(^[ \\t]+)?(?=--+(?![\\p{S}\\p{P}
|
139
|
+
"begin": "(^[ \\t]+)?(?=--+(?!(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"']))))",
|
145
140
|
"end": "(?!\\G)",
|
146
|
-
"beginCaptures": {
|
147
|
-
"1": {
|
148
|
-
"name": "punctuation.whitespace.comment.leading.haskell"
|
149
|
-
}
|
150
|
-
},
|
151
141
|
"patterns": [
|
152
142
|
{
|
153
143
|
"name": "comment.line.double-dash.haskell",
|
@@ -190,7 +180,7 @@
|
|
190
180
|
"patterns": [
|
191
181
|
{
|
192
182
|
"name": "entity.name.function.infix.haskell",
|
193
|
-
"match": "(?:\\((?!--+\\))[\\p{S}\\p{P}
|
183
|
+
"match": "(?:\\((?!--+\\))(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"']))+\\))"
|
194
184
|
}
|
195
185
|
]
|
196
186
|
},
|
@@ -200,6 +190,7 @@
|
|
200
190
|
"name": "meta.declaration.exports.haskell",
|
201
191
|
"begin": "\\(",
|
202
192
|
"end": "\\)",
|
193
|
+
"applyEndPatternLast": 1,
|
203
194
|
"patterns": [
|
204
195
|
{
|
205
196
|
"include": "#comments"
|
@@ -275,7 +266,7 @@
|
|
275
266
|
"patterns": [
|
276
267
|
{
|
277
268
|
"name": "meta.function.type-declaration.haskell",
|
278
|
-
"begin": "^([ \\t]*)(?:(?:((?:(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*|(?:\\((?!--+\\))[\\p{S}\\p{P}
|
269
|
+
"begin": "^([ \\t]*)(?:(?:((?:(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*|(?:\\((?!--+\\))(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"']))+\\)))(?:(?:\\s*,\\s*)(?:(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*|(?:\\((?!--+\\))(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"']))+\\))))*))(?:\\s*((?<!(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"'])))(?:::|∷)(?!(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"']))))))",
|
279
270
|
"end": "^(?!\\1[ \\t]|[ \\t]*$)",
|
280
271
|
"contentName": "meta.type-signature.haskell",
|
281
272
|
"beginCaptures": {
|
@@ -305,7 +296,7 @@
|
|
305
296
|
"patterns": [
|
306
297
|
{
|
307
298
|
"name": "meta.ctor.type-declaration.haskell",
|
308
|
-
"begin": "^([ \\t]*)(?:(?:((?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*|(?:\\((?!--+\\))[\\p{S}\\p{P}
|
299
|
+
"begin": "^([ \\t]*)(?:(?:((?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*|(?:\\((?!--+\\))(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"']))+\\)))(?:(?:\\s*,\\s*)(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*|(?:\\((?!--+\\))(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"']))+\\))))*))(?:\\s*((?<!(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"'])))(?:::|∷)(?!(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"']))))))",
|
309
300
|
"end": "^(?!\\1[ \\t]|[ \\t]*$)",
|
310
301
|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\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*|(?:\\((?!--+\\))(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"']))+\\))))*))(?:\\s*((?<!(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"'])))(?:::|∷)(?!(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"']))))))",
|
330
|
+
"end": "(?=(?:(?:((?:(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*|(?:\\((?!--+\\))(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"']))+\\)))(?:(?:\\s*,\\s*)(?:(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*|(?:\\((?!--+\\))(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"']))+\\))))*))(?:\\s*((?<!(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"'])))(?:::|∷)(?!(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"']))))))|})",
|
340
331
|
"contentName": "meta.type-signature.haskell",
|
341
332
|
"beginCaptures": {
|
342
333
|
"1": {
|
@@ -384,11 +375,11 @@
|
|
384
375
|
},
|
385
376
|
{
|
386
377
|
"name": "keyword.other.arrow.haskell",
|
387
|
-
"match": "(?<![\\p{S}\\p{P}
|
378
|
+
"match": "(?<!(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"'])))(->|→)(?!(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"'])))"
|
388
379
|
},
|
389
380
|
{
|
390
381
|
"name": "keyword.other.big-arrow.haskell",
|
391
|
-
"match": "(?<![\\p{S}\\p{P}
|
382
|
+
"match": "(?<!(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"'])))(=>|⇒)(?!(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"'])))"
|
392
383
|
},
|
393
384
|
{
|
394
385
|
"include": "#operator"
|
@@ -910,7 +901,7 @@
|
|
910
901
|
"patterns": [
|
911
902
|
{
|
912
903
|
"name": "string.quoted.single.haskell",
|
913
|
-
"match": "(')((?:[\\ -\\[\\]-~]|\\\\(?:NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|[abfnrtv\\\\\\\"'\\&])|(?:\\\\o[0-7]+)|(?:\\\\x[0-9A-Fa-f]+)|(?:\\\\\\^[A-Z@\\[\\]\\\\^_])|[\\p{S}\\p{P}
|
904
|
+
"match": "(')((?:[\\ -\\[\\]-~]|\\\\(?:NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|[abfnrtv\\\\\\\"'\\&])|(?:\\\\o[0-7]+)|(?:\\\\x[0-9A-Fa-f]+)|(?:\\\\\\^[A-Z@\\[\\]\\\\^_])|(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"']))))(')",
|
914
905
|
"captures": {
|
915
906
|
"1": {
|
916
907
|
"name": "punctuation.definition.string.begin.haskell"
|
@@ -932,7 +923,7 @@
|
|
932
923
|
"scoped_type": {
|
933
924
|
"patterns": [
|
934
925
|
{
|
935
|
-
"match": "\\(((?<paren>(?:[^\\(\\)]|\\(\\g<paren>\\))*)(?<![\\p{S}\\p{P}
|
926
|
+
"match": "\\(((?<paren>(?:[^\\(\\)]|\\(\\g<paren>\\))*)(?<!(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"'])))(?:::|∷)(?!(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"'])))(?<paren2>(?:[^\\(\\)]|\\(\\g<paren2>\\))*))\\)",
|
936
927
|
"captures": {
|
937
928
|
"1": {
|
938
929
|
"patterns": [
|
@@ -944,7 +935,7 @@
|
|
944
935
|
}
|
945
936
|
},
|
946
937
|
{
|
947
|
-
"match": "((?<![\\p{S}\\p{P}
|
938
|
+
"match": "((?<!(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"'])))(?:::|∷)(?!(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"']))))(.*?)(?=(?<!(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"'])))(<-|=)(?!(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"'])))|$)",
|
948
939
|
"captures": {
|
949
940
|
"1": {
|
950
941
|
"name": "keyword.other.double-colon.haskell"
|
@@ -964,7 +955,7 @@
|
|
964
955
|
"scoped_type_override": {
|
965
956
|
"patterns": [
|
966
957
|
{
|
967
|
-
"match": "^([ \\t]*)(?:(?:((?:(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*|(?:\\((?!--+\\))[\\p{S}\\p{P}
|
958
|
+
"match": "^([ \\t]*)(?:(?:((?:(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*|(?:\\((?!--+\\))(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"']))+\\)))(?:(?:\\s*,\\s*)(?:(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*|(?:\\((?!--+\\))(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"']))+\\))))*))(?:\\s*((?<!(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"'])))(?:::|∷)(?!(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"']))))))(.*)(?<!(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"'])))(<-|=)(?!(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"'])))",
|
968
959
|
"captures": {
|
969
960
|
"2": {
|
970
961
|
"patterns": [
|
@@ -1030,7 +1021,7 @@
|
|
1030
1021
|
"patterns": [
|
1031
1022
|
{
|
1032
1023
|
"name": "keyword.operator.haskell",
|
1033
|
-
"match": "[\\p{S}\\p{P}
|
1024
|
+
"match": "(?:[\\p{S}\\p{P}](?<![(),;\\[\\]`{}_\"']))+"
|
1034
1025
|
}
|
1035
1026
|
]
|
1036
1027
|
},
|