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,507 @@
1
+ {
2
+ "displayName": "Protocol Buffer 3",
3
+ "fileTypes": [
4
+ "proto"
5
+ ],
6
+ "name": "proto",
7
+ "patterns": [
8
+ {
9
+ "include": "#comments"
10
+ },
11
+ {
12
+ "include": "#syntax"
13
+ },
14
+ {
15
+ "include": "#package"
16
+ },
17
+ {
18
+ "include": "#import"
19
+ },
20
+ {
21
+ "include": "#optionStmt"
22
+ },
23
+ {
24
+ "include": "#message"
25
+ },
26
+ {
27
+ "include": "#enum"
28
+ },
29
+ {
30
+ "include": "#service"
31
+ }
32
+ ],
33
+ "repository": {
34
+ "comments": {
35
+ "patterns": [
36
+ {
37
+ "begin": "/\\*",
38
+ "end": "\\*/",
39
+ "name": "comment.block.proto"
40
+ },
41
+ {
42
+ "begin": "//",
43
+ "end": "$\\n?",
44
+ "name": "comment.line.double-slash.proto"
45
+ }
46
+ ]
47
+ },
48
+ "constants": {
49
+ "match": "\\b(true|false|max|[A-Z_]+)\\b",
50
+ "name": "constant.language.proto"
51
+ },
52
+ "enum": {
53
+ "begin": "(enum)(\\s+)([A-Za-z][A-Za-z0-9_]*)(\\s*)(\\{)?",
54
+ "beginCaptures": {
55
+ "1": {
56
+ "name": "keyword.other.proto"
57
+ },
58
+ "3": {
59
+ "name": "entity.name.class.proto"
60
+ }
61
+ },
62
+ "end": "\\}",
63
+ "patterns": [
64
+ {
65
+ "include": "#reserved"
66
+ },
67
+ {
68
+ "include": "#optionStmt"
69
+ },
70
+ {
71
+ "include": "#comments"
72
+ },
73
+ {
74
+ "begin": "([A-Za-z][A-Za-z0-9_]*)\\s*(=)\\s*(0[xX][0-9a-fA-F]+|[0-9]+)",
75
+ "beginCaptures": {
76
+ "1": {
77
+ "name": "variable.other.proto"
78
+ },
79
+ "2": {
80
+ "name": "keyword.operator.assignment.proto"
81
+ },
82
+ "3": {
83
+ "name": "constant.numeric.proto"
84
+ }
85
+ },
86
+ "end": "(;)",
87
+ "endCaptures": {
88
+ "1": {
89
+ "name": "punctuation.terminator.proto"
90
+ }
91
+ },
92
+ "patterns": [
93
+ {
94
+ "include": "#fieldOptions"
95
+ }
96
+ ]
97
+ }
98
+ ]
99
+ },
100
+ "field": {
101
+ "begin": "\\s*(optional|repeated|required)?\\s*\\b([\\w.]+)\\s+(\\w+)\\s*(=)\\s*(0[xX][0-9a-fA-F]+|[0-9]+)",
102
+ "beginCaptures": {
103
+ "1": {
104
+ "name": "storage.modifier.proto"
105
+ },
106
+ "2": {
107
+ "name": "storage.type.proto"
108
+ },
109
+ "3": {
110
+ "name": "variable.other.proto"
111
+ },
112
+ "4": {
113
+ "name": "keyword.operator.assignment.proto"
114
+ },
115
+ "5": {
116
+ "name": "constant.numeric.proto"
117
+ }
118
+ },
119
+ "end": "(;)",
120
+ "endCaptures": {
121
+ "1": {
122
+ "name": "punctuation.terminator.proto"
123
+ }
124
+ },
125
+ "patterns": [
126
+ {
127
+ "include": "#fieldOptions"
128
+ }
129
+ ]
130
+ },
131
+ "fieldOptions": {
132
+ "begin": "\\[",
133
+ "end": "\\]",
134
+ "patterns": [
135
+ {
136
+ "include": "#constants"
137
+ },
138
+ {
139
+ "include": "#number"
140
+ },
141
+ {
142
+ "include": "#string"
143
+ },
144
+ {
145
+ "include": "#subMsgOption"
146
+ },
147
+ {
148
+ "include": "#optionName"
149
+ }
150
+ ]
151
+ },
152
+ "ident": {
153
+ "match": "[A-Za-z][A-Za-z0-9_]*",
154
+ "name": "entity.name.class.proto"
155
+ },
156
+ "import": {
157
+ "captures": {
158
+ "1": {
159
+ "name": "keyword.other.proto"
160
+ },
161
+ "2": {
162
+ "name": "keyword.other.proto"
163
+ },
164
+ "3": {
165
+ "name": "string.quoted.double.proto.import"
166
+ },
167
+ "4": {
168
+ "name": "punctuation.terminator.proto"
169
+ }
170
+ },
171
+ "match": "\\s*(import)\\s+(weak|public)?\\s*(\"[^\"]+\")\\s*(;)"
172
+ },
173
+ "kv": {
174
+ "begin": "(\\w+)\\s*(:)",
175
+ "beginCaptures": {
176
+ "1": {
177
+ "name": "keyword.other.proto"
178
+ },
179
+ "2": {
180
+ "name": "punctuation.separator.key-value.proto"
181
+ }
182
+ },
183
+ "end": "(;)|,|(?=[}/_a-zA-Z])",
184
+ "endCaptures": {
185
+ "1": {
186
+ "name": "punctuation.terminator.proto"
187
+ }
188
+ },
189
+ "patterns": [
190
+ {
191
+ "include": "#constants"
192
+ },
193
+ {
194
+ "include": "#number"
195
+ },
196
+ {
197
+ "include": "#string"
198
+ },
199
+ {
200
+ "include": "#subMsgOption"
201
+ }
202
+ ]
203
+ },
204
+ "mapfield": {
205
+ "begin": "\\s*(map)\\s*(<)\\s*([\\w.]+)\\s*,\\s*([\\w.]+)\\s*(>)\\s+(\\w+)\\s*(=)\\s*(\\d+)",
206
+ "beginCaptures": {
207
+ "1": {
208
+ "name": "storage.type.proto"
209
+ },
210
+ "2": {
211
+ "name": "punctuation.definition.typeparameters.begin.proto"
212
+ },
213
+ "3": {
214
+ "name": "storage.type.proto"
215
+ },
216
+ "4": {
217
+ "name": "storage.type.proto"
218
+ },
219
+ "5": {
220
+ "name": "punctuation.definition.typeparameters.end.proto"
221
+ },
222
+ "6": {
223
+ "name": "variable.other.proto"
224
+ },
225
+ "7": {
226
+ "name": "keyword.operator.assignment.proto"
227
+ },
228
+ "8": {
229
+ "name": "constant.numeric.proto"
230
+ }
231
+ },
232
+ "end": "(;)",
233
+ "endCaptures": {
234
+ "1": {
235
+ "name": "punctuation.terminator.proto"
236
+ }
237
+ },
238
+ "patterns": [
239
+ {
240
+ "include": "#fieldOptions"
241
+ }
242
+ ]
243
+ },
244
+ "message": {
245
+ "begin": "(message|extend)(\\s+)([A-Za-z_][A-Za-z0-9_.]*)(\\s*)(\\{)?",
246
+ "beginCaptures": {
247
+ "1": {
248
+ "name": "keyword.other.proto"
249
+ },
250
+ "3": {
251
+ "name": "entity.name.class.message.proto"
252
+ }
253
+ },
254
+ "end": "\\}",
255
+ "patterns": [
256
+ {
257
+ "include": "#reserved"
258
+ },
259
+ {
260
+ "include": "$self"
261
+ },
262
+ {
263
+ "include": "#enum"
264
+ },
265
+ {
266
+ "include": "#optionStmt"
267
+ },
268
+ {
269
+ "include": "#comments"
270
+ },
271
+ {
272
+ "include": "#oneof"
273
+ },
274
+ {
275
+ "include": "#field"
276
+ },
277
+ {
278
+ "include": "#mapfield"
279
+ }
280
+ ]
281
+ },
282
+ "method": {
283
+ "begin": "(rpc)\\s+([A-Za-z][A-Za-z0-9_]*)",
284
+ "beginCaptures": {
285
+ "1": {
286
+ "name": "keyword.other.proto"
287
+ },
288
+ "2": {
289
+ "name": "entity.name.function"
290
+ }
291
+ },
292
+ "end": "\\}|(;)",
293
+ "endCaptures": {
294
+ "1": {
295
+ "name": "punctuation.terminator.proto"
296
+ }
297
+ },
298
+ "patterns": [
299
+ {
300
+ "include": "#comments"
301
+ },
302
+ {
303
+ "include": "#optionStmt"
304
+ },
305
+ {
306
+ "include": "#rpcKeywords"
307
+ },
308
+ {
309
+ "include": "#ident"
310
+ }
311
+ ]
312
+ },
313
+ "number": {
314
+ "match": "\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)\\b",
315
+ "name": "constant.numeric.proto"
316
+ },
317
+ "oneof": {
318
+ "begin": "(oneof)\\s+([A-Za-z][A-Za-z0-9_]*)\\s*\\{?",
319
+ "beginCaptures": {
320
+ "1": {
321
+ "name": "keyword.other.proto"
322
+ },
323
+ "2": {
324
+ "name": "variable.other.proto"
325
+ }
326
+ },
327
+ "end": "\\}",
328
+ "patterns": [
329
+ {
330
+ "include": "#optionStmt"
331
+ },
332
+ {
333
+ "include": "#comments"
334
+ },
335
+ {
336
+ "include": "#field"
337
+ }
338
+ ]
339
+ },
340
+ "optionName": {
341
+ "captures": {
342
+ "1": {
343
+ "name": "support.other.proto"
344
+ },
345
+ "2": {
346
+ "name": "support.other.proto"
347
+ },
348
+ "3": {
349
+ "name": "support.other.proto"
350
+ }
351
+ },
352
+ "match": "(\\w+|\\(\\w+(\\.\\w+)*\\))(\\.\\w+)*"
353
+ },
354
+ "optionStmt": {
355
+ "begin": "(option)\\s+(\\w+|\\(\\w+(\\.\\w+)*\\))(\\.\\w+)*\\s*(=)",
356
+ "beginCaptures": {
357
+ "1": {
358
+ "name": "keyword.other.proto"
359
+ },
360
+ "2": {
361
+ "name": "support.other.proto"
362
+ },
363
+ "3": {
364
+ "name": "support.other.proto"
365
+ },
366
+ "4": {
367
+ "name": "support.other.proto"
368
+ },
369
+ "5": {
370
+ "name": "keyword.operator.assignment.proto"
371
+ }
372
+ },
373
+ "end": "(;)",
374
+ "endCaptures": {
375
+ "1": {
376
+ "name": "punctuation.terminator.proto"
377
+ }
378
+ },
379
+ "patterns": [
380
+ {
381
+ "include": "#constants"
382
+ },
383
+ {
384
+ "include": "#number"
385
+ },
386
+ {
387
+ "include": "#string"
388
+ },
389
+ {
390
+ "include": "#subMsgOption"
391
+ }
392
+ ]
393
+ },
394
+ "package": {
395
+ "captures": {
396
+ "1": {
397
+ "name": "keyword.other.proto"
398
+ },
399
+ "2": {
400
+ "name": "string.unquoted.proto.package"
401
+ },
402
+ "3": {
403
+ "name": "punctuation.terminator.proto"
404
+ }
405
+ },
406
+ "match": "\\s*(package)\\s+([\\w.]+)\\s*(;)"
407
+ },
408
+ "reserved": {
409
+ "begin": "(reserved)\\s+",
410
+ "beginCaptures": {
411
+ "1": {
412
+ "name": "keyword.other.proto"
413
+ }
414
+ },
415
+ "end": "(;)",
416
+ "endCaptures": {
417
+ "1": {
418
+ "name": "punctuation.terminator.proto"
419
+ }
420
+ },
421
+ "patterns": [
422
+ {
423
+ "captures": {
424
+ "1": {
425
+ "name": "constant.numeric.proto"
426
+ },
427
+ "3": {
428
+ "name": "keyword.other.proto"
429
+ },
430
+ "4": {
431
+ "name": "constant.numeric.proto"
432
+ }
433
+ },
434
+ "match": "(\\d+)(\\s+(to)\\s+(\\d+))?"
435
+ },
436
+ {
437
+ "include": "#string"
438
+ }
439
+ ]
440
+ },
441
+ "rpcKeywords": {
442
+ "match": "\\b(stream|returns)\\b",
443
+ "name": "keyword.other.proto"
444
+ },
445
+ "service": {
446
+ "begin": "(service)\\s+([A-Za-z][A-Za-z0-9_.]*)\\s*\\{?",
447
+ "beginCaptures": {
448
+ "1": {
449
+ "name": "keyword.other.proto"
450
+ },
451
+ "2": {
452
+ "name": "entity.name.class.message.proto"
453
+ }
454
+ },
455
+ "end": "\\}",
456
+ "patterns": [
457
+ {
458
+ "include": "#comments"
459
+ },
460
+ {
461
+ "include": "#optionStmt"
462
+ },
463
+ {
464
+ "include": "#method"
465
+ }
466
+ ]
467
+ },
468
+ "storagetypes": {
469
+ "match": "\\b(double|float|int32|int64|uint32|uint64|sint32|sint64|fixed32|fixed64|sfixed32|sfixed64|bool|string|bytes)\\b",
470
+ "name": "storage.type.proto"
471
+ },
472
+ "string": {
473
+ "match": "('([^']|\\')*')|(\"([^\"]|\\\")*\")",
474
+ "name": "string.quoted.double.proto"
475
+ },
476
+ "subMsgOption": {
477
+ "begin": "\\{",
478
+ "end": "\\}",
479
+ "patterns": [
480
+ {
481
+ "include": "#kv"
482
+ },
483
+ {
484
+ "include": "#comments"
485
+ }
486
+ ]
487
+ },
488
+ "syntax": {
489
+ "captures": {
490
+ "1": {
491
+ "name": "keyword.other.proto"
492
+ },
493
+ "2": {
494
+ "name": "keyword.operator.assignment.proto"
495
+ },
496
+ "3": {
497
+ "name": "string.quoted.double.proto.syntax"
498
+ },
499
+ "4": {
500
+ "name": "punctuation.terminator.proto"
501
+ }
502
+ },
503
+ "match": "\\s*(syntax)\\s*(=)\\s*(\"proto[23]\")\\s*(;)"
504
+ }
505
+ },
506
+ "scopeName": "source.proto"
507
+ }