github-linguist 7.6.1 → 7.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/bin/github-linguist +17 -4
- data/grammars/annotation.liquidhaskell.haskell.json +58 -11
- data/grammars/etc.json +212 -3
- data/grammars/hidden.manref.json +29 -0
- data/grammars/hint.haskell.json +58 -11
- data/grammars/hint.message.haskell.json +58 -11
- data/grammars/hint.type.haskell.json +58 -11
- data/grammars/injections.etc.json +601 -1
- data/grammars/markdown.plantuml.codeblock.json +26 -0
- data/grammars/source.4dm.json +1100 -0
- data/grammars/source.abap.json +7 -7
- data/grammars/source.abnf.json +23 -1
- data/grammars/source.agda.json +32 -202
- data/grammars/source.ahk.json +9 -5
- data/grammars/source.angelscript.json +1 -1
- data/grammars/source.ballerina.json +54 -18
- data/grammars/source.chapel.json +4 -4
- data/grammars/source.csound.json +1 -1
- data/grammars/source.css.json +2 -2
- data/grammars/source.css.scss.json +164 -15
- data/grammars/source.curlrc.json +869 -65
- data/grammars/source.dart.json +58 -32
- data/grammars/source.dircolors.json +137 -0
- data/grammars/source.direct-x.json +135 -0
- data/grammars/source.ebnf.json +67 -39
- data/grammars/source.editorconfig.json +23 -5
- data/grammars/source.elixir.json +51 -0
- data/grammars/source.elm.json +1 -1
- data/grammars/source.emacs.lisp.json +10 -0
- data/grammars/source.faust.json +119 -0
- data/grammars/source.gcode.json +166 -8
- data/grammars/source.gfm.json +1 -1
- data/grammars/source.gitconfig.json +1 -1
- data/grammars/source.hack.json +200 -98
- data/grammars/source.haskell.json +58 -11
- data/grammars/source.hlsl.json +9 -5
- data/grammars/source.hosts.json +40 -0
- data/grammars/source.hsig.json +58 -11
- data/grammars/source.hx.json +4 -0
- data/grammars/source.igor.json +46 -2
- data/grammars/source.ini.npmrc.json +311 -0
- data/grammars/source.inno.json +133 -0
- data/grammars/source.inputrc.json +500 -0
- data/grammars/source.js.json +4 -4
- data/grammars/source.julia.json +69 -23
- data/grammars/source.kotlin.json +1 -1
- data/grammars/source.lean.json +19 -3
- data/grammars/source.lean.markdown.json +2598 -0
- data/grammars/source.lex.json +4 -4
- data/grammars/source.m4.json +141 -99
- data/grammars/source.man-conf.json +46 -34
- data/grammars/source.matlab.json +437 -184
- data/grammars/source.mcfunction-snapshot.json +21388 -561
- data/grammars/source.mcfunction.json +55 -5
- data/grammars/source.meson.json +1 -1
- data/grammars/source.mlir.json +37 -317
- data/grammars/source.mrc.json +740 -0
- data/grammars/source.nasl.json +155 -0
- data/grammars/source.nextflow.json +2 -2
- data/grammars/source.odin-ehr.json +806 -0
- data/grammars/source.odin.json +402 -0
- data/grammars/source.opts.json +12 -2
- data/grammars/source.p4.json +21 -5
- data/grammars/source.prisma.json +435 -0
- data/grammars/source.python.json +2 -0
- data/grammars/source.qasm.json +66 -0
- data/grammars/source.ql.json +1408 -0
- data/grammars/source.reason.json +28 -16
- data/grammars/source.rego.json +124 -0
- data/grammars/source.sass.json +158 -3
- data/grammars/source.scala.json +53 -18
- data/grammars/source.ssh-config.json +1 -14
- data/grammars/source.swift.json +162 -2
- data/grammars/source.sy.json +2088 -183
- data/grammars/source.terraform.json +576 -132
- data/grammars/source.tnsaudit.json +256 -0
- data/grammars/source.ts.json +159 -51
- data/grammars/source.tsx.json +160 -52
- data/grammars/source.v.json +559 -764
- data/grammars/source.vim-snippet.json +645 -0
- data/grammars/source.viml.json +6 -6
- data/grammars/source.webassembly.json +10 -0
- data/grammars/source.wgetrc.json +1640 -0
- data/grammars/source.wsd.json +775 -0
- data/grammars/source.zig.json +169 -304
- data/grammars/text.html.php.blade.json +1 -1
- data/grammars/text.html.riot.json +788 -0
- data/grammars/text.muse.json +1471 -0
- data/grammars/text.tex.latex.haskell.json +58 -11
- data/grammars/text.vim-help.json +383 -0
- data/grammars/version +1 -1
- data/lib/linguist/VERSION +1 -1
- data/lib/linguist/blob_helper.rb +4 -2
- data/lib/linguist/file_blob.rb +1 -1
- data/lib/linguist/generated.rb +60 -13
- data/lib/linguist/heuristics.yml +64 -4
- data/lib/linguist/languages.json +1 -1
- data/lib/linguist/languages.yml +336 -45
- data/lib/linguist/lazy_blob.rb +10 -10
- data/lib/linguist/linguist.bundle +0 -0
- data/lib/linguist/samples.json +43560 -31457
- data/lib/linguist/shebang.rb +5 -3
- data/lib/linguist/vendor.yml +9 -0
- metadata +29 -10
- data/grammars/source.LS.json +0 -85
- data/grammars/source.MCPOST.json +0 -54
- data/grammars/source.MOD.json +0 -55
- data/grammars/source.apt.json +0 -18
- data/grammars/source.jlex.json +0 -322
- data/grammars/source.yaml-ext.json +0 -324
@@ -0,0 +1,402 @@
|
|
1
|
+
{
|
2
|
+
"name": "Odin",
|
3
|
+
"scopeName": "source.odin",
|
4
|
+
"patterns": [
|
5
|
+
{
|
6
|
+
"include": "#comments"
|
7
|
+
},
|
8
|
+
{
|
9
|
+
"include": "#types"
|
10
|
+
},
|
11
|
+
{
|
12
|
+
"include": "#keywords"
|
13
|
+
},
|
14
|
+
{
|
15
|
+
"include": "#functions_and_declarations"
|
16
|
+
},
|
17
|
+
{
|
18
|
+
"include": "#strings"
|
19
|
+
},
|
20
|
+
{
|
21
|
+
"include": "#string_escaped_char"
|
22
|
+
}
|
23
|
+
],
|
24
|
+
"repository": {
|
25
|
+
"block_comment": {
|
26
|
+
"name": "comment.block.odin",
|
27
|
+
"begin": "/\\*",
|
28
|
+
"end": "\\*/",
|
29
|
+
"captures": {
|
30
|
+
"0": {
|
31
|
+
"name": "punctuation.definition.comment.odin"
|
32
|
+
}
|
33
|
+
}
|
34
|
+
},
|
35
|
+
"comments": {
|
36
|
+
"patterns": [
|
37
|
+
{
|
38
|
+
"include": "#block_comment"
|
39
|
+
},
|
40
|
+
{
|
41
|
+
"name": "invalid.illegal.stray-comment-end.odin",
|
42
|
+
"match": "\\*/.*\\n"
|
43
|
+
},
|
44
|
+
{
|
45
|
+
"include": "#line_comment"
|
46
|
+
}
|
47
|
+
]
|
48
|
+
},
|
49
|
+
"functions_and_declarations": {
|
50
|
+
"patterns": [
|
51
|
+
{
|
52
|
+
"match": "\\b(\\b[[:alpha:]_]+[[:alnum:]_]*\\b)\\s*[:]\\s*[:]\\s*(proc)",
|
53
|
+
"captures": {
|
54
|
+
"1": {
|
55
|
+
"name": "meta.function.odin entity.name.function.odin"
|
56
|
+
},
|
57
|
+
"2": {
|
58
|
+
"name": "storage.type.odin"
|
59
|
+
}
|
60
|
+
}
|
61
|
+
},
|
62
|
+
{
|
63
|
+
"match": "\\b(\\b[[:alpha:]_]+[[:alnum:]_]*\\b)\\s*[:]\\s*[:]\\s*(inline|no_inline)\\s+(proc)",
|
64
|
+
"captures": {
|
65
|
+
"1": {
|
66
|
+
"name": "meta.function.odin entity.name.function.odin"
|
67
|
+
},
|
68
|
+
"2": {
|
69
|
+
"name": "keyword.control.odin"
|
70
|
+
},
|
71
|
+
"3": {
|
72
|
+
"name": "storage.type.odin"
|
73
|
+
}
|
74
|
+
}
|
75
|
+
},
|
76
|
+
{
|
77
|
+
"match": "\\b(size_of|align_of|offset_of|type_of)\\b\\s*\\(",
|
78
|
+
"captures": {
|
79
|
+
"1": {
|
80
|
+
"name": "keyword.function.odin"
|
81
|
+
}
|
82
|
+
}
|
83
|
+
},
|
84
|
+
{
|
85
|
+
"match": "\\b(type_info_of|typeid_of)\\b\\s*\\(",
|
86
|
+
"captures": {
|
87
|
+
"1": {
|
88
|
+
"name": "keyword.function.odin"
|
89
|
+
}
|
90
|
+
}
|
91
|
+
},
|
92
|
+
{
|
93
|
+
"match": "(proc|macro)\\s*[\\(]",
|
94
|
+
"captures": {
|
95
|
+
"1": {
|
96
|
+
"name": "storage.type.odin"
|
97
|
+
}
|
98
|
+
}
|
99
|
+
},
|
100
|
+
{
|
101
|
+
"match": "(\\b[[:alpha:]_]+[[:alnum:]_]*\\b)\\s*[!]?\\s*[\\(]",
|
102
|
+
"captures": {
|
103
|
+
"1": {
|
104
|
+
"name": "support.function.odin"
|
105
|
+
}
|
106
|
+
}
|
107
|
+
},
|
108
|
+
{
|
109
|
+
"match": "\\b(\\b[[:alpha:]_]+[[:alnum:]_]*\\b)\\s*[:]\\s*[:]\\s*(struct|union|enum|bit_field|bit_set)",
|
110
|
+
"captures": {
|
111
|
+
"1": {
|
112
|
+
"name": "meta.type.odin entity.name.type.odin"
|
113
|
+
},
|
114
|
+
"2": {
|
115
|
+
"name": "storage.type.odin"
|
116
|
+
}
|
117
|
+
}
|
118
|
+
},
|
119
|
+
{
|
120
|
+
"match": "\\b(\\b[[:alpha:]_]+[[:alnum:]_]*\\b)\\s*[:]\\s*[:]\\s*([#]\\s*type)",
|
121
|
+
"captures": {
|
122
|
+
"1": {
|
123
|
+
"name": "meta.type.odin entity.name.type.odin"
|
124
|
+
},
|
125
|
+
"2": {
|
126
|
+
"name": "keyword.tag.odin"
|
127
|
+
}
|
128
|
+
}
|
129
|
+
},
|
130
|
+
{
|
131
|
+
"match": "\\b(\\b[[:alpha:]_]+[[:alnum:]_]*\\b)\\s*[:]\\s*[:]\\s*",
|
132
|
+
"captures": {
|
133
|
+
"1": {
|
134
|
+
"name": "meta.constant.odin entity.name.type.odin"
|
135
|
+
}
|
136
|
+
}
|
137
|
+
}
|
138
|
+
]
|
139
|
+
},
|
140
|
+
"keywords": {
|
141
|
+
"patterns": [
|
142
|
+
{
|
143
|
+
"name": "keyword.control.odin",
|
144
|
+
"match": "\\b(import|foreign|package)\\b"
|
145
|
+
},
|
146
|
+
{
|
147
|
+
"name": "keyword.control.odin",
|
148
|
+
"match": "\\b(if|else|when|for|in|notin|not_in|defer|switch|return|const|do|where)\\b"
|
149
|
+
},
|
150
|
+
{
|
151
|
+
"name": "keyword.control.odin",
|
152
|
+
"match": "\\b(fallthrough|break|continue|case|dynamic)\\b"
|
153
|
+
},
|
154
|
+
{
|
155
|
+
"name": "keyword.control.odin",
|
156
|
+
"match": "\\b(using|inline|no_inline)\\b"
|
157
|
+
},
|
158
|
+
{
|
159
|
+
"name": "keyword.control.odin",
|
160
|
+
"match": "\\b(asm|yield|await)\\b"
|
161
|
+
},
|
162
|
+
{
|
163
|
+
"name": "keyword.operator.odin",
|
164
|
+
"match": "\\b(distinct|opaque)\\b"
|
165
|
+
},
|
166
|
+
{
|
167
|
+
"name": "keyword.operator.odin",
|
168
|
+
"match": "\\b(context)\\b"
|
169
|
+
},
|
170
|
+
{
|
171
|
+
"name": "constant.language.odin",
|
172
|
+
"match": "\\b(nil|true|false)\\b"
|
173
|
+
},
|
174
|
+
{
|
175
|
+
"name": "constant.numeric.odin",
|
176
|
+
"match": "\\b(\\d(\\d|_)*(.\\d(\\d|_)*)?)((e|E)(\\+|-)?\\d+)?[ijk]?\\b"
|
177
|
+
},
|
178
|
+
{
|
179
|
+
"name": "constant.numeric.odin",
|
180
|
+
"match": "\\b((0b(0|1|_)+)|(0o(\\d|_)+)|(0d(\\d|_)+)|(0[xXh]([[:xdigit:]]|_)+))[ijk]?\\b"
|
181
|
+
},
|
182
|
+
{
|
183
|
+
"name": "constant.numeric.odin",
|
184
|
+
"match": "---"
|
185
|
+
},
|
186
|
+
{
|
187
|
+
"name": "storage.type.odin",
|
188
|
+
"match": "\\b(macro|struct|enum|union|map|bit_field|bit_set)\\b"
|
189
|
+
},
|
190
|
+
{
|
191
|
+
"name": "keyword.function.odin",
|
192
|
+
"match": "\\b(cast|transmute|auto_cast)\\b"
|
193
|
+
},
|
194
|
+
{
|
195
|
+
"name": "keyword.tag.odin",
|
196
|
+
"match": "([#]\\s*\\b([[:alpha:]_]+[[:alnum:]_]*)\\b)"
|
197
|
+
},
|
198
|
+
{
|
199
|
+
"name": "keyword.tag.odin",
|
200
|
+
"match": "(\\x40\\s*\\b([[:alpha:]_]+[[:alnum:]_]*)\\b)"
|
201
|
+
},
|
202
|
+
{
|
203
|
+
"name": "keyword.tag.odin",
|
204
|
+
"match": "(\\x40\\s*[(]\\s*\\b([[:alpha:]_]+[[:alnum:]_]*)\\b)\\s*[)]"
|
205
|
+
},
|
206
|
+
{
|
207
|
+
"name": "keyword.operator.odin",
|
208
|
+
"match": "@"
|
209
|
+
}
|
210
|
+
]
|
211
|
+
},
|
212
|
+
"line_comment": {
|
213
|
+
"begin": "(^[ \\t]+)?((?=//)|(?=#!))",
|
214
|
+
"end": "(?!\\G)",
|
215
|
+
"patterns": [
|
216
|
+
{
|
217
|
+
"name": "comment.line.double-slash.odin",
|
218
|
+
"begin": "//",
|
219
|
+
"end": "\\n",
|
220
|
+
"patterns": [
|
221
|
+
{
|
222
|
+
"name": "punctuation.separator.continuation.odin",
|
223
|
+
"match": "(?\u003e\\\\\\s*\\n)"
|
224
|
+
}
|
225
|
+
],
|
226
|
+
"beginCaptures": {
|
227
|
+
"0": {
|
228
|
+
"name": "punctuation.definition.comment.odin"
|
229
|
+
}
|
230
|
+
}
|
231
|
+
},
|
232
|
+
{
|
233
|
+
"name": "comment.line.double-slash.odin",
|
234
|
+
"begin": "#!",
|
235
|
+
"end": "\\n",
|
236
|
+
"patterns": [
|
237
|
+
{
|
238
|
+
"name": "punctuation.separator.continuation.odin",
|
239
|
+
"match": "(?\u003e\\\\\\s*\\n)"
|
240
|
+
}
|
241
|
+
],
|
242
|
+
"beginCaptures": {
|
243
|
+
"0": {
|
244
|
+
"name": "punctuation.definition.comment.odin"
|
245
|
+
}
|
246
|
+
}
|
247
|
+
}
|
248
|
+
],
|
249
|
+
"beginCaptures": {
|
250
|
+
"1": {
|
251
|
+
"name": "punctuation.whitespace.comment.leading.odin"
|
252
|
+
}
|
253
|
+
}
|
254
|
+
},
|
255
|
+
"string_escaped_char": {
|
256
|
+
"patterns": [
|
257
|
+
{
|
258
|
+
"name": "constant.character.escape.odin",
|
259
|
+
"match": "\\\\(\\\\|[abefnrutv'\"]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8}|[0-7]{3})"
|
260
|
+
},
|
261
|
+
{
|
262
|
+
"name": "invalid.illegal.unknown-escape.odin",
|
263
|
+
"match": "\\\\."
|
264
|
+
}
|
265
|
+
]
|
266
|
+
},
|
267
|
+
"strings": {
|
268
|
+
"patterns": [
|
269
|
+
{
|
270
|
+
"name": "string.quoted.double.odin",
|
271
|
+
"begin": "\"",
|
272
|
+
"end": "\"",
|
273
|
+
"patterns": [
|
274
|
+
{
|
275
|
+
"include": "#string_placeholder"
|
276
|
+
},
|
277
|
+
{
|
278
|
+
"include": "#string_escaped_char"
|
279
|
+
}
|
280
|
+
],
|
281
|
+
"beginCaptures": {
|
282
|
+
"0": {
|
283
|
+
"name": "punctuation.definition.string.begin.odin"
|
284
|
+
}
|
285
|
+
},
|
286
|
+
"endCaptures": {
|
287
|
+
"0": {
|
288
|
+
"name": "punctuation.definition.string.end.odin"
|
289
|
+
}
|
290
|
+
}
|
291
|
+
},
|
292
|
+
{
|
293
|
+
"name": "string.quoted.single.odin",
|
294
|
+
"begin": "'",
|
295
|
+
"end": "'",
|
296
|
+
"patterns": [
|
297
|
+
{
|
298
|
+
"include": "#string_escaped_char"
|
299
|
+
}
|
300
|
+
],
|
301
|
+
"beginCaptures": {
|
302
|
+
"0": {
|
303
|
+
"name": "punctuation.definition.string.begin.odin"
|
304
|
+
}
|
305
|
+
},
|
306
|
+
"endCaptures": {
|
307
|
+
"0": {
|
308
|
+
"name": "punctuation.definition.string.end.odin"
|
309
|
+
}
|
310
|
+
}
|
311
|
+
},
|
312
|
+
{
|
313
|
+
"name": "string.quoted.raw.odin",
|
314
|
+
"begin": "`",
|
315
|
+
"end": "`",
|
316
|
+
"beginCaptures": {
|
317
|
+
"0": {
|
318
|
+
"name": "punctuation.definition.string.begin.odin"
|
319
|
+
}
|
320
|
+
},
|
321
|
+
"endCaptures": {
|
322
|
+
"0": {
|
323
|
+
"name": "punctuation.definition.string.end.odin"
|
324
|
+
}
|
325
|
+
}
|
326
|
+
}
|
327
|
+
]
|
328
|
+
},
|
329
|
+
"types": {
|
330
|
+
"patterns": [
|
331
|
+
{
|
332
|
+
"name": "storage.type.odin",
|
333
|
+
"match": "\\b(struct|enum|union|bit_field|bit_set)\\b(?:(\\{)(\\}))?"
|
334
|
+
},
|
335
|
+
{
|
336
|
+
"name": "storage.type.odin",
|
337
|
+
"match": "\\b(proc)\\b"
|
338
|
+
},
|
339
|
+
{
|
340
|
+
"name": "storage.type.odin",
|
341
|
+
"match": "\\$\\s*(\\b([[:alpha:]_]+[[:alnum:]_]*)\\b)"
|
342
|
+
},
|
343
|
+
{
|
344
|
+
"name": "storage.type.odin",
|
345
|
+
"match": "\\b(i8|i16|i32|i64|i128|int)\\b"
|
346
|
+
},
|
347
|
+
{
|
348
|
+
"name": "storage.type.odin",
|
349
|
+
"match": "\\b(u8|u16|u32|u64|u128|uint|uintptr)\\b"
|
350
|
+
},
|
351
|
+
{
|
352
|
+
"name": "storage.type.odin",
|
353
|
+
"match": "\\b(f16|f32|f64|f128)\\b"
|
354
|
+
},
|
355
|
+
{
|
356
|
+
"name": "storage.type.odin",
|
357
|
+
"match": "\\b(f16le|f32le|f64le|f128le)\\b"
|
358
|
+
},
|
359
|
+
{
|
360
|
+
"name": "storage.type.odin",
|
361
|
+
"match": "\\b(f16be|f32be|f64be|f128be)\\b"
|
362
|
+
},
|
363
|
+
{
|
364
|
+
"name": "storage.type.odin",
|
365
|
+
"match": "\\b(complex32|complex64|complex128)\\b"
|
366
|
+
},
|
367
|
+
{
|
368
|
+
"name": "storage.type.odin",
|
369
|
+
"match": "\\b(quaternion64|quaternion128|quaternion256)\\b"
|
370
|
+
},
|
371
|
+
{
|
372
|
+
"name": "storage.type.odin",
|
373
|
+
"match": "\\b(bool|b8|b16|b32|b64)\\b"
|
374
|
+
},
|
375
|
+
{
|
376
|
+
"name": "storage.type.odin",
|
377
|
+
"match": "\\b(string|cstring|rune)\\b"
|
378
|
+
},
|
379
|
+
{
|
380
|
+
"name": "storage.type.odin",
|
381
|
+
"match": "\\b(rawptr)\\b"
|
382
|
+
},
|
383
|
+
{
|
384
|
+
"name": "storage.type.odin",
|
385
|
+
"match": "\\b(any|typeid)\\b"
|
386
|
+
},
|
387
|
+
{
|
388
|
+
"name": "storage.type.odin",
|
389
|
+
"match": "\\b(byte)\\b"
|
390
|
+
},
|
391
|
+
{
|
392
|
+
"name": "storage.type.odin",
|
393
|
+
"match": "\\b(u16le|u32le|u64le|u128le|i16le|i32le|i64le|i128le)\\b"
|
394
|
+
},
|
395
|
+
{
|
396
|
+
"name": "storage.type.odin",
|
397
|
+
"match": "\\b(i16be|i32be|i64be|i128be|u16be|u32be|u64be|u128be)\\b"
|
398
|
+
}
|
399
|
+
]
|
400
|
+
}
|
401
|
+
}
|
402
|
+
}
|
data/grammars/source.opts.json
CHANGED
@@ -64,7 +64,7 @@
|
|
64
64
|
"2": {
|
65
65
|
"patterns": [
|
66
66
|
{
|
67
|
-
"include": "
|
67
|
+
"include": "#value"
|
68
68
|
}
|
69
69
|
]
|
70
70
|
}
|
@@ -76,7 +76,7 @@
|
|
76
76
|
"1": {
|
77
77
|
"patterns": [
|
78
78
|
{
|
79
|
-
"include": "
|
79
|
+
"include": "#value"
|
80
80
|
}
|
81
81
|
]
|
82
82
|
}
|
@@ -93,6 +93,16 @@
|
|
93
93
|
}
|
94
94
|
}
|
95
95
|
]
|
96
|
+
},
|
97
|
+
"optionValue": {
|
98
|
+
"patterns": [
|
99
|
+
{
|
100
|
+
"include": "etc"
|
101
|
+
},
|
102
|
+
{
|
103
|
+
"include": "etc#bareword"
|
104
|
+
}
|
105
|
+
]
|
96
106
|
}
|
97
107
|
}
|
98
108
|
}
|
data/grammars/source.p4.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
{
|
2
|
-
"name": "P4",
|
2
|
+
"name": "P4-16",
|
3
3
|
"scopeName": "source.p4",
|
4
4
|
"patterns": [
|
5
5
|
{
|
@@ -44,11 +44,15 @@
|
|
44
44
|
},
|
45
45
|
{
|
46
46
|
"name": "storage.type.object.p4",
|
47
|
-
"match": "\\b(
|
47
|
+
"match": "\\b(struct|package|header|metadata|parser|transition|state|actions|action|table|key|control|extern|verify)\\b"
|
48
48
|
},
|
49
49
|
{
|
50
50
|
"name": "storage.data.type.p4",
|
51
|
-
"match": "\\b(bool|
|
51
|
+
"match": "\\b(void|const|bool|varbit|int|typedef|tuple|enum)\\b"
|
52
|
+
},
|
53
|
+
{
|
54
|
+
"name": "support.type.bit.p4",
|
55
|
+
"match": "bit(\u003c\\d+\u003e)"
|
52
56
|
},
|
53
57
|
{
|
54
58
|
"name": "variable.language.p4",
|
@@ -56,7 +60,7 @@
|
|
56
60
|
},
|
57
61
|
{
|
58
62
|
"name": "keyword.control.p4",
|
59
|
-
"match": "\\b(if|else if|else|return|hit|miss|true|false)\\b"
|
63
|
+
"match": "\\b(if|else if|else|return|hit|miss|true|false|inout|in|out|exit)\\b"
|
60
64
|
},
|
61
65
|
{
|
62
66
|
"name": "keyword.operator.p4",
|
@@ -64,7 +68,7 @@
|
|
64
68
|
},
|
65
69
|
{
|
66
70
|
"name": "entity.name.type.p4",
|
67
|
-
"match": "\\b(exact|ternary|lpm|range|valid|mask)\\b"
|
71
|
+
"match": "\\b(exact|ternary|lpm|range|valid|mask|match_kind)\\b"
|
68
72
|
},
|
69
73
|
{
|
70
74
|
"name": "storage.type.p4",
|
@@ -86,6 +90,10 @@
|
|
86
90
|
"name": "meta.preprocessor.include.p4",
|
87
91
|
"match": "\\#include"
|
88
92
|
},
|
93
|
+
{
|
94
|
+
"name": "meta.preprocessor.p4",
|
95
|
+
"match": "\\#ifndef|\\#ifdef|\\#if|\\#else|\\#endif|\\#elif"
|
96
|
+
},
|
89
97
|
{
|
90
98
|
"name": "meta.preprocessor.define.p4",
|
91
99
|
"match": "\\#define"
|
@@ -94,6 +102,10 @@
|
|
94
102
|
"name": "support.function.primitive.p4",
|
95
103
|
"match": "\\b(apply|valid|select|current|extract|add_header|copy_header|remove_header|modify_field|add_to_field|add|set_field_to_hash_index|truncate|drop|no_op|push|pop|count|meter|generate_digest|resubmit|recirculate|clone_ingress_pkt_to_ingress|clone_egress_pkt_to_ingress|clone_ingress_pkt_to_egress|clone_egress_pkt_to_egress|register_write|register_read)\\b"
|
96
104
|
},
|
105
|
+
{
|
106
|
+
"name": "storage.type.annotation.p4",
|
107
|
+
"match": "@\\w+"
|
108
|
+
},
|
97
109
|
{
|
98
110
|
"name": "support.any-method.p4",
|
99
111
|
"match": "[a-zA-Z_][0-9a-zA-Z_]*"
|
@@ -106,6 +118,10 @@
|
|
106
118
|
"name": "constant.numeric.p4",
|
107
119
|
"match": "0(x|X)[0-9a-fA-F]+"
|
108
120
|
},
|
121
|
+
{
|
122
|
+
"name": "constant.numeric.p4",
|
123
|
+
"match": "\\dw\\d+"
|
124
|
+
},
|
109
125
|
{
|
110
126
|
"name": "constant.numeric.p4",
|
111
127
|
"match": "0(b|B)[01]+"
|