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,1295 @@
1
+ {
2
+ "displayName": "GraphQL",
3
+ "fileTypes": [
4
+ "graphql",
5
+ "graphqls",
6
+ "gql",
7
+ "graphcool"
8
+ ],
9
+ "name": "graphql",
10
+ "patterns": [
11
+ {
12
+ "include": "#graphql"
13
+ }
14
+ ],
15
+ "repository": {
16
+ "graphql": {
17
+ "patterns": [
18
+ {
19
+ "include": "#graphql-comment"
20
+ },
21
+ {
22
+ "include": "#graphql-description-docstring"
23
+ },
24
+ {
25
+ "include": "#graphql-description-singleline"
26
+ },
27
+ {
28
+ "include": "#graphql-fragment-definition"
29
+ },
30
+ {
31
+ "include": "#graphql-directive-definition"
32
+ },
33
+ {
34
+ "include": "#graphql-type-interface"
35
+ },
36
+ {
37
+ "include": "#graphql-enum"
38
+ },
39
+ {
40
+ "include": "#graphql-scalar"
41
+ },
42
+ {
43
+ "include": "#graphql-union"
44
+ },
45
+ {
46
+ "include": "#graphql-schema"
47
+ },
48
+ {
49
+ "include": "#graphql-operation-def"
50
+ },
51
+ {
52
+ "include": "#literal-quasi-embedded"
53
+ }
54
+ ]
55
+ },
56
+ "graphql-ampersand": {
57
+ "captures": {
58
+ "1": {
59
+ "name": "keyword.operator.logical.graphql"
60
+ }
61
+ },
62
+ "match": "\\s*(&)"
63
+ },
64
+ "graphql-arguments": {
65
+ "begin": "\\s*(\\()",
66
+ "beginCaptures": {
67
+ "1": {
68
+ "name": "meta.brace.round.directive.graphql"
69
+ }
70
+ },
71
+ "end": "\\s*(\\))",
72
+ "endCaptures": {
73
+ "1": {
74
+ "name": "meta.brace.round.directive.graphql"
75
+ }
76
+ },
77
+ "name": "meta.arguments.graphql",
78
+ "patterns": [
79
+ {
80
+ "include": "#graphql-comment"
81
+ },
82
+ {
83
+ "include": "#graphql-description-docstring"
84
+ },
85
+ {
86
+ "include": "#graphql-description-singleline"
87
+ },
88
+ {
89
+ "begin": "\\s*([_A-Za-z][_0-9A-Za-z]*)(?:\\s*(:))",
90
+ "beginCaptures": {
91
+ "1": {
92
+ "name": "variable.parameter.graphql"
93
+ },
94
+ "2": {
95
+ "name": "punctuation.colon.graphql"
96
+ }
97
+ },
98
+ "end": "(?=\\s*(?:(?:([_A-Za-z][_0-9A-Za-z]*)\\s*(:))|\\)))|\\s*(,)",
99
+ "endCaptures": {
100
+ "3": {
101
+ "name": "punctuation.comma.graphql"
102
+ }
103
+ },
104
+ "patterns": [
105
+ {
106
+ "include": "#graphql-comment"
107
+ },
108
+ {
109
+ "include": "#graphql-description-docstring"
110
+ },
111
+ {
112
+ "include": "#graphql-description-singleline"
113
+ },
114
+ {
115
+ "include": "#graphql-directive"
116
+ },
117
+ {
118
+ "include": "#graphql-value"
119
+ },
120
+ {
121
+ "include": "#graphql-skip-newlines"
122
+ }
123
+ ]
124
+ },
125
+ {
126
+ "include": "#literal-quasi-embedded"
127
+ }
128
+ ]
129
+ },
130
+ "graphql-boolean-value": {
131
+ "captures": {
132
+ "1": {
133
+ "name": "constant.language.boolean.graphql"
134
+ }
135
+ },
136
+ "match": "\\s*\\b(true|false)\\b"
137
+ },
138
+ "graphql-colon": {
139
+ "captures": {
140
+ "1": {
141
+ "name": "punctuation.colon.graphql"
142
+ }
143
+ },
144
+ "match": "\\s*(:)"
145
+ },
146
+ "graphql-comma": {
147
+ "captures": {
148
+ "1": {
149
+ "name": "punctuation.comma.graphql"
150
+ }
151
+ },
152
+ "match": "\\s*(,)"
153
+ },
154
+ "graphql-comment": {
155
+ "patterns": [
156
+ {
157
+ "captures": {
158
+ "1": {
159
+ "name": "punctuation.whitespace.comment.leading.graphql"
160
+ }
161
+ },
162
+ "comment": "need to prefix comment space with a scope else Atom's reflow cmd doesn't work",
163
+ "match": "(\\s*)(#).*",
164
+ "name": "comment.line.graphql.js"
165
+ },
166
+ {
167
+ "begin": "(\"\"\")",
168
+ "beginCaptures": {
169
+ "1": {
170
+ "name": "punctuation.whitespace.comment.leading.graphql"
171
+ }
172
+ },
173
+ "end": "(\"\"\")",
174
+ "name": "comment.line.graphql.js"
175
+ },
176
+ {
177
+ "begin": "(\")",
178
+ "beginCaptures": {
179
+ "1": {
180
+ "name": "punctuation.whitespace.comment.leading.graphql"
181
+ }
182
+ },
183
+ "end": "(\")",
184
+ "name": "comment.line.graphql.js"
185
+ }
186
+ ]
187
+ },
188
+ "graphql-description-docstring": {
189
+ "begin": "\"\"\"",
190
+ "end": "\"\"\"",
191
+ "name": "comment.block.graphql"
192
+ },
193
+ "graphql-description-singleline": {
194
+ "match": "#(?=([^\"]*\"[^\"]*\")*[^\"]*$).*$",
195
+ "name": "comment.line.number-sign.graphql"
196
+ },
197
+ "graphql-directive": {
198
+ "applyEndPatternLast": 1,
199
+ "begin": "\\s*((@)\\s*([_A-Za-z][_0-9A-Za-z]*))",
200
+ "beginCaptures": {
201
+ "1": {
202
+ "name": "entity.name.function.directive.graphql"
203
+ }
204
+ },
205
+ "end": "(?=.)",
206
+ "patterns": [
207
+ {
208
+ "include": "#graphql-comment"
209
+ },
210
+ {
211
+ "include": "#graphql-description-docstring"
212
+ },
213
+ {
214
+ "include": "#graphql-description-singleline"
215
+ },
216
+ {
217
+ "include": "#graphql-arguments"
218
+ },
219
+ {
220
+ "include": "#literal-quasi-embedded"
221
+ },
222
+ {
223
+ "include": "#graphql-skip-newlines"
224
+ }
225
+ ]
226
+ },
227
+ "graphql-directive-definition": {
228
+ "applyEndPatternLast": 1,
229
+ "begin": "\\s*(\\bdirective\\b)\\s*(@[_A-Za-z][_0-9A-Za-z]*)",
230
+ "beginCaptures": {
231
+ "1": {
232
+ "name": "keyword.directive.graphql"
233
+ },
234
+ "2": {
235
+ "name": "entity.name.function.directive.graphql"
236
+ },
237
+ "3": {
238
+ "name": "keyword.on.graphql"
239
+ },
240
+ "4": {
241
+ "name": "support.type.graphql"
242
+ }
243
+ },
244
+ "end": "(?=.)",
245
+ "patterns": [
246
+ {
247
+ "include": "#graphql-variable-definitions"
248
+ },
249
+ {
250
+ "applyEndPatternLast": 1,
251
+ "begin": "\\s*(\\bon\\b)\\s*([_A-Za-z]*)",
252
+ "beginCaptures": {
253
+ "1": {
254
+ "name": "keyword.on.graphql"
255
+ },
256
+ "2": {
257
+ "name": "support.type.location.graphql"
258
+ }
259
+ },
260
+ "end": "(?=.)",
261
+ "patterns": [
262
+ {
263
+ "include": "#graphql-skip-newlines"
264
+ },
265
+ {
266
+ "include": "#graphql-comment"
267
+ },
268
+ {
269
+ "include": "#literal-quasi-embedded"
270
+ },
271
+ {
272
+ "captures": {
273
+ "2": {
274
+ "name": "support.type.location.graphql"
275
+ }
276
+ },
277
+ "match": "\\s*(\\|)\\s*([_A-Za-z]*)"
278
+ }
279
+ ]
280
+ },
281
+ {
282
+ "include": "#graphql-skip-newlines"
283
+ },
284
+ {
285
+ "include": "#graphql-comment"
286
+ },
287
+ {
288
+ "include": "#literal-quasi-embedded"
289
+ }
290
+ ]
291
+ },
292
+ "graphql-enum": {
293
+ "begin": "\\s*+\\b(enum)\\b\\s*([_A-Za-z][_0-9A-Za-z]*)",
294
+ "beginCaptures": {
295
+ "1": {
296
+ "name": "keyword.enum.graphql"
297
+ },
298
+ "2": {
299
+ "name": "support.type.enum.graphql"
300
+ }
301
+ },
302
+ "end": "(?<=})",
303
+ "name": "meta.enum.graphql",
304
+ "patterns": [
305
+ {
306
+ "begin": "\\s*({)",
307
+ "beginCaptures": {
308
+ "1": {
309
+ "name": "punctuation.operation.graphql"
310
+ }
311
+ },
312
+ "end": "\\s*(})",
313
+ "endCaptures": {
314
+ "1": {
315
+ "name": "punctuation.operation.graphql"
316
+ }
317
+ },
318
+ "name": "meta.type.object.graphql",
319
+ "patterns": [
320
+ {
321
+ "include": "#graphql-object-type"
322
+ },
323
+ {
324
+ "include": "#graphql-comment"
325
+ },
326
+ {
327
+ "include": "#graphql-description-docstring"
328
+ },
329
+ {
330
+ "include": "#graphql-description-singleline"
331
+ },
332
+ {
333
+ "include": "#graphql-directive"
334
+ },
335
+ {
336
+ "include": "#graphql-enum-value"
337
+ },
338
+ {
339
+ "include": "#literal-quasi-embedded"
340
+ }
341
+ ]
342
+ },
343
+ {
344
+ "include": "#graphql-comment"
345
+ },
346
+ {
347
+ "include": "#graphql-description-docstring"
348
+ },
349
+ {
350
+ "include": "#graphql-description-singleline"
351
+ },
352
+ {
353
+ "include": "#graphql-directive"
354
+ }
355
+ ]
356
+ },
357
+ "graphql-enum-value": {
358
+ "match": "\\s*(?!=\\b(true|false|null)\\b)([_A-Za-z][_0-9A-Za-z]*)",
359
+ "name": "constant.character.enum.graphql"
360
+ },
361
+ "graphql-field": {
362
+ "patterns": [
363
+ {
364
+ "captures": {
365
+ "1": {
366
+ "name": "string.unquoted.alias.graphql"
367
+ },
368
+ "2": {
369
+ "name": "punctuation.colon.graphql"
370
+ }
371
+ },
372
+ "match": "\\s*([_A-Za-z][_0-9A-Za-z]*)\\s*(:)"
373
+ },
374
+ {
375
+ "captures": {
376
+ "1": {
377
+ "name": "variable.graphql"
378
+ }
379
+ },
380
+ "match": "\\s*([_A-Za-z][_0-9A-Za-z]*)"
381
+ },
382
+ {
383
+ "include": "#graphql-arguments"
384
+ },
385
+ {
386
+ "include": "#graphql-directive"
387
+ },
388
+ {
389
+ "include": "#graphql-selection-set"
390
+ },
391
+ {
392
+ "include": "#literal-quasi-embedded"
393
+ },
394
+ {
395
+ "include": "#graphql-skip-newlines"
396
+ }
397
+ ]
398
+ },
399
+ "graphql-float-value": {
400
+ "captures": {
401
+ "1": {
402
+ "name": "constant.numeric.float.graphql"
403
+ }
404
+ },
405
+ "match": "\\s*(-?(0|[1-9][0-9]*)(\\.[0-9]+)?((e|E)(\\+|-)?[0-9]+)?)"
406
+ },
407
+ "graphql-fragment-definition": {
408
+ "begin": "\\s*(?:(\\bfragment\\b)\\s*([_A-Za-z][_0-9A-Za-z]*)?\\s*(?:(\\bon\\b)\\s*([_A-Za-z][_0-9A-Za-z]*)))",
409
+ "captures": {
410
+ "1": {
411
+ "name": "keyword.fragment.graphql"
412
+ },
413
+ "2": {
414
+ "name": "entity.name.fragment.graphql"
415
+ },
416
+ "3": {
417
+ "name": "keyword.on.graphql"
418
+ },
419
+ "4": {
420
+ "name": "support.type.graphql"
421
+ }
422
+ },
423
+ "end": "(?<=})",
424
+ "name": "meta.fragment.graphql",
425
+ "patterns": [
426
+ {
427
+ "include": "#graphql-comment"
428
+ },
429
+ {
430
+ "include": "#graphql-description-docstring"
431
+ },
432
+ {
433
+ "include": "#graphql-description-singleline"
434
+ },
435
+ {
436
+ "include": "#graphql-selection-set"
437
+ },
438
+ {
439
+ "include": "#graphql-directive"
440
+ },
441
+ {
442
+ "include": "#graphql-skip-newlines"
443
+ },
444
+ {
445
+ "include": "#literal-quasi-embedded"
446
+ }
447
+ ]
448
+ },
449
+ "graphql-fragment-spread": {
450
+ "applyEndPatternLast": 1,
451
+ "begin": "\\s*(\\.\\.\\.)\\s*(?!\\bon\\b)([_A-Za-z][_0-9A-Za-z]*)",
452
+ "captures": {
453
+ "1": {
454
+ "name": "keyword.operator.spread.graphql"
455
+ },
456
+ "2": {
457
+ "name": "variable.fragment.graphql"
458
+ }
459
+ },
460
+ "end": "(?=.)",
461
+ "patterns": [
462
+ {
463
+ "include": "#graphql-comment"
464
+ },
465
+ {
466
+ "include": "#graphql-description-docstring"
467
+ },
468
+ {
469
+ "include": "#graphql-description-singleline"
470
+ },
471
+ {
472
+ "include": "#graphql-selection-set"
473
+ },
474
+ {
475
+ "include": "#graphql-directive"
476
+ },
477
+ {
478
+ "include": "#literal-quasi-embedded"
479
+ },
480
+ {
481
+ "include": "#graphql-skip-newlines"
482
+ }
483
+ ]
484
+ },
485
+ "graphql-ignore-spaces": {
486
+ "match": "\\s*"
487
+ },
488
+ "graphql-inline-fragment": {
489
+ "applyEndPatternLast": 1,
490
+ "begin": "\\s*(\\.\\.\\.)\\s*(?:(\\bon\\b)\\s*([_A-Za-z][_0-9A-Za-z]*))?",
491
+ "captures": {
492
+ "1": {
493
+ "name": "keyword.operator.spread.graphql"
494
+ },
495
+ "2": {
496
+ "name": "keyword.on.graphql"
497
+ },
498
+ "3": {
499
+ "name": "support.type.graphql"
500
+ }
501
+ },
502
+ "end": "(?=.)",
503
+ "patterns": [
504
+ {
505
+ "include": "#graphql-comment"
506
+ },
507
+ {
508
+ "include": "#graphql-description-docstring"
509
+ },
510
+ {
511
+ "include": "#graphql-description-singleline"
512
+ },
513
+ {
514
+ "include": "#graphql-selection-set"
515
+ },
516
+ {
517
+ "include": "#graphql-directive"
518
+ },
519
+ {
520
+ "include": "#graphql-skip-newlines"
521
+ },
522
+ {
523
+ "include": "#literal-quasi-embedded"
524
+ }
525
+ ]
526
+ },
527
+ "graphql-input-types": {
528
+ "patterns": [
529
+ {
530
+ "include": "#graphql-scalar-type"
531
+ },
532
+ {
533
+ "captures": {
534
+ "1": {
535
+ "name": "support.type.graphql"
536
+ },
537
+ "2": {
538
+ "name": "keyword.operator.nulltype.graphql"
539
+ }
540
+ },
541
+ "match": "\\s*([_A-Za-z][_0-9A-Za-z]*)(?:\\s*(!))?"
542
+ },
543
+ {
544
+ "begin": "\\s*(\\[)",
545
+ "captures": {
546
+ "1": {
547
+ "name": "meta.brace.square.graphql"
548
+ },
549
+ "2": {
550
+ "name": "keyword.operator.nulltype.graphql"
551
+ }
552
+ },
553
+ "end": "\\s*(\\])(?:\\s*(!))?",
554
+ "name": "meta.type.list.graphql",
555
+ "patterns": [
556
+ {
557
+ "include": "#graphql-comment"
558
+ },
559
+ {
560
+ "include": "#graphql-description-docstring"
561
+ },
562
+ {
563
+ "include": "#graphql-description-singleline"
564
+ },
565
+ {
566
+ "include": "#graphql-input-types"
567
+ },
568
+ {
569
+ "include": "#graphql-comma"
570
+ },
571
+ {
572
+ "include": "#literal-quasi-embedded"
573
+ }
574
+ ]
575
+ }
576
+ ]
577
+ },
578
+ "graphql-list-value": {
579
+ "patterns": [
580
+ {
581
+ "begin": "\\s*+(\\[)",
582
+ "beginCaptures": {
583
+ "1": {
584
+ "name": "meta.brace.square.graphql"
585
+ }
586
+ },
587
+ "end": "\\s*(\\])",
588
+ "endCaptures": {
589
+ "1": {
590
+ "name": "meta.brace.square.graphql"
591
+ }
592
+ },
593
+ "name": "meta.listvalues.graphql",
594
+ "patterns": [
595
+ {
596
+ "include": "#graphql-value"
597
+ }
598
+ ]
599
+ }
600
+ ]
601
+ },
602
+ "graphql-name": {
603
+ "captures": {
604
+ "1": {
605
+ "name": "entity.name.function.graphql"
606
+ }
607
+ },
608
+ "match": "\\s*([_A-Za-z][_0-9A-Za-z]*)"
609
+ },
610
+ "graphql-null-value": {
611
+ "captures": {
612
+ "1": {
613
+ "name": "constant.language.null.graphql"
614
+ }
615
+ },
616
+ "match": "\\s*\\b(null)\\b"
617
+ },
618
+ "graphql-object-field": {
619
+ "captures": {
620
+ "1": {
621
+ "name": "constant.object.key.graphql"
622
+ },
623
+ "2": {
624
+ "name": "string.unquoted.graphql"
625
+ },
626
+ "3": {
627
+ "name": "punctuation.graphql"
628
+ }
629
+ },
630
+ "match": "\\s*(([_A-Za-z][_0-9A-Za-z]*))\\s*(:)"
631
+ },
632
+ "graphql-object-value": {
633
+ "patterns": [
634
+ {
635
+ "begin": "\\s*+({)",
636
+ "beginCaptures": {
637
+ "1": {
638
+ "name": "meta.brace.curly.graphql"
639
+ }
640
+ },
641
+ "end": "\\s*(})",
642
+ "endCaptures": {
643
+ "1": {
644
+ "name": "meta.brace.curly.graphql"
645
+ }
646
+ },
647
+ "name": "meta.objectvalues.graphql",
648
+ "patterns": [
649
+ {
650
+ "include": "#graphql-object-field"
651
+ },
652
+ {
653
+ "include": "#graphql-value"
654
+ }
655
+ ]
656
+ }
657
+ ]
658
+ },
659
+ "graphql-operation-def": {
660
+ "patterns": [
661
+ {
662
+ "include": "#graphql-query-mutation"
663
+ },
664
+ {
665
+ "include": "#graphql-name"
666
+ },
667
+ {
668
+ "include": "#graphql-variable-definitions"
669
+ },
670
+ {
671
+ "include": "#graphql-directive"
672
+ },
673
+ {
674
+ "include": "#graphql-selection-set"
675
+ }
676
+ ]
677
+ },
678
+ "graphql-query-mutation": {
679
+ "captures": {
680
+ "1": {
681
+ "name": "keyword.operation.graphql"
682
+ }
683
+ },
684
+ "match": "\\s*\\b(query|mutation)\\b"
685
+ },
686
+ "graphql-scalar": {
687
+ "captures": {
688
+ "1": {
689
+ "name": "keyword.scalar.graphql"
690
+ },
691
+ "2": {
692
+ "name": "entity.scalar.graphql"
693
+ }
694
+ },
695
+ "match": "\\s*\\b(scalar)\\b\\s*([_A-Za-z][_0-9A-Za-z]*)"
696
+ },
697
+ "graphql-scalar-type": {
698
+ "captures": {
699
+ "1": {
700
+ "name": "support.type.builtin.graphql"
701
+ },
702
+ "2": {
703
+ "name": "keyword.operator.nulltype.graphql"
704
+ }
705
+ },
706
+ "match": "\\s*\\b(Int|Float|String|Boolean|ID)\\b(?:\\s*(!))?"
707
+ },
708
+ "graphql-schema": {
709
+ "begin": "\\s*\\b(schema)\\b",
710
+ "beginCaptures": {
711
+ "1": {
712
+ "name": "keyword.schema.graphql"
713
+ }
714
+ },
715
+ "end": "(?<=})",
716
+ "patterns": [
717
+ {
718
+ "begin": "\\s*({)",
719
+ "beginCaptures": {
720
+ "1": {
721
+ "name": "punctuation.operation.graphql"
722
+ }
723
+ },
724
+ "end": "\\s*(})",
725
+ "endCaptures": {
726
+ "1": {
727
+ "name": "punctuation.operation.graphql"
728
+ }
729
+ },
730
+ "patterns": [
731
+ {
732
+ "begin": "\\s*([_A-Za-z][_0-9A-Za-z]*)(?=\\s*\\(|:)",
733
+ "beginCaptures": {
734
+ "1": {
735
+ "name": "variable.arguments.graphql"
736
+ }
737
+ },
738
+ "end": "(?=\\s*(([_A-Za-z][_0-9A-Za-z]*)\\s*(\\(|:)|(})))|\\s*(,)",
739
+ "endCaptures": {
740
+ "5": {
741
+ "name": "punctuation.comma.graphql"
742
+ }
743
+ },
744
+ "patterns": [
745
+ {
746
+ "captures": {
747
+ "1": {
748
+ "name": "support.type.graphql"
749
+ }
750
+ },
751
+ "match": "\\s*([_A-Za-z][_0-9A-Za-z]*)"
752
+ },
753
+ {
754
+ "include": "#graphql-comment"
755
+ },
756
+ {
757
+ "include": "#graphql-description-docstring"
758
+ },
759
+ {
760
+ "include": "#graphql-description-singleline"
761
+ },
762
+ {
763
+ "include": "#graphql-colon"
764
+ },
765
+ {
766
+ "include": "#graphql-skip-newlines"
767
+ }
768
+ ]
769
+ },
770
+ {
771
+ "include": "#graphql-comment"
772
+ },
773
+ {
774
+ "include": "#graphql-description-docstring"
775
+ },
776
+ {
777
+ "include": "#graphql-description-singleline"
778
+ },
779
+ {
780
+ "include": "#graphql-skip-newlines"
781
+ }
782
+ ]
783
+ },
784
+ {
785
+ "include": "#graphql-comment"
786
+ },
787
+ {
788
+ "include": "#graphql-description-docstring"
789
+ },
790
+ {
791
+ "include": "#graphql-description-singleline"
792
+ },
793
+ {
794
+ "include": "#graphql-directive"
795
+ },
796
+ {
797
+ "include": "#graphql-skip-newlines"
798
+ }
799
+ ]
800
+ },
801
+ "graphql-selection-set": {
802
+ "begin": "\\s*({)",
803
+ "beginCaptures": {
804
+ "1": {
805
+ "name": "punctuation.operation.graphql"
806
+ }
807
+ },
808
+ "end": "\\s*(})",
809
+ "endCaptures": {
810
+ "1": {
811
+ "name": "punctuation.operation.graphql"
812
+ }
813
+ },
814
+ "name": "meta.selectionset.graphql",
815
+ "patterns": [
816
+ {
817
+ "include": "#graphql-comment"
818
+ },
819
+ {
820
+ "include": "#graphql-description-docstring"
821
+ },
822
+ {
823
+ "include": "#graphql-description-singleline"
824
+ },
825
+ {
826
+ "include": "#graphql-field"
827
+ },
828
+ {
829
+ "include": "#graphql-fragment-spread"
830
+ },
831
+ {
832
+ "include": "#graphql-inline-fragment"
833
+ },
834
+ {
835
+ "include": "#graphql-comma"
836
+ },
837
+ {
838
+ "include": "#native-interpolation"
839
+ },
840
+ {
841
+ "include": "#literal-quasi-embedded"
842
+ }
843
+ ]
844
+ },
845
+ "graphql-skip-newlines": {
846
+ "match": "\\s*\n"
847
+ },
848
+ "graphql-string-content": {
849
+ "patterns": [
850
+ {
851
+ "match": "\\\\[/'\"\\\\nrtbf]",
852
+ "name": "constant.character.escape.graphql"
853
+ },
854
+ {
855
+ "match": "\\\\u([0-9a-fA-F]{4})",
856
+ "name": "constant.character.escape.graphql"
857
+ }
858
+ ]
859
+ },
860
+ "graphql-string-value": {
861
+ "begin": "\\s*+((\"))",
862
+ "beginCaptures": {
863
+ "1": {
864
+ "name": "string.quoted.double.graphql"
865
+ },
866
+ "2": {
867
+ "name": "punctuation.definition.string.begin.graphql"
868
+ }
869
+ },
870
+ "contentName": "string.quoted.double.graphql",
871
+ "end": "\\s*+(?:((\"))|(\n))",
872
+ "endCaptures": {
873
+ "1": {
874
+ "name": "string.quoted.double.graphql"
875
+ },
876
+ "2": {
877
+ "name": "punctuation.definition.string.end.graphql"
878
+ },
879
+ "3": {
880
+ "name": "invalid.illegal.newline.graphql"
881
+ }
882
+ },
883
+ "patterns": [
884
+ {
885
+ "include": "#graphql-string-content"
886
+ },
887
+ {
888
+ "include": "#literal-quasi-embedded"
889
+ }
890
+ ]
891
+ },
892
+ "graphql-type-definition": {
893
+ "begin": "\\s*([_A-Za-z][_0-9A-Za-z]*)(?=\\s*\\(|:)",
894
+ "beginCaptures": {
895
+ "1": {
896
+ "name": "variable.graphql"
897
+ }
898
+ },
899
+ "comment": "key (optionalArgs): Type",
900
+ "end": "(?=\\s*(([_A-Za-z][_0-9A-Za-z]*)\\s*(\\(|:)|(})))|\\s*(,)",
901
+ "endCaptures": {
902
+ "5": {
903
+ "name": "punctuation.comma.graphql"
904
+ }
905
+ },
906
+ "patterns": [
907
+ {
908
+ "include": "#graphql-comment"
909
+ },
910
+ {
911
+ "include": "#graphql-description-docstring"
912
+ },
913
+ {
914
+ "include": "#graphql-description-singleline"
915
+ },
916
+ {
917
+ "include": "#graphql-directive"
918
+ },
919
+ {
920
+ "include": "#graphql-variable-definitions"
921
+ },
922
+ {
923
+ "include": "#graphql-type-object"
924
+ },
925
+ {
926
+ "include": "#graphql-colon"
927
+ },
928
+ {
929
+ "include": "#graphql-input-types"
930
+ },
931
+ {
932
+ "include": "#literal-quasi-embedded"
933
+ }
934
+ ]
935
+ },
936
+ "graphql-type-interface": {
937
+ "applyEndPatternLast": 1,
938
+ "begin": "\\s*\\b(?:(extends?)?\\b\\s*\\b(type)|(interface)|(input))\\b\\s*([_A-Za-z][_0-9A-Za-z]*)?",
939
+ "captures": {
940
+ "1": {
941
+ "name": "keyword.type.graphql"
942
+ },
943
+ "2": {
944
+ "name": "keyword.type.graphql"
945
+ },
946
+ "3": {
947
+ "name": "keyword.interface.graphql"
948
+ },
949
+ "4": {
950
+ "name": "keyword.input.graphql"
951
+ },
952
+ "5": {
953
+ "name": "support.type.graphql"
954
+ }
955
+ },
956
+ "end": "(?=.)",
957
+ "name": "meta.type.interface.graphql",
958
+ "patterns": [
959
+ {
960
+ "begin": "\\s*\\b(implements)\\b\\s*",
961
+ "beginCaptures": {
962
+ "1": {
963
+ "name": "keyword.implements.graphql"
964
+ }
965
+ },
966
+ "end": "\\s*(?={)",
967
+ "patterns": [
968
+ {
969
+ "captures": {
970
+ "1": {
971
+ "name": "support.type.graphql"
972
+ }
973
+ },
974
+ "match": "\\s*([_A-Za-z][_0-9A-Za-z]*)"
975
+ },
976
+ {
977
+ "include": "#graphql-comment"
978
+ },
979
+ {
980
+ "include": "#graphql-description-docstring"
981
+ },
982
+ {
983
+ "include": "#graphql-description-singleline"
984
+ },
985
+ {
986
+ "include": "#graphql-directive"
987
+ },
988
+ {
989
+ "include": "#graphql-ampersand"
990
+ },
991
+ {
992
+ "include": "#graphql-comma"
993
+ }
994
+ ]
995
+ },
996
+ {
997
+ "include": "#graphql-comment"
998
+ },
999
+ {
1000
+ "include": "#graphql-description-docstring"
1001
+ },
1002
+ {
1003
+ "include": "#graphql-description-singleline"
1004
+ },
1005
+ {
1006
+ "include": "#graphql-directive"
1007
+ },
1008
+ {
1009
+ "include": "#graphql-type-object"
1010
+ },
1011
+ {
1012
+ "include": "#literal-quasi-embedded"
1013
+ },
1014
+ {
1015
+ "include": "#graphql-ignore-spaces"
1016
+ }
1017
+ ]
1018
+ },
1019
+ "graphql-type-object": {
1020
+ "begin": "\\s*({)",
1021
+ "beginCaptures": {
1022
+ "1": {
1023
+ "name": "punctuation.operation.graphql"
1024
+ }
1025
+ },
1026
+ "end": "\\s*(})",
1027
+ "endCaptures": {
1028
+ "1": {
1029
+ "name": "punctuation.operation.graphql"
1030
+ }
1031
+ },
1032
+ "name": "meta.type.object.graphql",
1033
+ "patterns": [
1034
+ {
1035
+ "include": "#graphql-comment"
1036
+ },
1037
+ {
1038
+ "include": "#graphql-description-docstring"
1039
+ },
1040
+ {
1041
+ "include": "#graphql-description-singleline"
1042
+ },
1043
+ {
1044
+ "include": "#graphql-object-type"
1045
+ },
1046
+ {
1047
+ "include": "#graphql-type-definition"
1048
+ },
1049
+ {
1050
+ "include": "#literal-quasi-embedded"
1051
+ }
1052
+ ]
1053
+ },
1054
+ "graphql-union": {
1055
+ "applyEndPatternLast": 1,
1056
+ "begin": "\\s*\\b(union)\\b\\s*([_A-Za-z][_0-9A-Za-z]*)",
1057
+ "captures": {
1058
+ "1": {
1059
+ "name": "keyword.union.graphql"
1060
+ },
1061
+ "2": {
1062
+ "name": "support.type.graphql"
1063
+ }
1064
+ },
1065
+ "end": "(?=.)",
1066
+ "patterns": [
1067
+ {
1068
+ "applyEndPatternLast": 1,
1069
+ "begin": "\\s*(=)\\s*([_A-Za-z][_0-9A-Za-z]*)",
1070
+ "captures": {
1071
+ "1": {
1072
+ "name": "punctuation.assignment.graphql"
1073
+ },
1074
+ "2": {
1075
+ "name": "support.type.graphql"
1076
+ }
1077
+ },
1078
+ "end": "(?=.)",
1079
+ "patterns": [
1080
+ {
1081
+ "include": "#graphql-comment"
1082
+ },
1083
+ {
1084
+ "include": "#graphql-description-docstring"
1085
+ },
1086
+ {
1087
+ "include": "#graphql-description-singleline"
1088
+ },
1089
+ {
1090
+ "include": "#graphql-skip-newlines"
1091
+ },
1092
+ {
1093
+ "include": "#literal-quasi-embedded"
1094
+ },
1095
+ {
1096
+ "captures": {
1097
+ "1": {
1098
+ "name": "punctuation.or.graphql"
1099
+ },
1100
+ "2": {
1101
+ "name": "support.type.graphql"
1102
+ }
1103
+ },
1104
+ "match": "\\s*(\\|)\\s*([_A-Za-z][_0-9A-Za-z]*)"
1105
+ }
1106
+ ]
1107
+ },
1108
+ {
1109
+ "include": "#graphql-comment"
1110
+ },
1111
+ {
1112
+ "include": "#graphql-description-docstring"
1113
+ },
1114
+ {
1115
+ "include": "#graphql-description-singleline"
1116
+ },
1117
+ {
1118
+ "include": "#graphql-skip-newlines"
1119
+ },
1120
+ {
1121
+ "include": "#literal-quasi-embedded"
1122
+ }
1123
+ ]
1124
+ },
1125
+ "graphql-union-mark": {
1126
+ "captures": {
1127
+ "1": {
1128
+ "name": "punctuation.union.graphql"
1129
+ }
1130
+ },
1131
+ "match": "\\s*(\\|)"
1132
+ },
1133
+ "graphql-value": {
1134
+ "patterns": [
1135
+ {
1136
+ "include": "#graphql-comment"
1137
+ },
1138
+ {
1139
+ "include": "#graphql-description-docstring"
1140
+ },
1141
+ {
1142
+ "include": "#graphql-variable-name"
1143
+ },
1144
+ {
1145
+ "include": "#graphql-float-value"
1146
+ },
1147
+ {
1148
+ "include": "#graphql-string-value"
1149
+ },
1150
+ {
1151
+ "include": "#graphql-boolean-value"
1152
+ },
1153
+ {
1154
+ "include": "#graphql-null-value"
1155
+ },
1156
+ {
1157
+ "include": "#graphql-enum-value"
1158
+ },
1159
+ {
1160
+ "include": "#graphql-list-value"
1161
+ },
1162
+ {
1163
+ "include": "#graphql-object-value"
1164
+ },
1165
+ {
1166
+ "include": "#literal-quasi-embedded"
1167
+ }
1168
+ ]
1169
+ },
1170
+ "graphql-variable-assignment": {
1171
+ "applyEndPatternLast": 1,
1172
+ "begin": "\\s(=)",
1173
+ "beginCaptures": {
1174
+ "1": {
1175
+ "name": "punctuation.assignment.graphql"
1176
+ }
1177
+ },
1178
+ "end": "(?=[\n,)])",
1179
+ "patterns": [
1180
+ {
1181
+ "include": "#graphql-value"
1182
+ }
1183
+ ]
1184
+ },
1185
+ "graphql-variable-definition": {
1186
+ "begin": "\\s*(\\$?[_A-Za-z][_0-9A-Za-z]*)(?=\\s*\\(|:)",
1187
+ "beginCaptures": {
1188
+ "1": {
1189
+ "name": "variable.parameter.graphql"
1190
+ }
1191
+ },
1192
+ "comment": "variable: type = value,.... which may be a list",
1193
+ "end": "(?=\\s*((\\$?[_A-Za-z][_0-9A-Za-z]*)\\s*(\\(|:)|(}|\\))))|\\s*(,)",
1194
+ "endCaptures": {
1195
+ "5": {
1196
+ "name": "punctuation.comma.graphql"
1197
+ }
1198
+ },
1199
+ "name": "meta.variables.graphql",
1200
+ "patterns": [
1201
+ {
1202
+ "include": "#graphql-comment"
1203
+ },
1204
+ {
1205
+ "include": "#graphql-description-docstring"
1206
+ },
1207
+ {
1208
+ "include": "#graphql-description-singleline"
1209
+ },
1210
+ {
1211
+ "include": "#graphql-directive"
1212
+ },
1213
+ {
1214
+ "include": "#graphql-colon"
1215
+ },
1216
+ {
1217
+ "include": "#graphql-input-types"
1218
+ },
1219
+ {
1220
+ "include": "#graphql-variable-assignment"
1221
+ },
1222
+ {
1223
+ "include": "#literal-quasi-embedded"
1224
+ },
1225
+ {
1226
+ "include": "#graphql-skip-newlines"
1227
+ }
1228
+ ]
1229
+ },
1230
+ "graphql-variable-definitions": {
1231
+ "begin": "\\s*(\\()",
1232
+ "captures": {
1233
+ "1": {
1234
+ "name": "meta.brace.round.graphql"
1235
+ }
1236
+ },
1237
+ "end": "\\s*(\\))",
1238
+ "patterns": [
1239
+ {
1240
+ "include": "#graphql-comment"
1241
+ },
1242
+ {
1243
+ "include": "#graphql-description-docstring"
1244
+ },
1245
+ {
1246
+ "include": "#graphql-description-singleline"
1247
+ },
1248
+ {
1249
+ "include": "#graphql-variable-definition"
1250
+ },
1251
+ {
1252
+ "include": "#literal-quasi-embedded"
1253
+ }
1254
+ ]
1255
+ },
1256
+ "graphql-variable-name": {
1257
+ "captures": {
1258
+ "1": {
1259
+ "name": "variable.graphql"
1260
+ }
1261
+ },
1262
+ "match": "\\s*(\\$[_A-Za-z][_0-9A-Za-z]*)"
1263
+ },
1264
+ "native-interpolation": {
1265
+ "begin": "\\s*(\\${)",
1266
+ "beginCaptures": {
1267
+ "1": {
1268
+ "name": "keyword.other.substitution.begin"
1269
+ }
1270
+ },
1271
+ "end": "(})",
1272
+ "endCaptures": {
1273
+ "1": {
1274
+ "name": "keyword.other.substitution.end"
1275
+ }
1276
+ },
1277
+ "name": "native.interpolation",
1278
+ "patterns": [
1279
+ {
1280
+ "include": "source.js"
1281
+ },
1282
+ {
1283
+ "include": "source.ts"
1284
+ },
1285
+ {
1286
+ "include": "source.js.jsx"
1287
+ },
1288
+ {
1289
+ "include": "source.tsx"
1290
+ }
1291
+ ]
1292
+ }
1293
+ },
1294
+ "scopeName": "source.graphql"
1295
+ }