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.
Files changed (181) hide show
  1. package/LICENSE +22 -0
  2. package/NOTICE +6565 -0
  3. package/README.md +211 -0
  4. package/grammars/abap.json +380 -0
  5. package/grammars/actionscript-3.json +951 -0
  6. package/grammars/ada.json +3874 -0
  7. package/grammars/apache.json +562 -0
  8. package/grammars/apex.json +3203 -0
  9. package/grammars/apl.json +1479 -0
  10. package/grammars/applescript.json +1406 -0
  11. package/grammars/ara.json +428 -0
  12. package/grammars/asm.json +1741 -0
  13. package/grammars/astro.json +776 -0
  14. package/grammars/awk.json +388 -0
  15. package/grammars/ballerina.json +3768 -0
  16. package/grammars/bat.json +783 -0
  17. package/grammars/beancount.json +831 -0
  18. package/grammars/berry.json +172 -0
  19. package/grammars/bibtex.json +315 -0
  20. package/grammars/bicep.json +239 -0
  21. package/grammars/blade.json +3870 -0
  22. package/grammars/c.json +3552 -0
  23. package/grammars/cadence.json +738 -0
  24. package/grammars/clarity.json +877 -0
  25. package/grammars/clojure.json +426 -0
  26. package/grammars/cmake.json +143 -0
  27. package/grammars/cobol.json +1124 -0
  28. package/grammars/codeql.json +1540 -0
  29. package/grammars/coffee.json +1311 -0
  30. package/grammars/cpp-macro.json +9498 -0
  31. package/grammars/cpp.json +16635 -0
  32. package/grammars/crystal.json +1866 -0
  33. package/grammars/csharp.json +5722 -0
  34. package/grammars/css.json +1860 -0
  35. package/grammars/csv.json +46 -0
  36. package/grammars/cue.json +1128 -0
  37. package/grammars/cypher.json +353 -0
  38. package/grammars/d.json +3185 -0
  39. package/grammars/dart.json +522 -0
  40. package/grammars/dax.json +185 -0
  41. package/grammars/diff.json +155 -0
  42. package/grammars/docker.json +97 -0
  43. package/grammars/dream-maker.json +640 -0
  44. package/grammars/elixir.json +1014 -0
  45. package/grammars/elm.json +751 -0
  46. package/grammars/erb.json +156 -0
  47. package/grammars/erlang.json +1757 -0
  48. package/grammars/fish.json +189 -0
  49. package/grammars/fsharp.json +1831 -0
  50. package/grammars/gdresource.json +290 -0
  51. package/grammars/gdscript.json +969 -0
  52. package/grammars/gdshader.json +405 -0
  53. package/grammars/gherkin.json +133 -0
  54. package/grammars/git-commit.json +85 -0
  55. package/grammars/git-rebase.json +56 -0
  56. package/grammars/glimmer-js.json +98 -0
  57. package/grammars/glimmer-ts.json +98 -0
  58. package/grammars/glsl.json +57 -0
  59. package/grammars/gnuplot.json +892 -0
  60. package/grammars/go.json +1012 -0
  61. package/grammars/graphql.json +1295 -0
  62. package/grammars/groovy.json +1378 -0
  63. package/grammars/hack.json +2650 -0
  64. package/grammars/haml.json +598 -0
  65. package/grammars/handlebars.json +848 -0
  66. package/grammars/haskell.json +2431 -0
  67. package/grammars/hcl.json +787 -0
  68. package/grammars/hjson.json +821 -0
  69. package/grammars/hlsl.json +212 -0
  70. package/grammars/html.json +93 -0
  71. package/grammars/imba.json +2696 -0
  72. package/grammars/ini.json +108 -0
  73. package/grammars/java.json +1885 -0
  74. package/grammars/javascript.json +5984 -0
  75. package/grammars/jinja-html.json +16 -0
  76. package/grammars/jinja.json +345 -0
  77. package/grammars/jison.json +715 -0
  78. package/grammars/jsdoc.json +21 -0
  79. package/grammars/json.json +208 -0
  80. package/grammars/json5.json +244 -0
  81. package/grammars/jsonc.json +208 -0
  82. package/grammars/jsonl.json +208 -0
  83. package/grammars/jsonnet.json +211 -0
  84. package/grammars/jssm.json +159 -0
  85. package/grammars/jsx.json +5984 -0
  86. package/grammars/julia.json +1061 -0
  87. package/grammars/kotlin.json +580 -0
  88. package/grammars/kusto.json +687 -0
  89. package/grammars/latex.json +2395 -0
  90. package/grammars/less.json +5012 -0
  91. package/grammars/liquid.json +990 -0
  92. package/grammars/lisp.json +121 -0
  93. package/grammars/logo.json +55 -0
  94. package/grammars/lua.json +956 -0
  95. package/grammars/make.json +629 -0
  96. package/grammars/markdown.json +3066 -0
  97. package/grammars/marko.json +1344 -0
  98. package/grammars/matlab.json +1131 -0
  99. package/grammars/mdc.json +571 -0
  100. package/grammars/mdx.json +5629 -0
  101. package/grammars/mermaid.json +1382 -0
  102. package/grammars/mojo.json +4153 -0
  103. package/grammars/narrat.json +227 -0
  104. package/grammars/nextflow.json +298 -0
  105. package/grammars/nginx.json +2121 -0
  106. package/grammars/nim.json +1522 -0
  107. package/grammars/nix.json +1200 -0
  108. package/grammars/nushell.json +1047 -0
  109. package/grammars/objective-c.json +3750 -0
  110. package/grammars/objective-cpp.json +7242 -0
  111. package/grammars/ocaml.json +2967 -0
  112. package/grammars/pascal.json +154 -0
  113. package/grammars/perl.json +2971 -0
  114. package/grammars/php.json +4024 -0
  115. package/grammars/plsql.json +241 -0
  116. package/grammars/postcss.json +377 -0
  117. package/grammars/powerquery.json +349 -0
  118. package/grammars/powershell.json +1024 -0
  119. package/grammars/prisma.json +443 -0
  120. package/grammars/prolog.json +298 -0
  121. package/grammars/proto.json +507 -0
  122. package/grammars/pug.json +1033 -0
  123. package/grammars/puppet.json +777 -0
  124. package/grammars/purescript.json +871 -0
  125. package/grammars/python.json +4208 -0
  126. package/grammars/r.json +637 -0
  127. package/grammars/raku.json +310 -0
  128. package/grammars/razor.json +1813 -0
  129. package/grammars/reg.json +136 -0
  130. package/grammars/rel.json +200 -0
  131. package/grammars/riscv.json +298 -0
  132. package/grammars/rst.json +734 -0
  133. package/grammars/ruby.json +2769 -0
  134. package/grammars/rust.json +1171 -0
  135. package/grammars/sas.json +302 -0
  136. package/grammars/sass.json +618 -0
  137. package/grammars/scala.json +1313 -0
  138. package/grammars/scheme.json +384 -0
  139. package/grammars/scss.json +1874 -0
  140. package/grammars/shaderlab.json +199 -0
  141. package/grammars/shellscript.json +2025 -0
  142. package/grammars/shellsession.json +33 -0
  143. package/grammars/smalltalk.json +235 -0
  144. package/grammars/solidity.json +1210 -0
  145. package/grammars/sparql.json +45 -0
  146. package/grammars/splunk.json +91 -0
  147. package/grammars/sql.json +631 -0
  148. package/grammars/ssh-config.json +88 -0
  149. package/grammars/stata.json +3050 -0
  150. package/grammars/stylus.json +1208 -0
  151. package/grammars/svelte.json +1171 -0
  152. package/grammars/swift.json +4203 -0
  153. package/grammars/system-verilog.json +1063 -0
  154. package/grammars/tasl.json +292 -0
  155. package/grammars/tcl.json +291 -0
  156. package/grammars/tex.json +281 -0
  157. package/grammars/toml.json +431 -0
  158. package/grammars/tsx.json +5984 -0
  159. package/grammars/turtle.json +261 -0
  160. package/grammars/twig.json +1394 -0
  161. package/grammars/typescript.json +5735 -0
  162. package/grammars/v.json +1001 -0
  163. package/grammars/vb.json +232 -0
  164. package/grammars/verilog.json +305 -0
  165. package/grammars/vhdl.json +1484 -0
  166. package/grammars/viml.json +445 -0
  167. package/grammars/vue-html.json +559 -0
  168. package/grammars/vue.json +1237 -0
  169. package/grammars/vyper.json +5415 -0
  170. package/grammars/wasm.json +831 -0
  171. package/grammars/wenyan.json +129 -0
  172. package/grammars/wgsl.json +391 -0
  173. package/grammars/wolfram.json +2370 -0
  174. package/grammars/xml.json +382 -0
  175. package/grammars/xsl.json +89 -0
  176. package/grammars/yaml.json +616 -0
  177. package/grammars/zenscript.json +257 -0
  178. package/grammars/zig.json +312 -0
  179. package/index.d.ts +18 -0
  180. package/index.js +2165 -0
  181. 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 }