tm-grammars 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +22 -0
- package/NOTICE +6565 -0
- package/README.md +211 -0
- package/grammars/abap.json +380 -0
- package/grammars/actionscript-3.json +951 -0
- package/grammars/ada.json +3874 -0
- package/grammars/apache.json +562 -0
- package/grammars/apex.json +3203 -0
- package/grammars/apl.json +1479 -0
- package/grammars/applescript.json +1406 -0
- package/grammars/ara.json +428 -0
- package/grammars/asm.json +1741 -0
- package/grammars/astro.json +776 -0
- package/grammars/awk.json +388 -0
- package/grammars/ballerina.json +3768 -0
- package/grammars/bat.json +783 -0
- package/grammars/beancount.json +831 -0
- package/grammars/berry.json +172 -0
- package/grammars/bibtex.json +315 -0
- package/grammars/bicep.json +239 -0
- package/grammars/blade.json +3870 -0
- package/grammars/c.json +3552 -0
- package/grammars/cadence.json +738 -0
- package/grammars/clarity.json +877 -0
- package/grammars/clojure.json +426 -0
- package/grammars/cmake.json +143 -0
- package/grammars/cobol.json +1124 -0
- package/grammars/codeql.json +1540 -0
- package/grammars/coffee.json +1311 -0
- package/grammars/cpp-macro.json +9498 -0
- package/grammars/cpp.json +16635 -0
- package/grammars/crystal.json +1866 -0
- package/grammars/csharp.json +5722 -0
- package/grammars/css.json +1860 -0
- package/grammars/csv.json +46 -0
- package/grammars/cue.json +1128 -0
- package/grammars/cypher.json +353 -0
- package/grammars/d.json +3185 -0
- package/grammars/dart.json +522 -0
- package/grammars/dax.json +185 -0
- package/grammars/diff.json +155 -0
- package/grammars/docker.json +97 -0
- package/grammars/dream-maker.json +640 -0
- package/grammars/elixir.json +1014 -0
- package/grammars/elm.json +751 -0
- package/grammars/erb.json +156 -0
- package/grammars/erlang.json +1757 -0
- package/grammars/fish.json +189 -0
- package/grammars/fsharp.json +1831 -0
- package/grammars/gdresource.json +290 -0
- package/grammars/gdscript.json +969 -0
- package/grammars/gdshader.json +405 -0
- package/grammars/gherkin.json +133 -0
- package/grammars/git-commit.json +85 -0
- package/grammars/git-rebase.json +56 -0
- package/grammars/glimmer-js.json +98 -0
- package/grammars/glimmer-ts.json +98 -0
- package/grammars/glsl.json +57 -0
- package/grammars/gnuplot.json +892 -0
- package/grammars/go.json +1012 -0
- package/grammars/graphql.json +1295 -0
- package/grammars/groovy.json +1378 -0
- package/grammars/hack.json +2650 -0
- package/grammars/haml.json +598 -0
- package/grammars/handlebars.json +848 -0
- package/grammars/haskell.json +2431 -0
- package/grammars/hcl.json +787 -0
- package/grammars/hjson.json +821 -0
- package/grammars/hlsl.json +212 -0
- package/grammars/html.json +93 -0
- package/grammars/imba.json +2696 -0
- package/grammars/ini.json +108 -0
- package/grammars/java.json +1885 -0
- package/grammars/javascript.json +5984 -0
- package/grammars/jinja-html.json +16 -0
- package/grammars/jinja.json +345 -0
- package/grammars/jison.json +715 -0
- package/grammars/jsdoc.json +21 -0
- package/grammars/json.json +208 -0
- package/grammars/json5.json +244 -0
- package/grammars/jsonc.json +208 -0
- package/grammars/jsonl.json +208 -0
- package/grammars/jsonnet.json +211 -0
- package/grammars/jssm.json +159 -0
- package/grammars/jsx.json +5984 -0
- package/grammars/julia.json +1061 -0
- package/grammars/kotlin.json +580 -0
- package/grammars/kusto.json +687 -0
- package/grammars/latex.json +2395 -0
- package/grammars/less.json +5012 -0
- package/grammars/liquid.json +990 -0
- package/grammars/lisp.json +121 -0
- package/grammars/logo.json +55 -0
- package/grammars/lua.json +956 -0
- package/grammars/make.json +629 -0
- package/grammars/markdown.json +3066 -0
- package/grammars/marko.json +1344 -0
- package/grammars/matlab.json +1131 -0
- package/grammars/mdc.json +571 -0
- package/grammars/mdx.json +5629 -0
- package/grammars/mermaid.json +1382 -0
- package/grammars/mojo.json +4153 -0
- package/grammars/narrat.json +227 -0
- package/grammars/nextflow.json +298 -0
- package/grammars/nginx.json +2121 -0
- package/grammars/nim.json +1522 -0
- package/grammars/nix.json +1200 -0
- package/grammars/nushell.json +1047 -0
- package/grammars/objective-c.json +3750 -0
- package/grammars/objective-cpp.json +7242 -0
- package/grammars/ocaml.json +2967 -0
- package/grammars/pascal.json +154 -0
- package/grammars/perl.json +2971 -0
- package/grammars/php.json +4024 -0
- package/grammars/plsql.json +241 -0
- package/grammars/postcss.json +377 -0
- package/grammars/powerquery.json +349 -0
- package/grammars/powershell.json +1024 -0
- package/grammars/prisma.json +443 -0
- package/grammars/prolog.json +298 -0
- package/grammars/proto.json +507 -0
- package/grammars/pug.json +1033 -0
- package/grammars/puppet.json +777 -0
- package/grammars/purescript.json +871 -0
- package/grammars/python.json +4208 -0
- package/grammars/r.json +637 -0
- package/grammars/raku.json +310 -0
- package/grammars/razor.json +1813 -0
- package/grammars/reg.json +136 -0
- package/grammars/rel.json +200 -0
- package/grammars/riscv.json +298 -0
- package/grammars/rst.json +734 -0
- package/grammars/ruby.json +2769 -0
- package/grammars/rust.json +1171 -0
- package/grammars/sas.json +302 -0
- package/grammars/sass.json +618 -0
- package/grammars/scala.json +1313 -0
- package/grammars/scheme.json +384 -0
- package/grammars/scss.json +1874 -0
- package/grammars/shaderlab.json +199 -0
- package/grammars/shellscript.json +2025 -0
- package/grammars/shellsession.json +33 -0
- package/grammars/smalltalk.json +235 -0
- package/grammars/solidity.json +1210 -0
- package/grammars/sparql.json +45 -0
- package/grammars/splunk.json +91 -0
- package/grammars/sql.json +631 -0
- package/grammars/ssh-config.json +88 -0
- package/grammars/stata.json +3050 -0
- package/grammars/stylus.json +1208 -0
- package/grammars/svelte.json +1171 -0
- package/grammars/swift.json +4203 -0
- package/grammars/system-verilog.json +1063 -0
- package/grammars/tasl.json +292 -0
- package/grammars/tcl.json +291 -0
- package/grammars/tex.json +281 -0
- package/grammars/toml.json +431 -0
- package/grammars/tsx.json +5984 -0
- package/grammars/turtle.json +261 -0
- package/grammars/twig.json +1394 -0
- package/grammars/typescript.json +5735 -0
- package/grammars/v.json +1001 -0
- package/grammars/vb.json +232 -0
- package/grammars/verilog.json +305 -0
- package/grammars/vhdl.json +1484 -0
- package/grammars/viml.json +445 -0
- package/grammars/vue-html.json +559 -0
- package/grammars/vue.json +1237 -0
- package/grammars/vyper.json +5415 -0
- package/grammars/wasm.json +831 -0
- package/grammars/wenyan.json +129 -0
- package/grammars/wgsl.json +391 -0
- package/grammars/wolfram.json +2370 -0
- package/grammars/xml.json +382 -0
- package/grammars/xsl.json +89 -0
- package/grammars/yaml.json +616 -0
- package/grammars/zenscript.json +257 -0
- package/grammars/zig.json +312 -0
- package/index.d.ts +18 -0
- package/index.js +2165 -0
- package/package.json +46 -0
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
{
|
|
2
|
+
"displayName": "ZenScript",
|
|
3
|
+
"fileTypes": [
|
|
4
|
+
"zs"
|
|
5
|
+
],
|
|
6
|
+
"name": "zenscript",
|
|
7
|
+
"patterns": [
|
|
8
|
+
{
|
|
9
|
+
"comment": "numbers",
|
|
10
|
+
"match": "\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)([LlFfUuDd]|UL|ul)?\\b",
|
|
11
|
+
"name": "constant.numeric.zenscript"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"comment": "prefixedNumbers",
|
|
15
|
+
"match": "\\b\\-?(0b|0x|0o|0B|0X|0O)(0|[1-9a-fA-F][0-9a-fA-F_]*)[a-zA-Z_]*\\b",
|
|
16
|
+
"name": "constant.numeric.zenscript"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"include": "#code"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"comment": "arrays",
|
|
23
|
+
"match": "\\b((?:[a-z]\\w*\\.)*[A-Z]+\\w*)(?=\\[)",
|
|
24
|
+
"name": "storage.type.object.array.zenscript"
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"repository": {
|
|
28
|
+
"brackets": {
|
|
29
|
+
"patterns": [
|
|
30
|
+
{
|
|
31
|
+
"captures": {
|
|
32
|
+
"1": {
|
|
33
|
+
"name": "keyword.control.zenscript"
|
|
34
|
+
},
|
|
35
|
+
"2": {
|
|
36
|
+
"name": "keyword.other.zenscript"
|
|
37
|
+
},
|
|
38
|
+
"3": {
|
|
39
|
+
"name": "keyword.control.zenscript"
|
|
40
|
+
},
|
|
41
|
+
"4": {
|
|
42
|
+
"name": "variable.other.zenscript"
|
|
43
|
+
},
|
|
44
|
+
"5": {
|
|
45
|
+
"name": "keyword.control.zenscript"
|
|
46
|
+
},
|
|
47
|
+
"6": {
|
|
48
|
+
"name": "constant.numeric.zenscript"
|
|
49
|
+
},
|
|
50
|
+
"7": {
|
|
51
|
+
"name": "keyword.control.zenscript"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"comment": "items and blocks",
|
|
55
|
+
"match": "(<)\\b(.*?)(:(.*?(:(\\*|\\d+)?)?)?)(>)",
|
|
56
|
+
"name": "keyword.other.zenscript"
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
},
|
|
60
|
+
"class": {
|
|
61
|
+
"captures": {
|
|
62
|
+
"1": {
|
|
63
|
+
"name": "storage.type.zenscript"
|
|
64
|
+
},
|
|
65
|
+
"2": {
|
|
66
|
+
"name": "entity.name.type.class.zenscript"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"comment": "class",
|
|
70
|
+
"match": "(zenClass)\\s+(\\w+)",
|
|
71
|
+
"name": "meta.class.zenscript"
|
|
72
|
+
},
|
|
73
|
+
"code": {
|
|
74
|
+
"patterns": [
|
|
75
|
+
{
|
|
76
|
+
"include": "#class"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"include": "#functions"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"include": "#dots"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"include": "#quotes"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"include": "#brackets"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"include": "#comments"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"include": "#var"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"include": "#keywords"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"include": "#constants"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"include": "#operators"
|
|
104
|
+
}
|
|
105
|
+
]
|
|
106
|
+
},
|
|
107
|
+
"comments": {
|
|
108
|
+
"patterns": [
|
|
109
|
+
{
|
|
110
|
+
"comment": "inline comments",
|
|
111
|
+
"match": "//[^\n]*",
|
|
112
|
+
"name": "comment.line.double=slash"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"begin": "\\/\\*",
|
|
116
|
+
"beginCaptures": {
|
|
117
|
+
"0": {
|
|
118
|
+
"name": "comment.block"
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
"comment": "block comments",
|
|
122
|
+
"end": "\\*\\/",
|
|
123
|
+
"endCaptures": {
|
|
124
|
+
"0": {
|
|
125
|
+
"name": "comment.block"
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"name": "comment.block"
|
|
129
|
+
}
|
|
130
|
+
]
|
|
131
|
+
},
|
|
132
|
+
"dots": {
|
|
133
|
+
"captures": {
|
|
134
|
+
"1": {
|
|
135
|
+
"name": "storage.type.zenscript"
|
|
136
|
+
},
|
|
137
|
+
"2": {
|
|
138
|
+
"name": "keyword.control.zenscript"
|
|
139
|
+
},
|
|
140
|
+
"5": {
|
|
141
|
+
"name": "keyword.control.zenscript"
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
"comment": "dots",
|
|
145
|
+
"match": "\\b(\\w+)(\\.)(\\w+)((\\.)(\\w+))*",
|
|
146
|
+
"name": "plain.text.zenscript"
|
|
147
|
+
},
|
|
148
|
+
"functions": {
|
|
149
|
+
"captures": {
|
|
150
|
+
"0": {
|
|
151
|
+
"name": "storage.type.function.zenscript"
|
|
152
|
+
},
|
|
153
|
+
"1": {
|
|
154
|
+
"name": "entity.name.function.zenscript"
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
"comment": "functions",
|
|
158
|
+
"match": "function\\s+([A-Za-z_$][\\w$]*)\\s*(?=\\()",
|
|
159
|
+
"name": "meta.function.zenscript"
|
|
160
|
+
},
|
|
161
|
+
"keywords": {
|
|
162
|
+
"patterns": [
|
|
163
|
+
{
|
|
164
|
+
"comment": "statement keywords",
|
|
165
|
+
"match": "\\b(instanceof|get|implements|set|import|function|override|const|if|else|do|while|for|throw|panic|lock|try|catch|finally|return|break|continue|switch|case|default|in|is|as|match|throws|super|new)\\b",
|
|
166
|
+
"name": "keyword.control.zenscript"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"comment": "storage keywords",
|
|
170
|
+
"match": "\\b(zenClass|zenConstructor|alias|class|interface|enum|struct|expand|variant|set|void|bool|byte|sbyte|short|ushort|int|uint|long|ulong|usize|float|double|char|string)\\b",
|
|
171
|
+
"name": "storage.type.zenscript"
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"comment": "modifier keywords",
|
|
175
|
+
"match": "\\b(variant|abstract|final|private|public|export|internal|static|protected|implicit|virtual|extern|immutable)\\b",
|
|
176
|
+
"name": "storage.modifier.zenscript"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"comment": "annotation keywords",
|
|
180
|
+
"match": "\\b(Native|Precondition)\\b",
|
|
181
|
+
"name": "entity.other.attribute-name"
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"comment": "language keywords",
|
|
185
|
+
"match": "\\b(null|true|false)\\b",
|
|
186
|
+
"name": "constant.language"
|
|
187
|
+
}
|
|
188
|
+
]
|
|
189
|
+
},
|
|
190
|
+
"operators": {
|
|
191
|
+
"patterns": [
|
|
192
|
+
{
|
|
193
|
+
"comment": "math operators",
|
|
194
|
+
"match": "\\b(\\.|\\.\\.|\\.\\.\\.|,|\\+|\\+=|\\+\\+|-|-=|--|~|~=|\\*|\\*=|/|/=|%|%=|\\||\\|=|\\|\\||&|&=|&&|\\^|\\^=|\\?|\\?\\.|\\?\\?|<|<=|<<|<<=|>|>=|>>|>>=|>>>|>>>=|=>|=|==|===|!|!=|!==|\\$|`)\\b",
|
|
195
|
+
"name": "keyword.control"
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"comment": "colons",
|
|
199
|
+
"match": "\\b(;|:)\\b",
|
|
200
|
+
"name": "keyword.control"
|
|
201
|
+
}
|
|
202
|
+
]
|
|
203
|
+
},
|
|
204
|
+
"quotes": {
|
|
205
|
+
"patterns": [
|
|
206
|
+
{
|
|
207
|
+
"begin": "\"",
|
|
208
|
+
"beginCaptures": {
|
|
209
|
+
"0": {
|
|
210
|
+
"name": "punctuation.definition.string.begin.zenscript"
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
"end": "\"",
|
|
214
|
+
"endCaptures": {
|
|
215
|
+
"0": {
|
|
216
|
+
"name": "punctuation.definition.string.end.zenscript"
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
"name": "string.quoted.double.zenscript",
|
|
220
|
+
"patterns": [
|
|
221
|
+
{
|
|
222
|
+
"match": "\\\\.",
|
|
223
|
+
"name": "constant.character.escape.zenscript"
|
|
224
|
+
}
|
|
225
|
+
]
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"begin": "'",
|
|
229
|
+
"beginCaptures": {
|
|
230
|
+
"0": {
|
|
231
|
+
"name": "punctuation.definition.string.begin.zenscript"
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
"end": "'",
|
|
235
|
+
"endCaptures": {
|
|
236
|
+
"0": {
|
|
237
|
+
"name": "punctuation.definition.string.end.zenscript"
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
"name": "string.quoted.single.zenscript",
|
|
241
|
+
"patterns": [
|
|
242
|
+
{
|
|
243
|
+
"match": "\\\\.",
|
|
244
|
+
"name": "constant.character.escape.zenscript"
|
|
245
|
+
}
|
|
246
|
+
]
|
|
247
|
+
}
|
|
248
|
+
]
|
|
249
|
+
},
|
|
250
|
+
"var": {
|
|
251
|
+
"comment": "var",
|
|
252
|
+
"match": "\\b(val|var)\\b",
|
|
253
|
+
"name": "storage.type"
|
|
254
|
+
}
|
|
255
|
+
},
|
|
256
|
+
"scopeName": "source.zenscript"
|
|
257
|
+
}
|
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
{
|
|
2
|
+
"displayName": "zig",
|
|
3
|
+
"fileTypes": [
|
|
4
|
+
"zig",
|
|
5
|
+
"zon"
|
|
6
|
+
],
|
|
7
|
+
"name": "zig",
|
|
8
|
+
"patterns": [
|
|
9
|
+
{
|
|
10
|
+
"include": "#comments"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"include": "#strings"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"include": "#keywords"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"include": "#operators"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"include": "#numbers"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"include": "#support"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"include": "#variables"
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
"repository": {
|
|
32
|
+
"commentContents": {
|
|
33
|
+
"patterns": [
|
|
34
|
+
{
|
|
35
|
+
"match": "\\b(TODO|FIXME|XXX|NOTE)\\b:?",
|
|
36
|
+
"name": "keyword.todo.zig"
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
"comments": {
|
|
41
|
+
"patterns": [
|
|
42
|
+
{
|
|
43
|
+
"begin": "//[!/](?=[^/])",
|
|
44
|
+
"end": "$",
|
|
45
|
+
"name": "comment.line.documentation.zig",
|
|
46
|
+
"patterns": [
|
|
47
|
+
{
|
|
48
|
+
"include": "#commentContents"
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"begin": "//",
|
|
54
|
+
"end": "$",
|
|
55
|
+
"name": "comment.line.double-slash.zig",
|
|
56
|
+
"patterns": [
|
|
57
|
+
{
|
|
58
|
+
"include": "#commentContents"
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
"keywords": {
|
|
65
|
+
"patterns": [
|
|
66
|
+
{
|
|
67
|
+
"match": "\\binline\\b(?!\\s*\\bfn\\b)",
|
|
68
|
+
"name": "keyword.control.repeat.zig"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"match": "\\b(while|for)\\b",
|
|
72
|
+
"name": "keyword.control.repeat.zig"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"match": "\\b(extern|packed|export|pub|noalias|inline|comptime|volatile|align|linksection|threadlocal|allowzero|noinline|callconv)\\b",
|
|
76
|
+
"name": "keyword.storage.zig"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"match": "\\b(struct|enum|union|opaque)\\b",
|
|
80
|
+
"name": "keyword.structure.zig"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"match": "\\b(asm|unreachable)\\b",
|
|
84
|
+
"name": "keyword.statement.zig"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"match": "\\b(break|return|continue|defer|errdefer)\\b",
|
|
88
|
+
"name": "keyword.control.flow.zig"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"match": "\\b(await|resume|suspend|async|nosuspend)\\b",
|
|
92
|
+
"name": "keyword.control.async.zig"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"match": "\\b(try|catch)\\b",
|
|
96
|
+
"name": "keyword.control.trycatch.zig"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"match": "\\b(if|else|switch|orelse)\\b",
|
|
100
|
+
"name": "keyword.control.conditional.zig"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"match": "\\b(null|undefined)\\b",
|
|
104
|
+
"name": "keyword.constant.default.zig"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"match": "\\b(true|false)\\b",
|
|
108
|
+
"name": "keyword.constant.bool.zig"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"match": "\\b(usingnamespace|test|and|or)\\b",
|
|
112
|
+
"name": "keyword.default.zig"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"match": "\\b(bool|void|noreturn|type|error|anyerror|anyframe|anytype|anyopaque)\\b",
|
|
116
|
+
"name": "keyword.type.zig"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"match": "\\b(f16|f32|f64|f80|f128|u\\d+|i\\d+|isize|usize|comptime_int|comptime_float)\\b",
|
|
120
|
+
"name": "keyword.type.integer.zig"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"match": "\\b(c_char|c_short|c_ushort|c_int|c_uint|c_long|c_ulong|c_longlong|c_ulonglong|c_longdouble)\\b",
|
|
124
|
+
"name": "keyword.type.c.zig"
|
|
125
|
+
}
|
|
126
|
+
]
|
|
127
|
+
},
|
|
128
|
+
"numbers": {
|
|
129
|
+
"patterns": [
|
|
130
|
+
{
|
|
131
|
+
"match": "\\b0x[0-9a-fA-F][0-9a-fA-F_]*(\\.[0-9a-fA-F][0-9a-fA-F_]*)?([pP][+-]?[0-9a-fA-F_]+)?\\b",
|
|
132
|
+
"name": "constant.numeric.hexfloat.zig"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"match": "\\b[0-9][0-9_]*(\\.[0-9][0-9_]*)?([eE][+-]?[0-9_]+)?\\b",
|
|
136
|
+
"name": "constant.numeric.float.zig"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"match": "\\b[0-9][0-9_]*\\b",
|
|
140
|
+
"name": "constant.numeric.decimal.zig"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"match": "\\b0x[a-fA-F0-9_]+\\b",
|
|
144
|
+
"name": "constant.numeric.hexadecimal.zig"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"match": "\\b0o[0-7_]+\\b",
|
|
148
|
+
"name": "constant.numeric.octal.zig"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"match": "\\b0b[01_]+\\b",
|
|
152
|
+
"name": "constant.numeric.binary.zig"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"match": "\\b[0-9](([eEpP][+-])|[0-9a-zA-Z_])*(\\.(([eEpP][+-])|[0-9a-zA-Z_])*)?([eEpP][+-])?[0-9a-zA-Z_]*\\b",
|
|
156
|
+
"name": "constant.numeric.invalid.zig"
|
|
157
|
+
}
|
|
158
|
+
]
|
|
159
|
+
},
|
|
160
|
+
"operators": {
|
|
161
|
+
"patterns": [
|
|
162
|
+
{
|
|
163
|
+
"match": "(?<=\\[)\\*c(?=\\])",
|
|
164
|
+
"name": "keyword.operator.c-pointer.zig"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"match": "(\\b(and|or)\\b)|(==|!=)",
|
|
168
|
+
"name": "keyword.operator.comparison.zig"
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"match": "(-%?|\\+%?|\\*%?|/|%)=?",
|
|
172
|
+
"name": "keyword.operator.arithmetic.zig"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"match": "(<<%?|>>|!|&|\\^|\\|)=?",
|
|
176
|
+
"name": "keyword.operator.bitwise.zig"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"match": "(==|\\+\\+|\\*\\*|->)",
|
|
180
|
+
"name": "keyword.operator.special.zig"
|
|
181
|
+
}
|
|
182
|
+
]
|
|
183
|
+
},
|
|
184
|
+
"stringcontent": {
|
|
185
|
+
"patterns": [
|
|
186
|
+
{
|
|
187
|
+
"match": "\\\\([nrt'\"\\\\]|(x[0-9a-fA-F]{2})|(u\\{[0-9a-fA-F]+\\}))",
|
|
188
|
+
"name": "constant.character.escape.zig"
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"match": "\\\\.",
|
|
192
|
+
"name": "invalid.illegal.unrecognized-string-escape.zig"
|
|
193
|
+
}
|
|
194
|
+
]
|
|
195
|
+
},
|
|
196
|
+
"strings": {
|
|
197
|
+
"patterns": [
|
|
198
|
+
{
|
|
199
|
+
"begin": "\"",
|
|
200
|
+
"end": "\"",
|
|
201
|
+
"name": "string.quoted.double.zig",
|
|
202
|
+
"patterns": [
|
|
203
|
+
{
|
|
204
|
+
"include": "#stringcontent"
|
|
205
|
+
}
|
|
206
|
+
]
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"begin": "\\\\\\\\",
|
|
210
|
+
"end": "$",
|
|
211
|
+
"name": "string.multiline.zig"
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"match": "'([^'\\\\]|\\\\(x\\h{2}|[0-2][0-7]{,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.))'",
|
|
215
|
+
"name": "string.quoted.single.zig"
|
|
216
|
+
}
|
|
217
|
+
]
|
|
218
|
+
},
|
|
219
|
+
"support": {
|
|
220
|
+
"patterns": [
|
|
221
|
+
{
|
|
222
|
+
"comment": "Built-in functions",
|
|
223
|
+
"match": "@[_a-zA-Z][_a-zA-Z0-9]*",
|
|
224
|
+
"name": "support.function.builtin.zig"
|
|
225
|
+
}
|
|
226
|
+
]
|
|
227
|
+
},
|
|
228
|
+
"variables": {
|
|
229
|
+
"patterns": [
|
|
230
|
+
{
|
|
231
|
+
"name": "meta.function.declaration.zig",
|
|
232
|
+
"patterns": [
|
|
233
|
+
{
|
|
234
|
+
"captures": {
|
|
235
|
+
"1": {
|
|
236
|
+
"name": "storage.type.function.zig"
|
|
237
|
+
},
|
|
238
|
+
"2": {
|
|
239
|
+
"name": "entity.name.type.zig"
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
"match": "\\b(fn)\\s+([A-Z][a-zA-Z0-9]*)\\b"
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"captures": {
|
|
246
|
+
"1": {
|
|
247
|
+
"name": "storage.type.function.zig"
|
|
248
|
+
},
|
|
249
|
+
"2": {
|
|
250
|
+
"name": "entity.name.function.zig"
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
"match": "\\b(fn)\\s+([_a-zA-Z][_a-zA-Z0-9]*)\\b"
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"begin": "\\b(fn)\\s+@\"",
|
|
257
|
+
"beginCaptures": {
|
|
258
|
+
"1": {
|
|
259
|
+
"name": "storage.type.function.zig"
|
|
260
|
+
}
|
|
261
|
+
},
|
|
262
|
+
"end": "\"",
|
|
263
|
+
"name": "entity.name.function.string.zig",
|
|
264
|
+
"patterns": [
|
|
265
|
+
{
|
|
266
|
+
"include": "#stringcontent"
|
|
267
|
+
}
|
|
268
|
+
]
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
"match": "\\b(const|var|fn)\\b",
|
|
272
|
+
"name": "keyword.default.zig"
|
|
273
|
+
}
|
|
274
|
+
]
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
"name": "meta.function.call.zig",
|
|
278
|
+
"patterns": [
|
|
279
|
+
{
|
|
280
|
+
"match": "([A-Z][a-zA-Z0-9]*)(?=\\s*\\()",
|
|
281
|
+
"name": "entity.name.type.zig"
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
"match": "([_a-zA-Z][_a-zA-Z0-9]*)(?=\\s*\\()",
|
|
285
|
+
"name": "entity.name.function.zig"
|
|
286
|
+
}
|
|
287
|
+
]
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
"name": "meta.variable.zig",
|
|
291
|
+
"patterns": [
|
|
292
|
+
{
|
|
293
|
+
"match": "\\b[_a-zA-Z][_a-zA-Z0-9]*\\b",
|
|
294
|
+
"name": "variable.zig"
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
"begin": "@\"",
|
|
298
|
+
"end": "\"",
|
|
299
|
+
"name": "variable.string.zig",
|
|
300
|
+
"patterns": [
|
|
301
|
+
{
|
|
302
|
+
"include": "#stringcontent"
|
|
303
|
+
}
|
|
304
|
+
]
|
|
305
|
+
}
|
|
306
|
+
]
|
|
307
|
+
}
|
|
308
|
+
]
|
|
309
|
+
}
|
|
310
|
+
},
|
|
311
|
+
"scopeName": "source.zig"
|
|
312
|
+
}
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type GrammarCategory = 'frontend' | 'backend' | 'common' | 'data' | 'other'
|
|
2
|
+
|
|
3
|
+
export interface GrammarInfo {
|
|
4
|
+
name: string
|
|
5
|
+
displayName?: string
|
|
6
|
+
category?: GrammarCategory
|
|
7
|
+
scopeName: string
|
|
8
|
+
source: string
|
|
9
|
+
alias?: string[]
|
|
10
|
+
licenseUrl?: string
|
|
11
|
+
license?: string
|
|
12
|
+
sha?: string
|
|
13
|
+
embedded?: string[]
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const grammars: GrammarInfo[]
|
|
17
|
+
|
|
18
|
+
export { grammars }
|