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,260 @@
|
|
1
|
+
{
|
2
|
+
"name": "J",
|
3
|
+
"scopeName": "source.j",
|
4
|
+
"patterns": [
|
5
|
+
{
|
6
|
+
"include": "#operator"
|
7
|
+
},
|
8
|
+
{
|
9
|
+
"include": "#copula"
|
10
|
+
},
|
11
|
+
{
|
12
|
+
"include": "#string"
|
13
|
+
},
|
14
|
+
{
|
15
|
+
"include": "#bracket"
|
16
|
+
},
|
17
|
+
{
|
18
|
+
"include": "#explicit_defn"
|
19
|
+
},
|
20
|
+
{
|
21
|
+
"include": "#noun_defn"
|
22
|
+
},
|
23
|
+
{
|
24
|
+
"include": "#number"
|
25
|
+
},
|
26
|
+
{
|
27
|
+
"include": "#note"
|
28
|
+
},
|
29
|
+
{
|
30
|
+
"include": "#comment"
|
31
|
+
}
|
32
|
+
],
|
33
|
+
"repository": {
|
34
|
+
"bracket": {
|
35
|
+
"patterns": [
|
36
|
+
{
|
37
|
+
"name": "meta.bracket.j",
|
38
|
+
"match": "(?:\\(|\\)|,)(?!('|(?:\\.'))*\\.?')"
|
39
|
+
}
|
40
|
+
]
|
41
|
+
},
|
42
|
+
"comment": {
|
43
|
+
"patterns": [
|
44
|
+
{
|
45
|
+
"name": "comment.line.j",
|
46
|
+
"begin": "NB\\.",
|
47
|
+
"end": "\\n",
|
48
|
+
"beginCaptures": {
|
49
|
+
"0": {
|
50
|
+
"name": "punctuation.definition.comment.begin.j"
|
51
|
+
}
|
52
|
+
}
|
53
|
+
}
|
54
|
+
]
|
55
|
+
},
|
56
|
+
"copula": {
|
57
|
+
"patterns": [
|
58
|
+
{
|
59
|
+
"name": "copula.global.j",
|
60
|
+
"match": "=:"
|
61
|
+
},
|
62
|
+
{
|
63
|
+
"name": "copula.local.j",
|
64
|
+
"match": "=\\."
|
65
|
+
}
|
66
|
+
]
|
67
|
+
},
|
68
|
+
"explicit_arg": {
|
69
|
+
"patterns": [
|
70
|
+
{
|
71
|
+
"name": "variable.parameter.j",
|
72
|
+
"match": "\\b[nmuvxy](?![\\w.:])"
|
73
|
+
}
|
74
|
+
]
|
75
|
+
},
|
76
|
+
"explicit_defn": {
|
77
|
+
"patterns": [
|
78
|
+
{
|
79
|
+
"name": "definition.explicit.block.j",
|
80
|
+
"begin": "\\b([1-4]|13|adverb|conjunction|verb|monad|dyad)\\s+(:\\s*0|define)\\b",
|
81
|
+
"end": "^\\s*\\)\\s*\\n",
|
82
|
+
"patterns": [
|
83
|
+
{
|
84
|
+
"include": "#explicit_arg"
|
85
|
+
},
|
86
|
+
{
|
87
|
+
"include": "#operator"
|
88
|
+
},
|
89
|
+
{
|
90
|
+
"include": "#copula"
|
91
|
+
},
|
92
|
+
{
|
93
|
+
"include": "#string"
|
94
|
+
},
|
95
|
+
{
|
96
|
+
"include": "#keyword"
|
97
|
+
},
|
98
|
+
{
|
99
|
+
"include": "#number"
|
100
|
+
},
|
101
|
+
{
|
102
|
+
"include": "#comment"
|
103
|
+
}
|
104
|
+
],
|
105
|
+
"beginCaptures": {
|
106
|
+
"0": {
|
107
|
+
"name": "punctuation.definition.explicit.begin.j"
|
108
|
+
}
|
109
|
+
},
|
110
|
+
"endCaptures": {
|
111
|
+
"0": {
|
112
|
+
"name": "punctuation.definition.explicit.end.j"
|
113
|
+
}
|
114
|
+
}
|
115
|
+
}
|
116
|
+
]
|
117
|
+
},
|
118
|
+
"keyword": {
|
119
|
+
"patterns": [
|
120
|
+
{
|
121
|
+
"name": "keyword.control.j",
|
122
|
+
"match": "\\b(if|do|else|elseif|for|select|case|fcase)\\.(?![.:])"
|
123
|
+
},
|
124
|
+
{
|
125
|
+
"name": "keyword.control.j",
|
126
|
+
"match": "\\b(assert|break|continue|return|while|whilst)\\.(?![.:])"
|
127
|
+
},
|
128
|
+
{
|
129
|
+
"name": "keyword.control.j",
|
130
|
+
"match": "\\b(throw|try|catch|catchd|catcht)\\.(?![.:])"
|
131
|
+
},
|
132
|
+
{
|
133
|
+
"name": "keyword.control.j",
|
134
|
+
"match": "\\b(for_[A-Za-z][A-Za-z_0-9]*|goto_[A-Za-z][A-Za-z_0-9]*|label_[A-Za-z][A-Za-z_0-9]*)\\.(?![.:])"
|
135
|
+
},
|
136
|
+
{
|
137
|
+
"name": "keyword.control.end.j",
|
138
|
+
"match": "\\bend\\.(?![.:])"
|
139
|
+
}
|
140
|
+
]
|
141
|
+
},
|
142
|
+
"note": {
|
143
|
+
"patterns": [
|
144
|
+
{
|
145
|
+
"name": "comment.block.note.j",
|
146
|
+
"begin": "^\\s*\\bNote\\b",
|
147
|
+
"end": "^\\s*\\)\\s*\\n",
|
148
|
+
"beginCaptures": {
|
149
|
+
"0": {
|
150
|
+
"name": "punctuation.definition.comment.begin.j"
|
151
|
+
}
|
152
|
+
},
|
153
|
+
"endCaptures": {
|
154
|
+
"0": {
|
155
|
+
"name": "punctuation.definition.comment.end.j"
|
156
|
+
}
|
157
|
+
}
|
158
|
+
},
|
159
|
+
{
|
160
|
+
"name": "comment.line.note.j",
|
161
|
+
"match": "\\bNote\\b(?!\\s*\\=[:.])\\s*[\\'\\d].*$"
|
162
|
+
}
|
163
|
+
]
|
164
|
+
},
|
165
|
+
"noun_defn": {
|
166
|
+
"patterns": [
|
167
|
+
{
|
168
|
+
"name": "string.noun.j",
|
169
|
+
"begin": "\\b(0|noun)\\s+(:\\s*0|define)\\b",
|
170
|
+
"end": "^\\s*\\)\\s*\\n",
|
171
|
+
"beginCaptures": {
|
172
|
+
"0": {
|
173
|
+
"name": "punctuation.definition.string.block.begin.j"
|
174
|
+
}
|
175
|
+
},
|
176
|
+
"endCaptures": {
|
177
|
+
"0": {
|
178
|
+
"name": "punctuation.definition.explicit.end.j"
|
179
|
+
}
|
180
|
+
}
|
181
|
+
}
|
182
|
+
]
|
183
|
+
},
|
184
|
+
"number": {
|
185
|
+
"patterns": [
|
186
|
+
{
|
187
|
+
"name": "constant.numeric.j",
|
188
|
+
"match": "\\b[_0-9][_0-9\\.a-zA-Z]*\\b(?![.:])"
|
189
|
+
}
|
190
|
+
]
|
191
|
+
},
|
192
|
+
"operator": {
|
193
|
+
"patterns": [
|
194
|
+
{
|
195
|
+
"name": "keyword.other.noun.j",
|
196
|
+
"match": "\\b(_\\.|a\\.|a:)(?![.:])"
|
197
|
+
},
|
198
|
+
{
|
199
|
+
"name": "keyword.operator.verb.j",
|
200
|
+
"match": "((_?[1-9]:)|(\\b0:)|({::))(?![.:])"
|
201
|
+
},
|
202
|
+
{
|
203
|
+
"name": "keyword.operator.verb.j",
|
204
|
+
"match": "\\b((p\\.\\.)|([AcCeEiIjLopr]\\.)|([ipqsux]:))(?![.:])"
|
205
|
+
},
|
206
|
+
{
|
207
|
+
"name": "keyword.operator.verb.j",
|
208
|
+
"match": "([\u003c\u003e\\+\\*\\-%$|,#{}^~\"?]\\.)(?![.:])"
|
209
|
+
},
|
210
|
+
{
|
211
|
+
"name": "keyword.operator.verb.j",
|
212
|
+
"match": "([\u003c\u003e\\+\\*\\-%$|,#{};~\"_/\\\\\\[]:)(?![.:])"
|
213
|
+
},
|
214
|
+
{
|
215
|
+
"name": "keyword.operator.verb.j",
|
216
|
+
"match": "([\u003c\u003e\\+\\*\\-%$|,#{!;^=?\\[\\]])(?![.:])"
|
217
|
+
},
|
218
|
+
{
|
219
|
+
"name": "keyword.operator.adverb.j",
|
220
|
+
"match": "\\b(([bfMt]\\.)|(t:))(?![.:])"
|
221
|
+
},
|
222
|
+
{
|
223
|
+
"name": "keyword.operator.adverb.j",
|
224
|
+
"match": "(([/\\\\]\\.)|([~/\\\\}]))(?![.:])"
|
225
|
+
},
|
226
|
+
{
|
227
|
+
"name": "keyword.operator.conjunction.j",
|
228
|
+
"match": "\\b(([dDHT]\\.)|([DLS]:))(?![.:])"
|
229
|
+
},
|
230
|
+
{
|
231
|
+
"name": "keyword.operator.conjunction.j",
|
232
|
+
"match": "((\u0026\\.:)|([\u0026@!;]\\.)|([\u0026@!`^]:)|([\u0026@`\"]))(?![.:])"
|
233
|
+
},
|
234
|
+
{
|
235
|
+
"name": "keyword.operator.conjunction.j",
|
236
|
+
"match": "\\s(([.:][.:])|([.:]))(?![.:])"
|
237
|
+
}
|
238
|
+
]
|
239
|
+
},
|
240
|
+
"string": {
|
241
|
+
"patterns": [
|
242
|
+
{
|
243
|
+
"name": "string.quoted.single.j",
|
244
|
+
"begin": "'",
|
245
|
+
"end": "'",
|
246
|
+
"beginCaptures": {
|
247
|
+
"0": {
|
248
|
+
"name": "punctuation.definition.string.begin.j"
|
249
|
+
}
|
250
|
+
},
|
251
|
+
"endCaptures": {
|
252
|
+
"0": {
|
253
|
+
"name": "punctuation.definition.string.end.j"
|
254
|
+
}
|
255
|
+
}
|
256
|
+
}
|
257
|
+
]
|
258
|
+
}
|
259
|
+
}
|
260
|
+
}
|
data/grammars/source.julia.json
CHANGED
@@ -81,11 +81,33 @@
|
|
81
81
|
]
|
82
82
|
},
|
83
83
|
"comment": {
|
84
|
+
"patterns": [
|
85
|
+
{
|
86
|
+
"include": "#comment_block"
|
87
|
+
},
|
88
|
+
{
|
89
|
+
"name": "comment.line.number-sign.julia",
|
90
|
+
"begin": "#",
|
91
|
+
"end": "\\n",
|
92
|
+
"beginCaptures": {
|
93
|
+
"0": {
|
94
|
+
"name": "punctuation.definition.comment.julia"
|
95
|
+
}
|
96
|
+
}
|
97
|
+
}
|
98
|
+
]
|
99
|
+
},
|
100
|
+
"comment_block": {
|
84
101
|
"patterns": [
|
85
102
|
{
|
86
103
|
"name": "comment.block.number-sign-equals.julia",
|
87
104
|
"begin": "#=",
|
88
105
|
"end": "=#",
|
106
|
+
"patterns": [
|
107
|
+
{
|
108
|
+
"include": "#comment_block"
|
109
|
+
}
|
110
|
+
],
|
89
111
|
"beginCaptures": {
|
90
112
|
"0": {
|
91
113
|
"name": "punctuation.definition.comment.begin.julia"
|
@@ -96,16 +118,6 @@
|
|
96
118
|
"name": "punctuation.definition.comment.end.julia"
|
97
119
|
}
|
98
120
|
}
|
99
|
-
},
|
100
|
-
{
|
101
|
-
"name": "comment.line.number-sign.julia",
|
102
|
-
"begin": "#",
|
103
|
-
"end": "\\n",
|
104
|
-
"beginCaptures": {
|
105
|
-
"0": {
|
106
|
-
"name": "punctuation.definition.comment.julia"
|
107
|
-
}
|
108
|
-
}
|
109
121
|
}
|
110
122
|
]
|
111
123
|
},
|
@@ -178,7 +190,7 @@
|
|
178
190
|
"patterns": [
|
179
191
|
{
|
180
192
|
"name": "keyword.other.julia",
|
181
|
-
"match": "\\b(?\u003c![:_\\.])(?:function|@generated|type|immutable|mutable|struct|macro|quote|abstract|bitstype|typealias|module|baremodule|new|where)\\b"
|
193
|
+
"match": "\\b(?\u003c![:_\\.])(?:function|@generated|type|immutable|mutable\\s+struct|struct|macro|quote|abstract\\s+type|primitive\\s+type|bitstype|typealias|module|baremodule|new|where)\\b"
|
182
194
|
},
|
183
195
|
{
|
184
196
|
"begin": "\\b(for)\\b",
|
@@ -207,7 +219,7 @@
|
|
207
219
|
"match": "\\b(?\u003c![:_])end\\b"
|
208
220
|
},
|
209
221
|
{
|
210
|
-
"name": "storage.modifier.
|
222
|
+
"name": "keyword.storage.modifier.julia",
|
211
223
|
"match": "\\b(?\u003c![:_])(?:global|local|const)\\b"
|
212
224
|
},
|
213
225
|
{
|
data/grammars/source.lisp.json
CHANGED
@@ -25,7 +25,7 @@
|
|
25
25
|
},
|
26
26
|
{
|
27
27
|
"name": "meta.function.lisp",
|
28
|
-
"match": "(\\b(?i:(defun|defmethod|defmacro))\\b)(\\s+)((\\w|\\-|\\!|\\?)*)",
|
28
|
+
"match": "(\\b(?i:(defun|defgeneric|defmethod|defmacro|defclass|defstruct|defconstant|defvar|defparameter))\\b)(\\s+)((\\w|\\-|\\!|\\?)*)",
|
29
29
|
"captures": {
|
30
30
|
"2": {
|
31
31
|
"name": "storage.type.function-type.lisp"
|
@@ -58,11 +58,11 @@
|
|
58
58
|
},
|
59
59
|
{
|
60
60
|
"name": "keyword.control.lisp",
|
61
|
-
"match": "\\b(?i:case|do|let|loop|if|else|when)\\b"
|
61
|
+
"match": "\\b(?i:case|ecase|ccase|typecase|etypecase|ctypecase|do|dolist|dotimes|let|let\\*|labels|flet|loop|if|else|when|unless)\\b"
|
62
62
|
},
|
63
63
|
{
|
64
64
|
"name": "keyword.operator.lisp",
|
65
|
-
"match": "\\b(?i:eq|neq|and|or)\\b"
|
65
|
+
"match": "\\b(?i:eq|neq|and|or|not)\\b"
|
66
66
|
},
|
67
67
|
{
|
68
68
|
"name": "constant.language.lisp",
|
data/grammars/source.mupad.json
CHANGED
data/grammars/source.pony.json
CHANGED
@@ -119,6 +119,9 @@
|
|
119
119
|
"name": "keyword.control.loop.pony",
|
120
120
|
"match": "\\b(while|do|repeat|until|for|in)\\b"
|
121
121
|
},
|
122
|
+
{
|
123
|
+
"match": "(\\?|[-=]\u003e)"
|
124
|
+
},
|
122
125
|
{
|
123
126
|
"match": "(\\-|\\+|\\*|/(?![/*])|%|\u003c\u003c|\u003e\u003e)"
|
124
127
|
},
|
@@ -128,9 +131,6 @@
|
|
128
131
|
{
|
129
132
|
"match": "\\b(is|isnt|not|and|or|xor)\\b"
|
130
133
|
},
|
131
|
-
{
|
132
|
-
"match": "(\\?|=\u003e)"
|
133
|
-
},
|
134
134
|
{
|
135
135
|
"match": "="
|
136
136
|
},
|
@@ -406,7 +406,7 @@
|
|
406
406
|
"patterns": [
|
407
407
|
{
|
408
408
|
"name": "comment.documentation.embedded.powershell",
|
409
|
-
"match": "^(?i:(?:\\s
|
409
|
+
"match": "^(?i:(?:\\s?|#)+(\\.)(COMPONENT|DESCRIPTION|EXAMPLE|EXTERNALHELP|FORWARDHELPCATEGORY|FORWARDHELPTARGETNAME|FUNCTIONALITY|INPUTS|LINK|NOTES|OUTPUTS|REMOTEHELPRUNSPACE|ROLE|SYNOPSIS))",
|
410
410
|
"captures": {
|
411
411
|
"1": {
|
412
412
|
"name": "constant.string.documentation.powershell"
|
@@ -418,7 +418,7 @@
|
|
418
418
|
},
|
419
419
|
{
|
420
420
|
"name": "comment.documentation.embedded.powershell",
|
421
|
-
"match": "(?i:\\s
|
421
|
+
"match": "(?i:\\s?(\\.)(PARAMETER|FORWARDHELPTARGETNAME|FORWARDHELPCATEGORY|REMOTEHELPRUNSPACE|EXTERNALHELP)\\s+([a-z0-9-_]+))",
|
422
422
|
"captures": {
|
423
423
|
"1": {
|
424
424
|
"name": "constant.string.documentation.powershell"
|
@@ -14,6 +14,18 @@
|
|
14
14
|
}
|
15
15
|
}
|
16
16
|
},
|
17
|
+
{
|
18
|
+
"name": "meta.syntax.declaration.protobuf",
|
19
|
+
"match": "(syntax)\\s*=\\s*(\".*\")",
|
20
|
+
"captures": {
|
21
|
+
"1": {
|
22
|
+
"name": "keyword.other.syntax.protobuf"
|
23
|
+
},
|
24
|
+
"2": {
|
25
|
+
"name": "string.quoted.double.syntax.protobuf"
|
26
|
+
}
|
27
|
+
}
|
28
|
+
},
|
17
29
|
{
|
18
30
|
"name": "meta.message-declaration.protobuf",
|
19
31
|
"begin": "\\b(message)\\s+([A-Za-z0-9_]+)\\s*\\{",
|
@@ -27,6 +39,9 @@
|
|
27
39
|
},
|
28
40
|
{
|
29
41
|
"include": "#comments"
|
42
|
+
},
|
43
|
+
{
|
44
|
+
"include": "#multiline_comments"
|
30
45
|
}
|
31
46
|
],
|
32
47
|
"captures": {
|
@@ -63,6 +78,9 @@
|
|
63
78
|
},
|
64
79
|
{
|
65
80
|
"include": "#comments"
|
81
|
+
},
|
82
|
+
{
|
83
|
+
"include": "#multiline_comments"
|
66
84
|
}
|
67
85
|
],
|
68
86
|
"beginCaptures": {
|
@@ -74,6 +92,45 @@
|
|
74
92
|
}
|
75
93
|
}
|
76
94
|
},
|
95
|
+
{
|
96
|
+
"name": "meta.oneof-declaration.protobuf",
|
97
|
+
"begin": "\\b(oneof)\\s+([A-Za-z0-9_]+)\\s*\\{",
|
98
|
+
"end": "}",
|
99
|
+
"patterns": [
|
100
|
+
{
|
101
|
+
"name": "meta.individual-oneof-definition.protobuf",
|
102
|
+
"match": "\\b([A-Za-z0-9_]+)\\s*=\\s*(\\d+)\\b",
|
103
|
+
"captures": {
|
104
|
+
"1": {
|
105
|
+
"name": "constant.other.user-defined.protobuf"
|
106
|
+
},
|
107
|
+
"2": {
|
108
|
+
"name": "constant.numeric.protobuf"
|
109
|
+
}
|
110
|
+
}
|
111
|
+
},
|
112
|
+
{
|
113
|
+
"include": "$self"
|
114
|
+
},
|
115
|
+
{
|
116
|
+
"include": "#any_field"
|
117
|
+
},
|
118
|
+
{
|
119
|
+
"include": "#comments"
|
120
|
+
},
|
121
|
+
{
|
122
|
+
"include": "#multiline_comments"
|
123
|
+
}
|
124
|
+
],
|
125
|
+
"beginCaptures": {
|
126
|
+
"1": {
|
127
|
+
"name": "storage.type.oneof.protobuf"
|
128
|
+
},
|
129
|
+
"2": {
|
130
|
+
"name": "entity.name.type.oneof.protobuf"
|
131
|
+
}
|
132
|
+
}
|
133
|
+
},
|
77
134
|
{
|
78
135
|
"name": "meta.service-declaration.protobuf",
|
79
136
|
"begin": "\\b(service)\\s+([A-Za-z0-9_]+)\\s*\\{",
|
@@ -81,7 +138,7 @@
|
|
81
138
|
"patterns": [
|
82
139
|
{
|
83
140
|
"name": "meta.individual-rpc-call.protobuf",
|
84
|
-
"match": "\\b(rpc)\\s+([A-Za-z0-9_]+)\\s+\\(([A-Za-z0-9_]+)\\)\\s*(returns)\\s*\\(([A-Za-z0-9_]+)\\)\\s*;",
|
141
|
+
"match": "\\b(rpc)\\s+([A-Za-z0-9_]+)\\s+\\(([A-Za-z0-9_.]+)\\)\\s*(returns)\\s*\\(([A-Za-z0-9_.]+)\\)\\s*;",
|
85
142
|
"captures": {
|
86
143
|
"1": {
|
87
144
|
"name": "keyword.other.rpc-definition.protobuf"
|
@@ -129,6 +186,9 @@
|
|
129
186
|
},
|
130
187
|
{
|
131
188
|
"include": "#comments"
|
189
|
+
},
|
190
|
+
{
|
191
|
+
"include": "#multiline_comments"
|
132
192
|
}
|
133
193
|
],
|
134
194
|
"beginCaptures": {
|
@@ -142,7 +202,7 @@
|
|
142
202
|
},
|
143
203
|
{
|
144
204
|
"name": "meta.package.protobuf",
|
145
|
-
"match": "\\b(package)\\s+([A-Za-z0-9.]+)\\s*;",
|
205
|
+
"match": "\\b(package)\\s+([A-Za-z0-9._]+)\\s*;",
|
146
206
|
"captures": {
|
147
207
|
"1": {
|
148
208
|
"name": "keyword.other.package-definition.protobuf"
|
@@ -181,6 +241,9 @@
|
|
181
241
|
},
|
182
242
|
{
|
183
243
|
"include": "#comments"
|
244
|
+
},
|
245
|
+
{
|
246
|
+
"include": "#multiline_comments"
|
184
247
|
}
|
185
248
|
],
|
186
249
|
"repository": {
|
@@ -194,6 +257,9 @@
|
|
194
257
|
},
|
195
258
|
{
|
196
259
|
"include": "#user_defined_message_field"
|
260
|
+
},
|
261
|
+
{
|
262
|
+
"include": "#reserved_field"
|
197
263
|
}
|
198
264
|
]
|
199
265
|
},
|
@@ -256,7 +322,7 @@
|
|
256
322
|
}
|
257
323
|
},
|
258
324
|
"group_field": {
|
259
|
-
"begin": "(required|optional|repeated)
|
325
|
+
"begin": "(required|optional|repeated)?\\s+?(group)\\s+([A-Za-z0-9_]+)\\s*=\\s*(\\d+)\\s*{",
|
260
326
|
"end": "}",
|
261
327
|
"patterns": [
|
262
328
|
{
|
@@ -292,8 +358,13 @@
|
|
292
358
|
}
|
293
359
|
}
|
294
360
|
},
|
361
|
+
"multiline_comments": {
|
362
|
+
"name": "comment.block.protobuf",
|
363
|
+
"begin": "/\\*",
|
364
|
+
"end": "\\*/"
|
365
|
+
},
|
295
366
|
"primitive_field": {
|
296
|
-
"match": "(required|optional|repeated)
|
367
|
+
"match": "(required|optional|repeated)?\\s+?(((s|u)?int|s?fixed)(32|64)|string|bytes|bool)\\s+(\\S+)\\s*=\\s*(\\d+)",
|
297
368
|
"captures": {
|
298
369
|
"1": {
|
299
370
|
"name": "keyword.control.occurrences.protobuf"
|
@@ -309,6 +380,17 @@
|
|
309
380
|
}
|
310
381
|
}
|
311
382
|
},
|
383
|
+
"reserved_field": {
|
384
|
+
"match": "(reserved)\\s+(\\d+)",
|
385
|
+
"captures": {
|
386
|
+
"1": {
|
387
|
+
"name": "keyword.control.occurrences.protobuf"
|
388
|
+
},
|
389
|
+
"2": {
|
390
|
+
"name": "constant.numeric.field-tag.protobuf"
|
391
|
+
}
|
392
|
+
}
|
393
|
+
},
|
312
394
|
"rpc_primitive_attribute": {
|
313
395
|
"match": "(option)\\s+\\(?([A-Za-z0-9_.]+)\\)?\\.([A-Za-z0-9.]+)\\s*=\\s*(true|false|\\d+|([A-Z_]+))\\b",
|
314
396
|
"beginCaptures": {
|
@@ -369,7 +451,7 @@
|
|
369
451
|
}
|
370
452
|
},
|
371
453
|
"user_defined_message_field": {
|
372
|
-
"match": "(required|optional|repeated)
|
454
|
+
"match": "(required|optional|repeated)?\\s+?([A-Za-z._]*)\\s+(\\S+)\\s*=\\s*(\\d+)",
|
373
455
|
"captures": {
|
374
456
|
"1": {
|
375
457
|
"name": "keyword.control.occurrences.protobuf"
|