github-linguist 7.6.0 → 7.10.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 +472 -4
- data/grammars/hidden.manref.json +29 -0
- data/grammars/hidden.regexp.injection-shell.json +28 -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 +1156 -0
- data/grammars/source.abap.json +7 -7
- data/grammars/source.abl.json +685 -83
- data/grammars/source.abnf.json +23 -1
- data/grammars/source.agda.json +33 -203
- data/grammars/source.ahk.json +9 -5
- data/grammars/source.angelscript.json +1 -1
- data/grammars/source.ballerina.json +55 -19
- data/grammars/source.c++.json +4 -4
- data/grammars/source.c.platform.json +584 -33
- data/grammars/source.chapel.json +7 -4
- data/grammars/source.csound.json +1 -1
- data/grammars/source.css.json +3 -3
- data/grammars/source.css.scss.json +164 -15
- data/grammars/source.curlrc.json +869 -65
- data/grammars/source.d.json +2 -2
- 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.futhark.json +146 -0
- data/grammars/source.gcode.json +166 -8
- data/grammars/source.gedcom.json +196 -0
- data/grammars/source.generic-db.json +41 -0
- data/grammars/source.gfm.blade.json +15 -0
- data/grammars/source.gfm.json +1697 -1439
- 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.httpspec.json +1 -1
- data/grammars/source.hx.json +9 -5
- data/grammars/source.hxml.json +2 -2
- data/grammars/source.idris.json +1 -1
- 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.isabelle.root.json +1 -1
- data/grammars/source.jison.json +3 -0
- data/grammars/source.jisonlex.json +3 -0
- data/grammars/source.js.json +4 -4
- data/grammars/source.julia.json +70 -24
- data/grammars/source.kotlin.json +17 -51
- data/grammars/source.lcov.json +398 -0
- data/grammars/source.lean.json +20 -4
- data/grammars/source.lean.markdown.json +2598 -0
- data/grammars/source.lex.json +4 -4
- data/grammars/source.m2.json +125 -0
- data/grammars/source.m4.json +141 -99
- data/grammars/source.man-conf.json +47 -35
- 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.modula-3.json +10 -0
- data/grammars/source.msl.json +755 -0
- data/grammars/source.nasl.json +155 -0
- data/grammars/source.neon.json +381 -0
- data/grammars/source.nextflow.json +2 -2
- data/grammars/source.objc.platform.json +493 -35
- data/grammars/source.odin-ehr.json +806 -0
- data/grammars/source.odin.json +402 -0
- data/grammars/source.openbsd-pkg.contents.json +128 -0
- data/grammars/source.opts.json +12 -2
- data/grammars/source.perl6fe.json +1 -1
- data/grammars/source.postscript.json +358 -103
- data/grammars/source.prisma.json +435 -0
- data/grammars/source.purescript.json +29 -2
- data/grammars/source.python.json +52 -0
- data/grammars/source.q.json +150 -63
- data/grammars/source.qasm.json +66 -0
- data/grammars/source.ql.json +1408 -0
- data/grammars/source.r.json +4 -4
- 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.sieve.json +383 -0
- data/grammars/source.solidity.json +1 -1
- 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.tags.json +266 -0
- data/grammars/source.terraform.json +576 -132
- data/grammars/source.tnsaudit.json +256 -0
- data/grammars/source.ts.json +246 -70
- data/grammars/source.tsx.json +247 -71
- data/grammars/source.v.json +587 -761
- 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.webidl.json +8 -0
- data/grammars/source.wgetrc.json +1640 -0
- data/grammars/source.wsd.json +781 -0
- data/grammars/source.x86.json +7 -3
- data/grammars/source.zig.json +231 -360
- data/grammars/text.dfy.dafny.json +188 -0
- data/grammars/text.html.php.blade.json +535 -528
- data/grammars/text.html.riot.json +788 -0
- data/grammars/text.muse.json +1471 -0
- data/grammars/text.openbsd-pkg.desc.json +78 -0
- data/grammars/text.roff.json +49 -1
- data/grammars/text.sfd.json +21 -0
- data/grammars/text.tex.latex.haskell.json +58 -11
- data/grammars/text.vim-help.json +383 -0
- data/grammars/text.xml.svg.json +8 -2
- 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 +96 -28
- data/lib/linguist/heuristics.yml +64 -4
- data/lib/linguist/languages.json +1 -1
- data/lib/linguist/languages.yml +408 -49
- data/lib/linguist/lazy_blob.rb +10 -10
- data/lib/linguist/linguist.bundle +0 -0
- data/lib/linguist/samples.json +48129 -31562
- data/lib/linguist/shebang.rb +5 -3
- data/lib/linguist/vendor.yml +71 -60
- metadata +48 -17
- 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
- data/grammars/text.html.abl.json +0 -70
data/grammars/source.x86.json
CHANGED
@@ -170,11 +170,15 @@
|
|
170
170
|
},
|
171
171
|
{
|
172
172
|
"name": "support.constant.preprocessor",
|
173
|
-
"match": "^\\s*(?\u003c!#)(?:#(?:#(?!#)|(?:un)?assert|define|elif|else|endif|error|ident|(?:ifn?|un)?def|if|import|include(?:_next)?|line|pragma|sccs|warning))
|
173
|
+
"match": "^\\s*(?\u003c!#)(?:#(?:#(?!#)|(?:un)?assert|define|elif|else|endif|error|ident|(?:ifn?|un)?def|if|import|include(?:_next)?|line|pragma|sccs|warning))\\b"
|
174
174
|
},
|
175
175
|
{
|
176
|
-
"name": "
|
177
|
-
"match": "
|
176
|
+
"name": "support.constant.preprocessor",
|
177
|
+
"match": "\\b__(?:FILE|LINE|DATE|TIME(?:STAMP)?|STDC_(?:VERSION|HOSTED)?|GNUC(?:_MINOR|_PATCHLEVEL)?|VERSION|STRICT_ANSI|BASE_FILE|INCLUDE_LEVEL|OPTIMIZE(?:_SIZE)?|NO_INLINE|CHAR_UNSIGNED|CHAR_BIT|INT_SHORT|SCHAR_MAX|SHRT_MAX|INT_MAX|LONG_MAX|LONG_LONG_MAX|REGISTER_PREFIX|USER_LABEL_PREFIX)__\\b"
|
178
|
+
},
|
179
|
+
{
|
180
|
+
"name": "support.constant.preprocessor",
|
181
|
+
"match": "^\\s*(?:#\\s+(?:(?:un)?assert|define|elif|else|endif|error|ident|(?:ifn?|un)?def|if|import|include(?:_next)?|line|pragma|sccs|warning)\\b)"
|
178
182
|
},
|
179
183
|
{
|
180
184
|
"name": "comment.assembly",
|
data/grammars/source.zig.json
CHANGED
@@ -3,17 +3,16 @@
|
|
3
3
|
"scopeName": "source.zig",
|
4
4
|
"patterns": [
|
5
5
|
{
|
6
|
-
"include": "#
|
6
|
+
"include": "#dummy_main"
|
7
7
|
}
|
8
8
|
],
|
9
9
|
"repository": {
|
10
10
|
"block": {
|
11
|
-
"
|
12
|
-
"begin": "([a-zA-Z_][a-zA-Z0-9_.]*|@\\\".+\\\")?\\s*(\\{)",
|
11
|
+
"begin": "([a-zA-Z_][\\w.]*|@\\\".+\\\")?\\s*(\\{)",
|
13
12
|
"end": "(\\})",
|
14
13
|
"patterns": [
|
15
14
|
{
|
16
|
-
"include": "#
|
15
|
+
"include": "#dummy_main"
|
17
16
|
}
|
18
17
|
],
|
19
18
|
"beginCaptures": {
|
@@ -58,33 +57,29 @@
|
|
58
57
|
},
|
59
58
|
{
|
60
59
|
"name": "constant.character.escape.hexidecimal.zig",
|
61
|
-
"match": "\\\\x[a-fA-
|
60
|
+
"match": "\\\\x[a-fA-F\\d]{2}"
|
62
61
|
},
|
63
62
|
{
|
64
63
|
"name": "constant.character.escape.hexidecimal.zig",
|
65
|
-
"match": "\\\\u\\{[a-fA-
|
64
|
+
"match": "\\\\u\\{[a-fA-F\\d]{1,6}\\}"
|
66
65
|
}
|
67
66
|
]
|
68
67
|
},
|
69
68
|
"comments": {
|
70
69
|
"patterns": [
|
71
70
|
{
|
72
|
-
"name": "comment.line.
|
73
|
-
"
|
71
|
+
"name": "comment.line.documentation.zig",
|
72
|
+
"begin": "///",
|
73
|
+
"end": "$\\n?"
|
74
74
|
},
|
75
75
|
{
|
76
|
-
"name": "comment.line.zig",
|
77
|
-
"begin": "//[^/]",
|
78
|
-
"end": "$\\n?"
|
79
|
-
"patterns": [
|
80
|
-
{
|
81
|
-
"include": "#todo"
|
82
|
-
}
|
83
|
-
]
|
76
|
+
"name": "comment.line.todo.zig",
|
77
|
+
"begin": "//[^/]\\s*TODO",
|
78
|
+
"end": "$\\n?"
|
84
79
|
},
|
85
80
|
{
|
86
|
-
"name": "comment.line.
|
87
|
-
"begin": "
|
81
|
+
"name": "comment.line.zig",
|
82
|
+
"begin": "//[^/]*",
|
88
83
|
"end": "$\\n?"
|
89
84
|
}
|
90
85
|
]
|
@@ -97,162 +92,47 @@
|
|
97
92
|
},
|
98
93
|
{
|
99
94
|
"name": "constant.numeric.integer.zig",
|
100
|
-
"match": "\\b(?\u003c!\\.)(-?[
|
95
|
+
"match": "\\b(?\u003c!\\.)(-?[\\d_]+)(?!\\.)\\b"
|
101
96
|
},
|
102
97
|
{
|
103
98
|
"name": "constant.numeric.integer.hexadecimal.zig",
|
104
|
-
"match": "\\b(?\u003c!\\.)(0x[a-fA-
|
99
|
+
"match": "\\b(?\u003c!\\.)(0x[a-fA-F\\d_]+)(?!\\.)\\b"
|
105
100
|
},
|
106
101
|
{
|
107
102
|
"name": "constant.numeric.integer.octal.zig",
|
108
|
-
"match": "\\b(?\u003c!\\.)(0o[0-
|
103
|
+
"match": "\\b(?\u003c!\\.)(0o[0-7_]+)(?!\\.)\\b"
|
109
104
|
},
|
110
105
|
{
|
111
106
|
"name": "constant.numeric.integer.binary.zig",
|
112
|
-
"match": "\\b(?\u003c!\\.)(0b[
|
107
|
+
"match": "\\b(?\u003c!\\.)(0b[01_]+)(?!\\.)\\b"
|
113
108
|
},
|
114
109
|
{
|
115
110
|
"name": "constant.numeric.float.zig",
|
116
|
-
"match": "(?\u003c!\\.)(-?\\b[
|
111
|
+
"match": "(?\u003c!\\.)(-?\\b[\\d_]+(?:\\.[\\d_]+)?(?:[eE][+-]?[\\d_]+)?)(?!\\.)\\b"
|
117
112
|
},
|
118
113
|
{
|
119
114
|
"name": "constant.numeric.float.hexadecimal.zig",
|
120
|
-
"match": "(?\u003c!\\.)(-?\\b0x[a-fA-
|
115
|
+
"match": "(?\u003c!\\.)(-?\\b0x[a-fA-F\\d_]+(?:\\.[a-fA-F\\d_]+)?[pP]?(?:[+-]?[\\d_]+)?)(?!\\.)\\b"
|
121
116
|
}
|
122
117
|
]
|
123
118
|
},
|
124
119
|
"container_decl": {
|
125
120
|
"patterns": [
|
126
121
|
{
|
127
|
-
"
|
128
|
-
"
|
129
|
-
"end": "(})",
|
130
|
-
"patterns": [
|
131
|
-
{
|
132
|
-
"include": "#main"
|
133
|
-
}
|
134
|
-
],
|
135
|
-
"beginCaptures": {
|
136
|
-
"1": {
|
137
|
-
"name": "entity.name.union.zig"
|
138
|
-
},
|
139
|
-
"2": {
|
140
|
-
"name": "storage.modifier.zig"
|
141
|
-
},
|
142
|
-
"3": {
|
143
|
-
"name": "storage.type.union.zig"
|
144
|
-
},
|
145
|
-
"4": {
|
146
|
-
"name": "punctuation.section.parens.begin.zig"
|
147
|
-
},
|
148
|
-
"5": {
|
149
|
-
"name": "storage.type.zig"
|
150
|
-
},
|
151
|
-
"6": {
|
152
|
-
"name": "punctuation.section.parens.end.zig"
|
153
|
-
},
|
154
|
-
"7": {
|
155
|
-
"name": "punctuation.section.braces.begin.zig"
|
156
|
-
}
|
157
|
-
},
|
158
|
-
"endCaptures": {
|
159
|
-
"1": {
|
160
|
-
"name": "punctuation.section.braces.end.zig"
|
161
|
-
}
|
162
|
-
}
|
122
|
+
"name": "entity.name.union.zig",
|
123
|
+
"match": "\\b(?!\\d)([a-zA-Z_]\\w*|@\\\".+\\\")?(?=\\s*=\\s*(?:extern|packed)?\\b\\s*(?:union)\\s*[(\\{])"
|
163
124
|
},
|
164
125
|
{
|
165
|
-
"
|
166
|
-
"
|
167
|
-
"end": "(})",
|
168
|
-
"patterns": [
|
169
|
-
{
|
170
|
-
"include": "#main"
|
171
|
-
}
|
172
|
-
],
|
173
|
-
"beginCaptures": {
|
174
|
-
"1": {
|
175
|
-
"name": "entity.name.struct.zig"
|
176
|
-
},
|
177
|
-
"2": {
|
178
|
-
"name": "storage.modifier.zig"
|
179
|
-
},
|
180
|
-
"3": {
|
181
|
-
"name": "storage.type.struct.zig"
|
182
|
-
},
|
183
|
-
"4": {
|
184
|
-
"name": "punctuation.section.braces.begin.zig"
|
185
|
-
}
|
186
|
-
},
|
187
|
-
"endCaptures": {
|
188
|
-
"1": {
|
189
|
-
"name": "punctuation.section.braces.end.zig"
|
190
|
-
}
|
191
|
-
}
|
126
|
+
"name": "entity.name.struct.zig",
|
127
|
+
"match": "\\b(?!\\d)([a-zA-Z_]\\w*|@\\\".+\\\")?(?=\\s*=\\s*(?:extern|packed)?\\b\\s*(?:struct)\\s*[(\\{])"
|
192
128
|
},
|
193
129
|
{
|
194
|
-
"
|
195
|
-
"
|
196
|
-
"end": "(})",
|
197
|
-
"patterns": [
|
198
|
-
{
|
199
|
-
"include": "#main"
|
200
|
-
}
|
201
|
-
],
|
202
|
-
"beginCaptures": {
|
203
|
-
"1": {
|
204
|
-
"name": "entity.name.enum.zig"
|
205
|
-
},
|
206
|
-
"2": {
|
207
|
-
"name": "storage.modifier.zig"
|
208
|
-
},
|
209
|
-
"3": {
|
210
|
-
"name": "storage.type.enum.zig"
|
211
|
-
},
|
212
|
-
"4": {
|
213
|
-
"name": "punctuation.section.parens.begin.zig"
|
214
|
-
},
|
215
|
-
"5": {
|
216
|
-
"name": "storage.type.zig"
|
217
|
-
},
|
218
|
-
"6": {
|
219
|
-
"name": "punctuation.section.parens.end.zig"
|
220
|
-
},
|
221
|
-
"7": {
|
222
|
-
"name": "punctuation.section.braces.begin.zig"
|
223
|
-
}
|
224
|
-
},
|
225
|
-
"endCaptures": {
|
226
|
-
"1": {
|
227
|
-
"name": "punctuation.section.braces.end.zig"
|
228
|
-
}
|
229
|
-
}
|
130
|
+
"name": "entity.name.enum.zig",
|
131
|
+
"match": "\\b(?!\\d)([a-zA-Z_]\\w*|@\\\".+\\\")?(?=\\s*=\\s*(?:extern|packed)?\\b\\s*(?:enum)\\s*[(\\{])"
|
230
132
|
},
|
231
133
|
{
|
232
|
-
"
|
233
|
-
"
|
234
|
-
"end": "(})",
|
235
|
-
"patterns": [
|
236
|
-
{
|
237
|
-
"include": "#main"
|
238
|
-
}
|
239
|
-
],
|
240
|
-
"beginCaptures": {
|
241
|
-
"1": {
|
242
|
-
"name": "entity.name.error.zig"
|
243
|
-
},
|
244
|
-
"2": {
|
245
|
-
"name": "storage.type.error.zig"
|
246
|
-
},
|
247
|
-
"3": {
|
248
|
-
"name": "punctuation.section.braces.begin.zig"
|
249
|
-
}
|
250
|
-
},
|
251
|
-
"endCaptures": {
|
252
|
-
"1": {
|
253
|
-
"name": "punctuation.section.braces.end.zig"
|
254
|
-
}
|
255
|
-
}
|
134
|
+
"name": "entity.name.error.zig",
|
135
|
+
"match": "\\b(?!\\d)([a-zA-Z_]\\w*|@\\\".+\\\")?(?=\\s*=\\s*(?:error)\\s*[(\\{])"
|
256
136
|
},
|
257
137
|
{
|
258
138
|
"match": "\\b(error)(\\.)([a-zA-Z_]\\w*|@\\\".+\\\")",
|
@@ -270,13 +150,71 @@
|
|
270
150
|
}
|
271
151
|
]
|
272
152
|
},
|
153
|
+
"dummy_main": {
|
154
|
+
"patterns": [
|
155
|
+
{
|
156
|
+
"include": "#label"
|
157
|
+
},
|
158
|
+
{
|
159
|
+
"include": "#function_type"
|
160
|
+
},
|
161
|
+
{
|
162
|
+
"include": "#punctuation"
|
163
|
+
},
|
164
|
+
{
|
165
|
+
"include": "#storage_modifier"
|
166
|
+
},
|
167
|
+
{
|
168
|
+
"include": "#container_decl"
|
169
|
+
},
|
170
|
+
{
|
171
|
+
"include": "#constants"
|
172
|
+
},
|
173
|
+
{
|
174
|
+
"include": "#comments"
|
175
|
+
},
|
176
|
+
{
|
177
|
+
"include": "#strings"
|
178
|
+
},
|
179
|
+
{
|
180
|
+
"include": "#storage"
|
181
|
+
},
|
182
|
+
{
|
183
|
+
"include": "#keywords"
|
184
|
+
},
|
185
|
+
{
|
186
|
+
"include": "#operators"
|
187
|
+
},
|
188
|
+
{
|
189
|
+
"include": "#support"
|
190
|
+
},
|
191
|
+
{
|
192
|
+
"include": "#field_decl"
|
193
|
+
},
|
194
|
+
{
|
195
|
+
"include": "#block"
|
196
|
+
},
|
197
|
+
{
|
198
|
+
"include": "#function_def"
|
199
|
+
},
|
200
|
+
{
|
201
|
+
"include": "#function_call"
|
202
|
+
},
|
203
|
+
{
|
204
|
+
"include": "#enum_literal"
|
205
|
+
}
|
206
|
+
]
|
207
|
+
},
|
208
|
+
"enum_literal": {
|
209
|
+
"name": "constant.language.enum",
|
210
|
+
"match": "(?\u003c!\\w|\\))(\\.(?:[a-zA-Z_]\\w*\\b|@\\\"[^\\\"]*\\\"))(?!\\(|\\s*=[^=\u003e])"
|
211
|
+
},
|
273
212
|
"field_decl": {
|
274
|
-
"contentName": "storage.type.zig",
|
275
213
|
"begin": "([a-zA-Z_]\\w*|@\\\".+\\\")\\s*(:)\\s*",
|
276
|
-
"end": "(?:(,)|(
|
214
|
+
"end": "([a-zA-Z_][\\w.]*|@\\\".+\\\")?\\s*(?:(,)|(=)|$)",
|
277
215
|
"patterns": [
|
278
216
|
{
|
279
|
-
"include": "#
|
217
|
+
"include": "#dummy_main"
|
280
218
|
}
|
281
219
|
],
|
282
220
|
"beginCaptures": {
|
@@ -284,38 +222,46 @@
|
|
284
222
|
"name": "variable.other.member.zig"
|
285
223
|
},
|
286
224
|
"2": {
|
287
|
-
"name": "punctuation.
|
225
|
+
"name": "punctuation.separator.zig"
|
288
226
|
}
|
289
227
|
},
|
290
228
|
"endCaptures": {
|
291
229
|
"1": {
|
230
|
+
"name": "storage.type.zig"
|
231
|
+
},
|
232
|
+
"2": {
|
292
233
|
"name": "punctuation.separator.zig"
|
234
|
+
},
|
235
|
+
"3": {
|
236
|
+
"name": "keyword.operator.assignment.zig"
|
293
237
|
}
|
294
238
|
}
|
295
239
|
},
|
296
|
-
"
|
297
|
-
"
|
298
|
-
"
|
299
|
-
|
240
|
+
"function_call": {
|
241
|
+
"name": "variable.function.zig",
|
242
|
+
"match": "(?\u003c!fn)\\b([a-zA-Z_]\\w*|@\\\".+\\\")(?=\\s*\\()"
|
243
|
+
},
|
244
|
+
"function_def": {
|
245
|
+
"begin": "(?\u003c=fn)\\s+([a-zA-Z_]\\w*|@\\\".+\\\")(\\()",
|
246
|
+
"end": "(?\u003c=\\)[^\\)])\\s*([a-zA-Z_][\\w.]*|@\\\".+\\\")?(!)?\\s*(?:([a-zA-Z_][\\w.]*|@\\\".+\\\")\\b(?!\\s*\\())?",
|
300
247
|
"patterns": [
|
301
248
|
{
|
302
|
-
"include": "#
|
249
|
+
"include": "#label"
|
303
250
|
},
|
304
251
|
{
|
305
|
-
"
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
}
|
252
|
+
"include": "#param_list"
|
253
|
+
},
|
254
|
+
{
|
255
|
+
"name": "storage.type.zig",
|
256
|
+
"match": "([a-zA-Z_][\\w.]*|@\\\".+\\\")"
|
257
|
+
},
|
258
|
+
{
|
259
|
+
"include": "#dummy_main"
|
314
260
|
}
|
315
261
|
],
|
316
262
|
"beginCaptures": {
|
317
263
|
"1": {
|
318
|
-
"name": "
|
264
|
+
"name": "entity.name.function"
|
319
265
|
},
|
320
266
|
"2": {
|
321
267
|
"name": "punctuation.section.parens.begin.zig"
|
@@ -323,196 +269,92 @@
|
|
323
269
|
},
|
324
270
|
"endCaptures": {
|
325
271
|
"1": {
|
326
|
-
"name": "
|
272
|
+
"name": "storage.type.zig"
|
273
|
+
},
|
274
|
+
"2": {
|
275
|
+
"name": "keyword.operator.zig"
|
276
|
+
},
|
277
|
+
"3": {
|
278
|
+
"name": "storage.type.zig"
|
327
279
|
}
|
328
280
|
}
|
329
281
|
},
|
330
|
-
"
|
282
|
+
"function_type": {
|
283
|
+
"contentName": "meta.function.parameters.zig",
|
284
|
+
"begin": "\\b(fn)\\s*(\\()",
|
285
|
+
"end": "(?\u003c=\\)|\\})\\s*([a-zA-Z_][\\w.]*|@\\\".+\\\")?\\s*(!)?\\s*([a-zA-Z_][\\w.]*|@\\\".+\\\")",
|
331
286
|
"patterns": [
|
332
287
|
{
|
333
|
-
"
|
334
|
-
"match": "\\b(while|for|break|return|continue|asm|defer|errdefer|unreachable)\\b"
|
288
|
+
"include": "#label"
|
335
289
|
},
|
336
290
|
{
|
337
|
-
"
|
338
|
-
"match": "\\b(async|await|suspend|resume|cancel)\\b"
|
291
|
+
"include": "#param_list"
|
339
292
|
},
|
340
293
|
{
|
341
|
-
"name": "
|
342
|
-
"match": "
|
343
|
-
},
|
344
|
-
{
|
345
|
-
"name": "keyword.control.import.zig",
|
346
|
-
"match": "(?\u003c!\\w)(@import|@cImport|@cInclude)\\b"
|
294
|
+
"name": "storage.type.zig",
|
295
|
+
"match": "([a-zA-Z_][\\w.]*|@\\\".+\\\")"
|
347
296
|
},
|
348
297
|
{
|
349
|
-
"
|
350
|
-
|
298
|
+
"include": "#dummy_main"
|
299
|
+
}
|
300
|
+
],
|
301
|
+
"beginCaptures": {
|
302
|
+
"1": {
|
303
|
+
"name": "storage.type.function.zig"
|
351
304
|
},
|
352
|
-
{
|
353
|
-
"name": "
|
354
|
-
"match": "\\btest\\b"
|
305
|
+
"2": {
|
306
|
+
"name": "punctuation.section.parens.begin.zig"
|
355
307
|
}
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
{
|
361
|
-
"name": "entity.name.label.zig",
|
362
|
-
"match": "(?\u003c!\\w):([a-zA-Z_]\\w*|@\\\".+\\\")"
|
308
|
+
},
|
309
|
+
"endCaptures": {
|
310
|
+
"1": {
|
311
|
+
"name": "storage.type.zig"
|
363
312
|
},
|
364
|
-
{
|
365
|
-
"
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
"include": "#main"
|
370
|
-
}
|
371
|
-
],
|
372
|
-
"beginCaptures": {
|
373
|
-
"1": {
|
374
|
-
"name": "entity.name.label.zig"
|
375
|
-
},
|
376
|
-
"2": {
|
377
|
-
"name": "punctuation.section.braces.begin.zig"
|
378
|
-
},
|
379
|
-
"3": {
|
380
|
-
"name": "keyword.control.zig"
|
381
|
-
}
|
382
|
-
},
|
383
|
-
"endCaptures": {
|
384
|
-
"1": {
|
385
|
-
"name": "punctuation.section.braces.end.zig"
|
386
|
-
}
|
387
|
-
}
|
313
|
+
"2": {
|
314
|
+
"name": "keyword.operator.zig"
|
315
|
+
},
|
316
|
+
"3": {
|
317
|
+
"name": "storage.type.zig"
|
388
318
|
}
|
389
|
-
|
319
|
+
}
|
390
320
|
},
|
391
|
-
"
|
321
|
+
"keywords": {
|
392
322
|
"patterns": [
|
393
323
|
{
|
394
|
-
"
|
395
|
-
"
|
396
|
-
"end": "(\\))\\s*([a-zA-Z_][a-zA-Z0-9_.]*|@\\\".+\\\")?",
|
397
|
-
"patterns": [
|
398
|
-
{
|
399
|
-
"match": "([a-zA-Z_][a-zA-Z0-9_.]*|@\\\".+\\\")(,)?",
|
400
|
-
"captures": {
|
401
|
-
"1": {
|
402
|
-
"name": "storage.type.zig"
|
403
|
-
},
|
404
|
-
"2": {
|
405
|
-
"name": "punctuation.separator.zig"
|
406
|
-
}
|
407
|
-
}
|
408
|
-
}
|
409
|
-
],
|
410
|
-
"beginCaptures": {
|
411
|
-
"1": {
|
412
|
-
"name": "storage.type.function.zig"
|
413
|
-
},
|
414
|
-
"2": {
|
415
|
-
"name": "punctuation.section.parens.begin.zig"
|
416
|
-
}
|
417
|
-
},
|
418
|
-
"endCaptures": {
|
419
|
-
"1": {
|
420
|
-
"name": "punctuation.section.parens.end.zig"
|
421
|
-
},
|
422
|
-
"2": {
|
423
|
-
"name": "storage.type.zig"
|
424
|
-
}
|
425
|
-
}
|
426
|
-
},
|
427
|
-
{
|
428
|
-
"contentName": "meta.function.parameters.zig",
|
429
|
-
"begin": "\\b(fn)\\s+([a-zA-Z_][a-zA-Z0-9_.]*|@\\\".+\\\")(\\()",
|
430
|
-
"end": "(?\u003c=\\))\\s*([a-zA-Z_][a-zA-Z0-9_.]*|@\\\".+\\\")?",
|
431
|
-
"patterns": [
|
432
|
-
{
|
433
|
-
"include": "#param_list"
|
434
|
-
}
|
435
|
-
],
|
436
|
-
"beginCaptures": {
|
437
|
-
"1": {
|
438
|
-
"name": "storage.type.function.zig"
|
439
|
-
},
|
440
|
-
"2": {
|
441
|
-
"name": "entity.name.function.zig"
|
442
|
-
},
|
443
|
-
"3": {
|
444
|
-
"name": "punctuation.section.parens.begin.zig"
|
445
|
-
}
|
446
|
-
},
|
447
|
-
"endCaptures": {
|
448
|
-
"1": {
|
449
|
-
"name": "storage.type.zig"
|
450
|
-
}
|
451
|
-
}
|
452
|
-
},
|
453
|
-
{
|
454
|
-
"match": "\\b(const|var)\\s+([a-zA-Z_][a-zA-Z0-9_.]*|@\\\".+\\\")\\s*(:)\\s*([a-zA-Z_][a-zA-Z0-9_.]*|@\\\".+\\\")\\s*(=)",
|
455
|
-
"captures": {
|
456
|
-
"1": {
|
457
|
-
"name": "storage.modifier.zig"
|
458
|
-
},
|
459
|
-
"2": {
|
460
|
-
"name": "variable.other.zig"
|
461
|
-
},
|
462
|
-
"3": {
|
463
|
-
"name": "punctuation.terminator.zig"
|
464
|
-
},
|
465
|
-
"4": {
|
466
|
-
"name": "storage.type.zig"
|
467
|
-
},
|
468
|
-
"5": {
|
469
|
-
"name": "keyword.operator.assignment.zig"
|
470
|
-
}
|
471
|
-
}
|
472
|
-
},
|
473
|
-
{
|
474
|
-
"include": "#func_call"
|
475
|
-
},
|
476
|
-
{
|
477
|
-
"include": "#label"
|
478
|
-
},
|
479
|
-
{
|
480
|
-
"include": "#punctuation"
|
481
|
-
},
|
482
|
-
{
|
483
|
-
"include": "#storage_modifier"
|
484
|
-
},
|
485
|
-
{
|
486
|
-
"include": "#container_decl"
|
487
|
-
},
|
488
|
-
{
|
489
|
-
"include": "#constants"
|
490
|
-
},
|
491
|
-
{
|
492
|
-
"include": "#comments"
|
493
|
-
},
|
494
|
-
{
|
495
|
-
"include": "#strings"
|
324
|
+
"name": "keyword.control.zig",
|
325
|
+
"match": "\\b(while|for|break|return|continue|asm|defer|errdefer|unreachable)\\b"
|
496
326
|
},
|
497
327
|
{
|
498
|
-
"
|
328
|
+
"name": "keyword.control.async.zig",
|
329
|
+
"match": "\\b(noasync|async|await|suspend|resume|cancel)\\b"
|
499
330
|
},
|
500
331
|
{
|
501
|
-
"
|
332
|
+
"name": "keyword.control.conditional.zig",
|
333
|
+
"match": "\\b(if|else|switch|try|catch|orelse)\\b"
|
502
334
|
},
|
503
335
|
{
|
504
|
-
"
|
336
|
+
"name": "keyword.control.import.zig",
|
337
|
+
"match": "(?\u003c!\\w)(@import|@cImport|@cInclude)\\b"
|
505
338
|
},
|
506
339
|
{
|
507
|
-
"
|
340
|
+
"name": "keyword.other.usingnamespace.zig",
|
341
|
+
"match": "\\b(usingnamespace)\\b"
|
342
|
+
}
|
343
|
+
]
|
344
|
+
},
|
345
|
+
"label": {
|
346
|
+
"match": "\\b(break|continue)\\s*:\\s*([a-zA-Z_]\\w*|@\\\".+\\\")\\b|\\b(?!\\d)([a-zA-Z_]\\w*|@\\\".+\\\")\\b(?=\\s*:\\s*(?:\\{|while\\b))",
|
347
|
+
"captures": {
|
348
|
+
"1": {
|
349
|
+
"name": "keyword.control.zig"
|
508
350
|
},
|
509
|
-
{
|
510
|
-
"
|
351
|
+
"2": {
|
352
|
+
"name": "entity.name.label.zig"
|
511
353
|
},
|
512
|
-
{
|
513
|
-
"
|
354
|
+
"3": {
|
355
|
+
"name": "entity.name.label.zig"
|
514
356
|
}
|
515
|
-
|
357
|
+
}
|
516
358
|
},
|
517
359
|
"operators": {
|
518
360
|
"patterns": [
|
@@ -534,43 +376,46 @@
|
|
534
376
|
},
|
535
377
|
{
|
536
378
|
"name": "keyword.operator.arithmetic.zig",
|
537
|
-
"match": "((
|
379
|
+
"match": "((?:\\+|-|\\*)\\%?|/(?!/)|%)"
|
538
380
|
},
|
539
381
|
{
|
540
382
|
"name": "keyword.operator.bitwise.zig",
|
541
|
-
"match": "(\u003c\u003c|\u003e\u003e|\u0026(
|
383
|
+
"match": "(\u003c\u003c|\u003e\u003e|\u0026(?=[a-zA-Z_]|@\\\")|\\|(?=[^\\|])|\\^|~)"
|
542
384
|
},
|
543
385
|
{
|
544
386
|
"name": "keyword.operator.other.zig",
|
545
|
-
"match": "(\\+\\+|\\*\\*|-\u003e|\\.\\?|\\.\\*|\u0026(
|
387
|
+
"match": "(\\+\\+|\\*\\*|-\u003e|\\.\\?|\\.\\*|\u0026(?=[a-zA-Z_]|@\\\")|\\?|\\|\\||\\.{2,3})"
|
546
388
|
}
|
547
389
|
]
|
548
390
|
},
|
549
391
|
"param_list": {
|
550
|
-
"
|
551
|
-
"
|
552
|
-
"end": "(?:(,)|(?:\\)))",
|
392
|
+
"begin": "([a-zA-Z_]\\w*|@\\\".+\\\")\\s*(:)\\s*",
|
393
|
+
"end": "([a-zA-Z_][\\w.]*|@\\\".+\\\")?\\s*(?:(,)|(\\)))",
|
553
394
|
"patterns": [
|
554
395
|
{
|
555
|
-
"include": "#
|
396
|
+
"include": "#dummy_main"
|
397
|
+
},
|
398
|
+
{
|
399
|
+
"name": "storage.type.zig",
|
400
|
+
"match": "([a-zA-Z_][\\w.]*|@\\\".+\\\")"
|
556
401
|
}
|
557
402
|
],
|
558
403
|
"beginCaptures": {
|
559
404
|
"1": {
|
560
|
-
"name": "storage.modifier.zig"
|
561
|
-
},
|
562
|
-
"2": {
|
563
405
|
"name": "variable.parameter.zig"
|
564
406
|
},
|
565
|
-
"
|
566
|
-
"name": "punctuation.
|
407
|
+
"2": {
|
408
|
+
"name": "punctuation.separator.zig"
|
567
409
|
}
|
568
410
|
},
|
569
411
|
"endCaptures": {
|
570
412
|
"1": {
|
571
|
-
"name": "
|
413
|
+
"name": "storage.type.zig"
|
572
414
|
},
|
573
415
|
"2": {
|
416
|
+
"name": "punctuation.separator.zig"
|
417
|
+
},
|
418
|
+
"3": {
|
574
419
|
"name": "punctuation.section.parens.end.zig"
|
575
420
|
}
|
576
421
|
}
|
@@ -586,24 +431,12 @@
|
|
586
431
|
"match": ";"
|
587
432
|
},
|
588
433
|
{
|
589
|
-
"
|
590
|
-
"
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
}
|
596
|
-
],
|
597
|
-
"beginCaptures": {
|
598
|
-
"1": {
|
599
|
-
"name": "punctuation.section.parens.begin.zig"
|
600
|
-
}
|
601
|
-
},
|
602
|
-
"endCaptures": {
|
603
|
-
"1": {
|
604
|
-
"name": "punctuation.section.parens.end.zig"
|
605
|
-
}
|
606
|
-
}
|
434
|
+
"name": "punctuation.section.parens.begin.zig",
|
435
|
+
"match": "(\\()"
|
436
|
+
},
|
437
|
+
{
|
438
|
+
"name": "punctuation.section.parens.end.zig",
|
439
|
+
"match": "(\\))"
|
607
440
|
}
|
608
441
|
]
|
609
442
|
},
|
@@ -611,11 +444,11 @@
|
|
611
444
|
"patterns": [
|
612
445
|
{
|
613
446
|
"name": "storage.type.zig",
|
614
|
-
"match": "\\b(bool|void|noreturn|type|anyerror
|
447
|
+
"match": "\\b(bool|void|noreturn|type|anyerror)\\b"
|
615
448
|
},
|
616
449
|
{
|
617
450
|
"name": "storage.type.integer.zig",
|
618
|
-
"match": "\\b(?\u003c!\\.)([iu]
|
451
|
+
"match": "\\b(?\u003c!\\.)([iu]\\d+|[iu]size|comptime_int)\\b"
|
619
452
|
},
|
620
453
|
{
|
621
454
|
"name": "storage.type.float.zig",
|
@@ -624,6 +457,44 @@
|
|
624
457
|
{
|
625
458
|
"name": "storage.type.c_compat.zig",
|
626
459
|
"match": "\\b(c_short|c_ushort|c_int|c_uint|c_long|c_ulong|c_longlong|c_ulonglong|c_longdouble|c_void)\\b"
|
460
|
+
},
|
461
|
+
{
|
462
|
+
"match": "\\b(anyframe)\\b\\s*(-\u003e)?\\s*(?:([a-zA-Z_][\\w.]*|@\\\".+\\\")\\b(?!\\s*\\())?",
|
463
|
+
"captures": {
|
464
|
+
"1": {
|
465
|
+
"name": "storage.type.zig"
|
466
|
+
},
|
467
|
+
"2": {
|
468
|
+
"name": "keyword.operator.zig"
|
469
|
+
},
|
470
|
+
"3": {
|
471
|
+
"name": "storage.type.zig"
|
472
|
+
}
|
473
|
+
}
|
474
|
+
},
|
475
|
+
{
|
476
|
+
"name": "storage.type.function.zig",
|
477
|
+
"match": "\\bfn\\b"
|
478
|
+
},
|
479
|
+
{
|
480
|
+
"name": "storage.type.test.zig",
|
481
|
+
"match": "\\btest\\b"
|
482
|
+
},
|
483
|
+
{
|
484
|
+
"name": "storage.type.struct.zig",
|
485
|
+
"match": "\\bstruct\\b"
|
486
|
+
},
|
487
|
+
{
|
488
|
+
"name": "storage.type.enum.zig",
|
489
|
+
"match": "\\benum\\b"
|
490
|
+
},
|
491
|
+
{
|
492
|
+
"name": "storage.type.union.zig",
|
493
|
+
"match": "\\bunion\\b"
|
494
|
+
},
|
495
|
+
{
|
496
|
+
"name": "storage.type.error.zig",
|
497
|
+
"match": "\\berror\\b"
|
627
498
|
}
|
628
499
|
]
|
629
500
|
},
|