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.
- checksums.yaml +4 -4
- data/grammars/annotation.liquidhaskell.haskell.json +122 -24
- data/grammars/etc.json +7 -0
- data/grammars/hint.haskell.json +122 -24
- data/grammars/hint.message.haskell.json +122 -24
- data/grammars/hint.type.haskell.json +122 -24
- data/grammars/injections.etc.json +48 -10
- data/grammars/source.abnf.json +180 -353
- data/grammars/source.ballerina.json +205 -50
- data/grammars/source.bnf.json +191 -0
- data/grammars/source.cabal.json +1 -1
- data/grammars/source.ditroff.desc.json +1 -1
- data/grammars/source.ebnf.json +157 -147
- data/grammars/source.editorconfig.json +30 -5
- data/grammars/source.emacs.lisp.json +4 -4
- data/grammars/source.gremlin.json +200 -0
- data/grammars/source.haproxy-config.json +65 -13
- data/grammars/source.haskell.json +122 -24
- data/grammars/source.hql.json +1 -1
- data/grammars/source.hsig.json +122 -24
- data/grammars/source.hx.json +5 -5
- data/grammars/source.hxml.json +4 -4
- data/grammars/source.ideal.json +4 -4
- data/grammars/source.igor.json +325 -0
- data/grammars/source.jlex.json +322 -0
- data/grammars/source.julia.json +132 -1
- data/grammars/source.lean.json +103 -54
- data/grammars/source.lex.json +232 -0
- data/grammars/source.lex.regexp.json +269 -0
- data/grammars/source.logos.json +1 -1
- data/grammars/source.meson.json +1 -1
- data/grammars/source.mlir.json +389 -0
- data/grammars/source.nanorc.json +3 -0
- data/grammars/source.pic.json +19 -19
- data/grammars/source.plist.json +336 -0
- data/grammars/source.powershell.json +2 -2
- data/grammars/source.purescript.json +2 -2
- data/grammars/source.rascal.json +1 -0
- data/grammars/source.regexp.extended.json +544 -6
- data/grammars/source.regexp.json +408 -31
- data/grammars/source.renpy.json +3 -1
- data/grammars/source.scala.json +199 -97
- data/grammars/source.smpl.json +314 -0
- data/grammars/source.solidity.json +1 -1
- data/grammars/source.sourcepawn.json +654 -0
- data/grammars/source.sqf.json +5 -1
- data/grammars/source.swift.json +56 -11
- data/grammars/source.sy.json +800 -0
- data/grammars/source.ts.json +64 -47
- data/grammars/source.tsx.json +65 -48
- data/grammars/source.v.json +1184 -0
- data/grammars/source.viml.json +31 -31
- data/grammars/source.wollok.json +1 -1
- data/grammars/source.xojo.json +2 -2
- data/grammars/source.yacc.json +626 -0
- data/grammars/source.yara.json +1 -1
- data/grammars/source.yasnippet.json +15 -25
- data/grammars/source.zeek.json +4 -4
- data/grammars/source.zig.json +594 -195
- data/grammars/text.eml.basic.json +19 -6
- data/grammars/text.html.php.blade.json +3 -3
- data/grammars/text.plain.json +18 -0
- data/grammars/text.roff.json +926 -437
- data/grammars/text.runoff.json +3 -3
- data/grammars/text.tex.latex.haskell.json +122 -24
- data/grammars/text.texinfo.json +1525 -0
- data/grammars/text.xml.plist.json +664 -0
- data/grammars/text.xml.svg.json +556 -0
- data/grammars/version +1 -1
- data/lib/linguist.rb +3 -1
- data/lib/linguist/VERSION +1 -1
- data/lib/linguist/generated.rb +62 -17
- data/lib/linguist/heuristics.yml +13 -0
- data/lib/linguist/language.rb +1 -11
- data/lib/linguist/languages.json +1 -1
- data/lib/linguist/languages.yml +179 -19
- data/lib/linguist/samples.json +2778 -732
- data/lib/linguist/strategy/manpage.rb +42 -0
- metadata +22 -5
- data/grammars/source.bison.json +0 -55
- data/grammars/source.sp.json +0 -113
data/grammars/source.lean.json
CHANGED
@@ -3,76 +3,73 @@
|
|
3
3
|
"scopeName": "source.lean",
|
4
4
|
"patterns": [
|
5
5
|
{
|
6
|
-
"include": "#
|
6
|
+
"include": "#comments"
|
7
7
|
},
|
8
8
|
{
|
9
|
-
"
|
10
|
-
|
11
|
-
|
12
|
-
"
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
"
|
9
|
+
"name": "meta.definitioncommand.lean",
|
10
|
+
"begin": "\\b(?\u003c!\\.)(inductive|coinductive|structure|theorem|axiom|axioms|abbreviation|lemma|definition|def|instance|class|constant)\\b\\s+(\\{[^}]*\\})?",
|
11
|
+
"end": "(?=\\bwith\\b|\\bextends\\b|[:\\|\\(\\[\\{⦃\u003c\u003e])",
|
12
|
+
"patterns": [
|
13
|
+
{
|
14
|
+
"include": "#comments"
|
15
|
+
},
|
16
|
+
{
|
17
|
+
"include": "#definitionName"
|
18
|
+
},
|
19
|
+
{
|
20
|
+
"match": ","
|
18
21
|
}
|
19
|
-
|
20
|
-
},
|
21
|
-
{
|
22
|
-
"name": "meta.names.lean",
|
23
|
-
"begin": "\\b(inductive|structure|record|theorem|proposition|axiom|axioms|lemma|hypothesis|definition|def|instance|class|constant)\\b[ \\t\\n\\r({\\[]+([^ \\t\\n\\r{(\\[]*)",
|
24
|
-
"end": "[ \\t\\n\\r{(\\[]",
|
22
|
+
],
|
25
23
|
"beginCaptures": {
|
26
24
|
"1": {
|
27
|
-
"name": "keyword.other.lean"
|
28
|
-
},
|
29
|
-
"2": {
|
30
|
-
"name": "variable.language.lean"
|
25
|
+
"name": "keyword.other.definitioncommand.lean"
|
31
26
|
}
|
32
27
|
}
|
33
28
|
},
|
34
29
|
{
|
35
|
-
"name": "
|
36
|
-
"
|
37
|
-
"end": "\"",
|
38
|
-
"patterns": [
|
39
|
-
{
|
40
|
-
"name": "constant.character.escape.lean",
|
41
|
-
"match": "\\\\."
|
42
|
-
}
|
43
|
-
]
|
30
|
+
"name": "storage.type.lean",
|
31
|
+
"match": "\\b(Prop|Type|Sort)\\b"
|
44
32
|
},
|
45
33
|
{
|
46
|
-
"name": "storage.
|
47
|
-
"match": "\\b
|
34
|
+
"name": "storage.modifier.lean",
|
35
|
+
"match": "\\battribute\\b\\s*\\[[^\\]]*\\]"
|
48
36
|
},
|
49
37
|
{
|
50
38
|
"name": "storage.modifier.lean",
|
51
39
|
"match": "@\\[[^\\]]*\\]"
|
52
40
|
},
|
53
41
|
{
|
54
|
-
"name": "
|
55
|
-
"match": "
|
42
|
+
"name": "keyword.control.definition.modifier.lean",
|
43
|
+
"match": "\\b(?\u003c!\\.)(private|meta|mutual|protected|noncomputable)\\b"
|
56
44
|
},
|
57
45
|
{
|
58
|
-
"name": "
|
59
|
-
"match": "\\b(
|
46
|
+
"name": "invalid.illegal.lean",
|
47
|
+
"match": "\\b(sorry)\\b"
|
48
|
+
},
|
49
|
+
{
|
50
|
+
"name": "keyword.other.command.lean",
|
51
|
+
"match": "#print\\s+(def|definition|inductive|instance|structure|axiom|axioms|class)\\b"
|
52
|
+
},
|
53
|
+
{
|
54
|
+
"name": "keyword.other.command.lean",
|
55
|
+
"match": "#(print|eval|reduce|check|help|exit|find|where)\\b"
|
60
56
|
},
|
61
57
|
{
|
62
58
|
"name": "keyword.other.lean",
|
63
|
-
"match": "\\b(
|
59
|
+
"match": "\\b(?\u003c!\\.)(import|prelude|theory|definition|def|abbreviation|instance|renaming|hiding|exposing|parameter|parameters|begin|constant|constants|lemma|variable|variables|theorem|example|open|axiom|inductive|coinductive|with|structure|universe|universes|alias|precedence|reserve|postfix|prefix|infix|infixl|infixr|notation|end|using|namespace|section|local|set_option|extends|include|omit|class|classes|instances|raw|run_cmd|restate_axiom)(?!\\.)\\b"
|
64
60
|
},
|
65
61
|
{
|
66
|
-
"name": "
|
67
|
-
"match": "(
|
62
|
+
"name": "keyword.other.lean",
|
63
|
+
"match": "\\b(?\u003c!\\.)(calc|have|this|match|do|suffices|show|by|in|at|let|forall|fun|exists|assume|from|λ)(?!\\.)\\b"
|
68
64
|
},
|
69
65
|
{
|
70
|
-
"
|
71
|
-
"
|
66
|
+
"contentName": "entity.name.lean",
|
67
|
+
"begin": "«",
|
68
|
+
"end": "»"
|
72
69
|
},
|
73
70
|
{
|
74
|
-
"name": "keyword.
|
75
|
-
"match": "(?\u003c
|
71
|
+
"name": "keyword.control.lean",
|
72
|
+
"match": "\\b(?\u003c!\\.)(if|then|else)\\b"
|
76
73
|
},
|
77
74
|
{
|
78
75
|
"name": "string.quoted.double.lean",
|
@@ -81,15 +78,15 @@
|
|
81
78
|
"patterns": [
|
82
79
|
{
|
83
80
|
"name": "constant.character.escape.lean",
|
84
|
-
"match": "\\\\
|
81
|
+
"match": "\\\\[\\\\\"nt']"
|
85
82
|
},
|
86
83
|
{
|
87
|
-
"name": "constant.character.escape.
|
88
|
-
"match": "\\\\
|
84
|
+
"name": "constant.character.escape.lean",
|
85
|
+
"match": "\\\\x[0-9A-Fa-f][0-9A-Fa-f]"
|
89
86
|
},
|
90
87
|
{
|
91
|
-
"name": "constant.character.escape.
|
92
|
-
"match": "
|
88
|
+
"name": "constant.character.escape.lean",
|
89
|
+
"match": "\\\\u[0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f]"
|
93
90
|
}
|
94
91
|
],
|
95
92
|
"beginCaptures": {
|
@@ -103,6 +100,23 @@
|
|
103
100
|
}
|
104
101
|
}
|
105
102
|
},
|
103
|
+
{
|
104
|
+
"name": "string.quoted.single.lean",
|
105
|
+
"match": "'[^\\\\']'"
|
106
|
+
},
|
107
|
+
{
|
108
|
+
"name": "string.quoted.single.lean",
|
109
|
+
"match": "'(\\\\(x..|u....|.))'",
|
110
|
+
"captures": {
|
111
|
+
"1": {
|
112
|
+
"name": "constant.character.escape.lean"
|
113
|
+
}
|
114
|
+
}
|
115
|
+
},
|
116
|
+
{
|
117
|
+
"name": "entity.name.lean",
|
118
|
+
"match": "`+[^\\[(]\\S+"
|
119
|
+
},
|
106
120
|
{
|
107
121
|
"name": "constant.numeric.lean",
|
108
122
|
"match": "\\b([0-9]+|0([xX][0-9a-fA-F]+))\\b"
|
@@ -113,11 +127,27 @@
|
|
113
127
|
"name": "comment.block.lean",
|
114
128
|
"begin": "/-",
|
115
129
|
"end": "-/",
|
116
|
-
"
|
117
|
-
|
118
|
-
"
|
130
|
+
"patterns": [
|
131
|
+
{
|
132
|
+
"include": "#blockComment"
|
119
133
|
}
|
120
|
-
|
134
|
+
]
|
135
|
+
},
|
136
|
+
"comments": {
|
137
|
+
"patterns": [
|
138
|
+
{
|
139
|
+
"include": "#dashComment"
|
140
|
+
},
|
141
|
+
{
|
142
|
+
"include": "#docComment"
|
143
|
+
},
|
144
|
+
{
|
145
|
+
"include": "#modDocComment"
|
146
|
+
},
|
147
|
+
{
|
148
|
+
"include": "#blockComment"
|
149
|
+
}
|
150
|
+
]
|
121
151
|
},
|
122
152
|
"dashComment": {
|
123
153
|
"name": "comment.line.double-dash.lean",
|
@@ -129,9 +159,28 @@
|
|
129
159
|
}
|
130
160
|
}
|
131
161
|
},
|
132
|
-
"
|
133
|
-
"
|
134
|
-
|
162
|
+
"definitionName": {
|
163
|
+
"patterns": [
|
164
|
+
{
|
165
|
+
"name": "entity.name.function.lean",
|
166
|
+
"match": "\\b[^:«»\\(\\)\\{\\}[:space:]=→λ∀?][^:«»\\(\\)\\{\\}[:space:]]*"
|
167
|
+
},
|
168
|
+
{
|
169
|
+
"contentName": "entity.name.function.lean",
|
170
|
+
"begin": "«",
|
171
|
+
"end": "»"
|
172
|
+
}
|
173
|
+
]
|
174
|
+
},
|
175
|
+
"docComment": {
|
176
|
+
"name": "comment.block.documentation.lean",
|
177
|
+
"begin": "/--",
|
178
|
+
"end": "-/"
|
179
|
+
},
|
180
|
+
"modDocComment": {
|
181
|
+
"name": "comment.block.documentation.lean",
|
182
|
+
"begin": "/-!",
|
183
|
+
"end": "-/"
|
135
184
|
}
|
136
185
|
}
|
137
186
|
}
|
@@ -0,0 +1,232 @@
|
|
1
|
+
{
|
2
|
+
"name": "Lex",
|
3
|
+
"scopeName": "source.lex",
|
4
|
+
"patterns": [
|
5
|
+
{
|
6
|
+
"include": "#main"
|
7
|
+
}
|
8
|
+
],
|
9
|
+
"repository": {
|
10
|
+
"comments": {
|
11
|
+
"patterns": [
|
12
|
+
{
|
13
|
+
"name": "comment.block.lex",
|
14
|
+
"begin": "/\\*",
|
15
|
+
"end": "\\*/",
|
16
|
+
"beginCaptures": {
|
17
|
+
"0": {
|
18
|
+
"name": "punctuation.definition.begin.comment.lex"
|
19
|
+
}
|
20
|
+
},
|
21
|
+
"endCaptures": {
|
22
|
+
"0": {
|
23
|
+
"name": "punctuation.definition.end.comment.lex"
|
24
|
+
}
|
25
|
+
}
|
26
|
+
},
|
27
|
+
{
|
28
|
+
"name": "comment.line.double-slash.lex",
|
29
|
+
"begin": "//",
|
30
|
+
"end": "(?=$)",
|
31
|
+
"beginCaptures": {
|
32
|
+
"0": {
|
33
|
+
"name": "punctuation.definition.comment.lex"
|
34
|
+
}
|
35
|
+
}
|
36
|
+
}
|
37
|
+
]
|
38
|
+
},
|
39
|
+
"definition": {
|
40
|
+
"name": "meta.definition.lex",
|
41
|
+
"begin": "^\\s*([A-Za-z_][A-Za-z0-9_-]*)",
|
42
|
+
"end": "$",
|
43
|
+
"patterns": [
|
44
|
+
{
|
45
|
+
"name": "meta.pattern.lex",
|
46
|
+
"match": "(?\u003c=\\s)\\S.*",
|
47
|
+
"captures": {
|
48
|
+
"0": {
|
49
|
+
"patterns": [
|
50
|
+
{
|
51
|
+
"include": "source.lex.regexp"
|
52
|
+
}
|
53
|
+
]
|
54
|
+
}
|
55
|
+
}
|
56
|
+
}
|
57
|
+
],
|
58
|
+
"beginCaptures": {
|
59
|
+
"1": {
|
60
|
+
"name": "entity.name.definition.lex"
|
61
|
+
}
|
62
|
+
}
|
63
|
+
},
|
64
|
+
"definitions": {
|
65
|
+
"name": "meta.definitions.lex",
|
66
|
+
"begin": "\\A(?!\\s*%%)",
|
67
|
+
"end": "^(?=\\s*(?:%%|(?:package|import)\\s+\\w))",
|
68
|
+
"patterns": [
|
69
|
+
{
|
70
|
+
"include": "#comments"
|
71
|
+
},
|
72
|
+
{
|
73
|
+
"include": "#directives"
|
74
|
+
},
|
75
|
+
{
|
76
|
+
"include": "#passthrough"
|
77
|
+
},
|
78
|
+
{
|
79
|
+
"include": "#definition"
|
80
|
+
}
|
81
|
+
]
|
82
|
+
},
|
83
|
+
"directives": {
|
84
|
+
"name": "meta.directive.lex",
|
85
|
+
"begin": "^\\s*((%)\\w+)(?=\\s|$)",
|
86
|
+
"end": "(?=$)",
|
87
|
+
"patterns": [
|
88
|
+
{
|
89
|
+
"include": "#comments"
|
90
|
+
},
|
91
|
+
{
|
92
|
+
"name": "constant.language.other.lex",
|
93
|
+
"match": "\\S+"
|
94
|
+
}
|
95
|
+
],
|
96
|
+
"captures": {
|
97
|
+
"1": {
|
98
|
+
"name": "keyword.control.directive.lex"
|
99
|
+
},
|
100
|
+
"2": {
|
101
|
+
"name": "punctuation.definition.directive.lex"
|
102
|
+
}
|
103
|
+
}
|
104
|
+
},
|
105
|
+
"jlex": {
|
106
|
+
"name": "meta.jlex.lex",
|
107
|
+
"begin": "^(?=\\s*(?:package|import)\\s+\\w)",
|
108
|
+
"end": "(?=A)B",
|
109
|
+
"patterns": [
|
110
|
+
{
|
111
|
+
"include": "source.jlex"
|
112
|
+
}
|
113
|
+
]
|
114
|
+
},
|
115
|
+
"main": {
|
116
|
+
"patterns": [
|
117
|
+
{
|
118
|
+
"include": "#jlex"
|
119
|
+
},
|
120
|
+
{
|
121
|
+
"include": "#comments"
|
122
|
+
},
|
123
|
+
{
|
124
|
+
"include": "#definitions"
|
125
|
+
},
|
126
|
+
{
|
127
|
+
"include": "#rules"
|
128
|
+
},
|
129
|
+
{
|
130
|
+
"include": "source.c++"
|
131
|
+
}
|
132
|
+
]
|
133
|
+
},
|
134
|
+
"passthrough": {
|
135
|
+
"name": "meta.code-chunk.lex",
|
136
|
+
"begin": "^%{",
|
137
|
+
"end": "^%}",
|
138
|
+
"patterns": [
|
139
|
+
{
|
140
|
+
"include": "source.c++"
|
141
|
+
}
|
142
|
+
],
|
143
|
+
"beginCaptures": {
|
144
|
+
"0": {
|
145
|
+
"name": "punctuation.section.embedded.begin.lex"
|
146
|
+
}
|
147
|
+
},
|
148
|
+
"endCaptures": {
|
149
|
+
"0": {
|
150
|
+
"name": "punctuation.section.embedded.end.lex"
|
151
|
+
}
|
152
|
+
}
|
153
|
+
},
|
154
|
+
"rule.action": {
|
155
|
+
"name": "meta.action.lex",
|
156
|
+
"begin": "(?\u003c!^)(?=\\S)",
|
157
|
+
"end": "(?=\\s*$|^)",
|
158
|
+
"patterns": [
|
159
|
+
{
|
160
|
+
"include": "#comments"
|
161
|
+
},
|
162
|
+
{
|
163
|
+
"begin": "(?={)",
|
164
|
+
"end": "(?\u003c=})",
|
165
|
+
"patterns": [
|
166
|
+
{
|
167
|
+
"include": "source.c++"
|
168
|
+
}
|
169
|
+
]
|
170
|
+
},
|
171
|
+
{
|
172
|
+
"match": "([^{\\s][^{]*?)\\s*$",
|
173
|
+
"captures": {
|
174
|
+
"1": {
|
175
|
+
"patterns": [
|
176
|
+
{
|
177
|
+
"include": "source.c++"
|
178
|
+
}
|
179
|
+
]
|
180
|
+
}
|
181
|
+
}
|
182
|
+
}
|
183
|
+
]
|
184
|
+
},
|
185
|
+
"rule.pattern": {
|
186
|
+
"name": "meta.pattern.lex",
|
187
|
+
"begin": "(?\u003c=^|\\n)(?=\\S)",
|
188
|
+
"end": "(?=\\s|$)",
|
189
|
+
"patterns": [
|
190
|
+
{
|
191
|
+
"include": "source.lex.regexp"
|
192
|
+
}
|
193
|
+
]
|
194
|
+
},
|
195
|
+
"rules": {
|
196
|
+
"begin": "^\\s*(%%)\\s*(?:$\\s*|(?=/\\*))",
|
197
|
+
"end": "^\\s*(%%)\\s*(?:$\\s*|(?=/\\*))",
|
198
|
+
"patterns": [
|
199
|
+
{
|
200
|
+
"include": "#passthrough"
|
201
|
+
},
|
202
|
+
{
|
203
|
+
"include": "#rule.pattern"
|
204
|
+
},
|
205
|
+
{
|
206
|
+
"include": "#rule.action"
|
207
|
+
}
|
208
|
+
],
|
209
|
+
"beginCaptures": {
|
210
|
+
"1": {
|
211
|
+
"name": "keyword.control.section.begin.lex"
|
212
|
+
}
|
213
|
+
},
|
214
|
+
"endCaptures": {
|
215
|
+
"1": {
|
216
|
+
"name": "keyword.control.section.end.lex"
|
217
|
+
}
|
218
|
+
}
|
219
|
+
},
|
220
|
+
"user-code": {
|
221
|
+
"name": "meta.user-code.lex",
|
222
|
+
"contentName": "source.embedded.cpp",
|
223
|
+
"begin": "(?\u003c=^%%|\\s%%)",
|
224
|
+
"end": "(?=A)B",
|
225
|
+
"patterns": [
|
226
|
+
{
|
227
|
+
"include": "source.c++"
|
228
|
+
}
|
229
|
+
]
|
230
|
+
}
|
231
|
+
}
|
232
|
+
}
|