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,21 @@
1
+ {
2
+ "injectionSelector": "L:comment.block.documentation",
3
+ "name": "jsdoc",
4
+ "patterns": [
5
+ {
6
+ "include": "#jsdocbody"
7
+ }
8
+ ],
9
+ "repository": {
10
+ "jsdocbody": {
11
+ "begin": "(?<=/\\*\\*)([^*]|\\*(?!/))*$",
12
+ "patterns": [
13
+ {
14
+ "include": "source.ts#docblock"
15
+ }
16
+ ],
17
+ "while": "(^|\\G)\\s*\\*(?!/)(?=([^*]|[*](?!/))*$)"
18
+ }
19
+ },
20
+ "scopeName": "documentation.injection.ts"
21
+ }
@@ -0,0 +1,208 @@
1
+ {
2
+ "displayName": "JSON (Javascript Next)",
3
+ "name": "json",
4
+ "patterns": [
5
+ {
6
+ "include": "#value"
7
+ }
8
+ ],
9
+ "repository": {
10
+ "array": {
11
+ "begin": "\\[",
12
+ "beginCaptures": {
13
+ "0": {
14
+ "name": "punctuation.definition.array.begin.json"
15
+ }
16
+ },
17
+ "end": "\\]",
18
+ "endCaptures": {
19
+ "0": {
20
+ "name": "punctuation.definition.array.end.json"
21
+ }
22
+ },
23
+ "name": "meta.structure.array.json",
24
+ "patterns": [
25
+ {
26
+ "include": "#value"
27
+ },
28
+ {
29
+ "match": ",",
30
+ "name": "punctuation.separator.array.json"
31
+ },
32
+ {
33
+ "match": "[^\\s\\]]",
34
+ "name": "invalid.illegal.expected-array-separator.json"
35
+ }
36
+ ]
37
+ },
38
+ "comments": {
39
+ "patterns": [
40
+ {
41
+ "begin": "/\\*\\*(?!/)",
42
+ "captures": {
43
+ "0": {
44
+ "name": "punctuation.definition.comment.json"
45
+ }
46
+ },
47
+ "end": "\\*/",
48
+ "name": "comment.block.documentation.json"
49
+ },
50
+ {
51
+ "begin": "/\\*",
52
+ "captures": {
53
+ "0": {
54
+ "name": "punctuation.definition.comment.json"
55
+ }
56
+ },
57
+ "end": "\\*/",
58
+ "name": "comment.block.json"
59
+ },
60
+ {
61
+ "captures": {
62
+ "1": {
63
+ "name": "punctuation.definition.comment.json"
64
+ }
65
+ },
66
+ "match": "(//).*$\\n?",
67
+ "name": "comment.line.double-slash.js"
68
+ }
69
+ ]
70
+ },
71
+ "constant": {
72
+ "match": "\\b(?:true|false|null)\\b",
73
+ "name": "constant.language.json"
74
+ },
75
+ "number": {
76
+ "match": "(?x) # turn on extended mode\n -? # an optional minus\n (?:\n 0 # a zero\n | # ...or...\n [1-9] # a 1-9 character\n \\d* # followed by zero or more digits\n )\n (?:\n (?:\n \\. # a period\n \\d+ # followed by one or more digits\n )?\n (?:\n [eE] # an e character\n [+-]? # followed by an option +/-\n \\d+ # followed by one or more digits\n )? # make exponent optional\n )? # make decimal portion optional",
77
+ "name": "constant.numeric.json"
78
+ },
79
+ "object": {
80
+ "begin": "\\{",
81
+ "beginCaptures": {
82
+ "0": {
83
+ "name": "punctuation.definition.dictionary.begin.json"
84
+ }
85
+ },
86
+ "end": "\\}",
87
+ "endCaptures": {
88
+ "0": {
89
+ "name": "punctuation.definition.dictionary.end.json"
90
+ }
91
+ },
92
+ "name": "meta.structure.dictionary.json",
93
+ "patterns": [
94
+ {
95
+ "comment": "the JSON object key",
96
+ "include": "#objectkey"
97
+ },
98
+ {
99
+ "include": "#comments"
100
+ },
101
+ {
102
+ "begin": ":",
103
+ "beginCaptures": {
104
+ "0": {
105
+ "name": "punctuation.separator.dictionary.key-value.json"
106
+ }
107
+ },
108
+ "end": "(,)|(?=\\})",
109
+ "endCaptures": {
110
+ "1": {
111
+ "name": "punctuation.separator.dictionary.pair.json"
112
+ }
113
+ },
114
+ "name": "meta.structure.dictionary.value.json",
115
+ "patterns": [
116
+ {
117
+ "comment": "the JSON object value",
118
+ "include": "#value"
119
+ },
120
+ {
121
+ "match": "[^\\s,]",
122
+ "name": "invalid.illegal.expected-dictionary-separator.json"
123
+ }
124
+ ]
125
+ },
126
+ {
127
+ "match": "[^\\s\\}]",
128
+ "name": "invalid.illegal.expected-dictionary-separator.json"
129
+ }
130
+ ]
131
+ },
132
+ "objectkey": {
133
+ "begin": "\"",
134
+ "beginCaptures": {
135
+ "0": {
136
+ "name": "punctuation.support.type.property-name.begin.json"
137
+ }
138
+ },
139
+ "end": "\"",
140
+ "endCaptures": {
141
+ "0": {
142
+ "name": "punctuation.support.type.property-name.end.json"
143
+ }
144
+ },
145
+ "name": "string.json support.type.property-name.json",
146
+ "patterns": [
147
+ {
148
+ "include": "#stringcontent"
149
+ }
150
+ ]
151
+ },
152
+ "string": {
153
+ "begin": "\"",
154
+ "beginCaptures": {
155
+ "0": {
156
+ "name": "punctuation.definition.string.begin.json"
157
+ }
158
+ },
159
+ "end": "\"",
160
+ "endCaptures": {
161
+ "0": {
162
+ "name": "punctuation.definition.string.end.json"
163
+ }
164
+ },
165
+ "name": "string.quoted.double.json",
166
+ "patterns": [
167
+ {
168
+ "include": "#stringcontent"
169
+ }
170
+ ]
171
+ },
172
+ "stringcontent": {
173
+ "patterns": [
174
+ {
175
+ "match": "(?x) # turn on extended mode\n \\\\ # a literal backslash\n (?: # ...followed by...\n [\"\\\\/bfnrt] # one of these characters\n | # ...or...\n u # a u\n [0-9a-fA-F]{4}) # and four hex digits",
176
+ "name": "constant.character.escape.json"
177
+ },
178
+ {
179
+ "match": "\\\\.",
180
+ "name": "invalid.illegal.unrecognized-string-escape.json"
181
+ }
182
+ ]
183
+ },
184
+ "value": {
185
+ "patterns": [
186
+ {
187
+ "include": "#constant"
188
+ },
189
+ {
190
+ "include": "#number"
191
+ },
192
+ {
193
+ "include": "#string"
194
+ },
195
+ {
196
+ "include": "#array"
197
+ },
198
+ {
199
+ "include": "#object"
200
+ },
201
+ {
202
+ "include": "#comments"
203
+ }
204
+ ]
205
+ }
206
+ },
207
+ "scopeName": "source.json"
208
+ }
@@ -0,0 +1,244 @@
1
+ {
2
+ "displayName": "JSON5",
3
+ "fileTypes": [
4
+ "json5"
5
+ ],
6
+ "name": "json5",
7
+ "patterns": [
8
+ {
9
+ "include": "#comments"
10
+ },
11
+ {
12
+ "include": "#value"
13
+ }
14
+ ],
15
+ "repository": {
16
+ "array": {
17
+ "begin": "\\[",
18
+ "beginCaptures": {
19
+ "0": {
20
+ "name": "punctuation.definition.array.begin.json5"
21
+ }
22
+ },
23
+ "end": "\\]",
24
+ "endCaptures": {
25
+ "0": {
26
+ "name": "punctuation.definition.array.end.json5"
27
+ }
28
+ },
29
+ "name": "meta.structure.array.json5",
30
+ "patterns": [
31
+ {
32
+ "include": "#comments"
33
+ },
34
+ {
35
+ "include": "#value"
36
+ },
37
+ {
38
+ "match": ",",
39
+ "name": "punctuation.separator.array.json5"
40
+ },
41
+ {
42
+ "match": "[^\\s\\]]",
43
+ "name": "invalid.illegal.expected-array-separator.json5"
44
+ }
45
+ ]
46
+ },
47
+ "comments": {
48
+ "patterns": [
49
+ {
50
+ "match": "/{2}.*",
51
+ "name": "comment.single.json5"
52
+ },
53
+ {
54
+ "begin": "/\\*\\*(?!/)",
55
+ "captures": {
56
+ "0": {
57
+ "name": "punctuation.definition.comment.json5"
58
+ }
59
+ },
60
+ "end": "\\*/",
61
+ "name": "comment.block.documentation.json5"
62
+ },
63
+ {
64
+ "begin": "/\\*",
65
+ "captures": {
66
+ "0": {
67
+ "name": "punctuation.definition.comment.json5"
68
+ }
69
+ },
70
+ "end": "\\*/",
71
+ "name": "comment.block.json5"
72
+ }
73
+ ]
74
+ },
75
+ "constant": {
76
+ "match": "\\b(?:true|false|null|Infinity|NaN)\\b",
77
+ "name": "constant.language.json5"
78
+ },
79
+ "infinity": {
80
+ "match": "(-)*\\b(?:Infinity|NaN)\\b",
81
+ "name": "constant.language.json5"
82
+ },
83
+ "key": {
84
+ "name": "string.key.json5",
85
+ "patterns": [
86
+ {
87
+ "include": "#stringSingle"
88
+ },
89
+ {
90
+ "include": "#stringDouble"
91
+ },
92
+ {
93
+ "match": "[a-zA-Z0-9_-]",
94
+ "name": "string.key.json5"
95
+ }
96
+ ]
97
+ },
98
+ "number": {
99
+ "patterns": [
100
+ {
101
+ "comment": "handles hexadecimal numbers",
102
+ "match": "(0x)[0-9a-fA-f]*",
103
+ "name": "constant.hex.numeric.json5"
104
+ },
105
+ {
106
+ "comment": "handles integer and decimal numbers",
107
+ "match": "[+-.]?(?=[1-9]|0(?!\\d))\\d+(\\.\\d+)?([eE][+-]?\\d+)?",
108
+ "name": "constant.dec.numeric.json5"
109
+ }
110
+ ]
111
+ },
112
+ "object": {
113
+ "begin": "\\{",
114
+ "beginCaptures": {
115
+ "0": {
116
+ "name": "punctuation.definition.dictionary.begin.json5"
117
+ }
118
+ },
119
+ "comment": "a json5 object",
120
+ "end": "\\}",
121
+ "endCaptures": {
122
+ "0": {
123
+ "name": "punctuation.definition.dictionary.end.json5"
124
+ }
125
+ },
126
+ "name": "meta.structure.dictionary.json5",
127
+ "patterns": [
128
+ {
129
+ "include": "#comments"
130
+ },
131
+ {
132
+ "comment": "the json5 object key",
133
+ "include": "#key"
134
+ },
135
+ {
136
+ "begin": ":",
137
+ "beginCaptures": {
138
+ "0": {
139
+ "name": "punctuation.separator.dictionary.key-value.json5"
140
+ }
141
+ },
142
+ "end": "(,)|(?=\\})",
143
+ "endCaptures": {
144
+ "1": {
145
+ "name": "punctuation.separator.dictionary.pair.json5"
146
+ }
147
+ },
148
+ "name": "meta.structure.dictionary.value.json5",
149
+ "patterns": [
150
+ {
151
+ "comment": "the json5 object value",
152
+ "include": "#value"
153
+ },
154
+ {
155
+ "match": "[^\\s,]",
156
+ "name": "invalid.illegal.expected-dictionary-separator.json5"
157
+ }
158
+ ]
159
+ },
160
+ {
161
+ "match": "[^\\s\\}]",
162
+ "name": "invalid.illegal.expected-dictionary-separator.json5"
163
+ }
164
+ ]
165
+ },
166
+ "stringDouble": {
167
+ "begin": "[\"]",
168
+ "beginCaptures": {
169
+ "0": {
170
+ "name": "punctuation.definition.string.begin.json5"
171
+ }
172
+ },
173
+ "end": "[\"]",
174
+ "endCaptures": {
175
+ "0": {
176
+ "name": "punctuation.definition.string.end.json5"
177
+ }
178
+ },
179
+ "name": "string.quoted.json5",
180
+ "patterns": [
181
+ {
182
+ "match": "(?x: # turn on extended mode\n \\\\ # a literal backslash\n (?: # ...followed by...\n [\"\\\\/bfnrt] # one of these characters\n | # ...or...\n u # a u\n [0-9a-fA-F]{4} # and four hex digits\n )\n )",
183
+ "name": "constant.character.escape.json5"
184
+ },
185
+ {
186
+ "match": "\\\\.",
187
+ "name": "invalid.illegal.unrecognized-string-escape.json5"
188
+ }
189
+ ]
190
+ },
191
+ "stringSingle": {
192
+ "begin": "[']",
193
+ "beginCaptures": {
194
+ "0": {
195
+ "name": "punctuation.definition.string.begin.json5"
196
+ }
197
+ },
198
+ "end": "[']",
199
+ "endCaptures": {
200
+ "0": {
201
+ "name": "punctuation.definition.string.end.json5"
202
+ }
203
+ },
204
+ "name": "string.quoted.json5",
205
+ "patterns": [
206
+ {
207
+ "match": "(?x: # turn on extended mode\n \\\\ # a literal backslash\n (?: # ...followed by...\n [\"\\\\/bfnrt] # one of these characters\n | # ...or...\n u # a u\n [0-9a-fA-F]{4} # and four hex digits\n )\n )",
208
+ "name": "constant.character.escape.json5"
209
+ },
210
+ {
211
+ "match": "\\\\.",
212
+ "name": "invalid.illegal.unrecognized-string-escape.json5"
213
+ }
214
+ ]
215
+ },
216
+ "value": {
217
+ "comment": "the 'value' diagram at http://json.org",
218
+ "patterns": [
219
+ {
220
+ "include": "#constant"
221
+ },
222
+ {
223
+ "include": "#infinity"
224
+ },
225
+ {
226
+ "include": "#number"
227
+ },
228
+ {
229
+ "include": "#stringSingle"
230
+ },
231
+ {
232
+ "include": "#stringDouble"
233
+ },
234
+ {
235
+ "include": "#array"
236
+ },
237
+ {
238
+ "include": "#object"
239
+ }
240
+ ]
241
+ }
242
+ },
243
+ "scopeName": "source.json5"
244
+ }
@@ -0,0 +1,208 @@
1
+ {
2
+ "displayName": "JSON with Comments",
3
+ "name": "jsonc",
4
+ "patterns": [
5
+ {
6
+ "include": "#value"
7
+ }
8
+ ],
9
+ "repository": {
10
+ "array": {
11
+ "begin": "\\[",
12
+ "beginCaptures": {
13
+ "0": {
14
+ "name": "punctuation.definition.array.begin.json.comments"
15
+ }
16
+ },
17
+ "end": "\\]",
18
+ "endCaptures": {
19
+ "0": {
20
+ "name": "punctuation.definition.array.end.json.comments"
21
+ }
22
+ },
23
+ "name": "meta.structure.array.json.comments",
24
+ "patterns": [
25
+ {
26
+ "include": "#value"
27
+ },
28
+ {
29
+ "match": ",",
30
+ "name": "punctuation.separator.array.json.comments"
31
+ },
32
+ {
33
+ "match": "[^\\s\\]]",
34
+ "name": "invalid.illegal.expected-array-separator.json.comments"
35
+ }
36
+ ]
37
+ },
38
+ "comments": {
39
+ "patterns": [
40
+ {
41
+ "begin": "/\\*\\*(?!/)",
42
+ "captures": {
43
+ "0": {
44
+ "name": "punctuation.definition.comment.json.comments"
45
+ }
46
+ },
47
+ "end": "\\*/",
48
+ "name": "comment.block.documentation.json.comments"
49
+ },
50
+ {
51
+ "begin": "/\\*",
52
+ "captures": {
53
+ "0": {
54
+ "name": "punctuation.definition.comment.json.comments"
55
+ }
56
+ },
57
+ "end": "\\*/",
58
+ "name": "comment.block.json.comments"
59
+ },
60
+ {
61
+ "captures": {
62
+ "1": {
63
+ "name": "punctuation.definition.comment.json.comments"
64
+ }
65
+ },
66
+ "match": "(//).*$\\n?",
67
+ "name": "comment.line.double-slash.js"
68
+ }
69
+ ]
70
+ },
71
+ "constant": {
72
+ "match": "\\b(?:true|false|null)\\b",
73
+ "name": "constant.language.json.comments"
74
+ },
75
+ "number": {
76
+ "match": "(?x) # turn on extended mode\n -? # an optional minus\n (?:\n 0 # a zero\n | # ...or...\n [1-9] # a 1-9 character\n \\d* # followed by zero or more digits\n )\n (?:\n (?:\n \\. # a period\n \\d+ # followed by one or more digits\n )?\n (?:\n [eE] # an e character\n [+-]? # followed by an option +/-\n \\d+ # followed by one or more digits\n )? # make exponent optional\n )? # make decimal portion optional",
77
+ "name": "constant.numeric.json.comments"
78
+ },
79
+ "object": {
80
+ "begin": "\\{",
81
+ "beginCaptures": {
82
+ "0": {
83
+ "name": "punctuation.definition.dictionary.begin.json.comments"
84
+ }
85
+ },
86
+ "end": "\\}",
87
+ "endCaptures": {
88
+ "0": {
89
+ "name": "punctuation.definition.dictionary.end.json.comments"
90
+ }
91
+ },
92
+ "name": "meta.structure.dictionary.json.comments",
93
+ "patterns": [
94
+ {
95
+ "comment": "the JSON object key",
96
+ "include": "#objectkey"
97
+ },
98
+ {
99
+ "include": "#comments"
100
+ },
101
+ {
102
+ "begin": ":",
103
+ "beginCaptures": {
104
+ "0": {
105
+ "name": "punctuation.separator.dictionary.key-value.json.comments"
106
+ }
107
+ },
108
+ "end": "(,)|(?=\\})",
109
+ "endCaptures": {
110
+ "1": {
111
+ "name": "punctuation.separator.dictionary.pair.json.comments"
112
+ }
113
+ },
114
+ "name": "meta.structure.dictionary.value.json.comments",
115
+ "patterns": [
116
+ {
117
+ "comment": "the JSON object value",
118
+ "include": "#value"
119
+ },
120
+ {
121
+ "match": "[^\\s,]",
122
+ "name": "invalid.illegal.expected-dictionary-separator.json.comments"
123
+ }
124
+ ]
125
+ },
126
+ {
127
+ "match": "[^\\s\\}]",
128
+ "name": "invalid.illegal.expected-dictionary-separator.json.comments"
129
+ }
130
+ ]
131
+ },
132
+ "objectkey": {
133
+ "begin": "\"",
134
+ "beginCaptures": {
135
+ "0": {
136
+ "name": "punctuation.support.type.property-name.begin.json.comments"
137
+ }
138
+ },
139
+ "end": "\"",
140
+ "endCaptures": {
141
+ "0": {
142
+ "name": "punctuation.support.type.property-name.end.json.comments"
143
+ }
144
+ },
145
+ "name": "string.json.comments support.type.property-name.json.comments",
146
+ "patterns": [
147
+ {
148
+ "include": "#stringcontent"
149
+ }
150
+ ]
151
+ },
152
+ "string": {
153
+ "begin": "\"",
154
+ "beginCaptures": {
155
+ "0": {
156
+ "name": "punctuation.definition.string.begin.json.comments"
157
+ }
158
+ },
159
+ "end": "\"",
160
+ "endCaptures": {
161
+ "0": {
162
+ "name": "punctuation.definition.string.end.json.comments"
163
+ }
164
+ },
165
+ "name": "string.quoted.double.json.comments",
166
+ "patterns": [
167
+ {
168
+ "include": "#stringcontent"
169
+ }
170
+ ]
171
+ },
172
+ "stringcontent": {
173
+ "patterns": [
174
+ {
175
+ "match": "(?x) # turn on extended mode\n \\\\ # a literal backslash\n (?: # ...followed by...\n [\"\\\\/bfnrt] # one of these characters\n | # ...or...\n u # a u\n [0-9a-fA-F]{4}) # and four hex digits",
176
+ "name": "constant.character.escape.json.comments"
177
+ },
178
+ {
179
+ "match": "\\\\.",
180
+ "name": "invalid.illegal.unrecognized-string-escape.json.comments"
181
+ }
182
+ ]
183
+ },
184
+ "value": {
185
+ "patterns": [
186
+ {
187
+ "include": "#constant"
188
+ },
189
+ {
190
+ "include": "#number"
191
+ },
192
+ {
193
+ "include": "#string"
194
+ },
195
+ {
196
+ "include": "#array"
197
+ },
198
+ {
199
+ "include": "#object"
200
+ },
201
+ {
202
+ "include": "#comments"
203
+ }
204
+ ]
205
+ }
206
+ },
207
+ "scopeName": "source.json.comments"
208
+ }