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,871 @@
1
+ {
2
+ "displayName": "PureScript",
3
+ "fileTypes": [
4
+ "purs"
5
+ ],
6
+ "name": "purescript",
7
+ "patterns": [
8
+ {
9
+ "captures": {
10
+ "1": {
11
+ "name": "punctuation.definition.entity.purescript"
12
+ },
13
+ "2": {
14
+ "name": "punctuation.definition.entity.purescript"
15
+ }
16
+ },
17
+ "match": "(`)(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(`)",
18
+ "name": "keyword.operator.function.infix.purescript"
19
+ },
20
+ {
21
+ "begin": "^\\s*\\b(module)(?!')\\b",
22
+ "beginCaptures": {
23
+ "1": {
24
+ "name": "keyword.other.purescript"
25
+ }
26
+ },
27
+ "end": "(where)",
28
+ "endCaptures": {
29
+ "1": {
30
+ "name": "keyword.other.purescript"
31
+ }
32
+ },
33
+ "name": "meta.declaration.module.purescript",
34
+ "patterns": [
35
+ {
36
+ "include": "#comments"
37
+ },
38
+ {
39
+ "include": "#module_name"
40
+ },
41
+ {
42
+ "include": "#module_exports"
43
+ },
44
+ {
45
+ "match": "[a-z]+",
46
+ "name": "invalid.purescript"
47
+ }
48
+ ]
49
+ },
50
+ {
51
+ "begin": "^\\s*\\b(class)(?!')\\b",
52
+ "beginCaptures": {
53
+ "1": {
54
+ "name": "storage.type.class.purescript"
55
+ }
56
+ },
57
+ "end": "\\b(where)\\b|$",
58
+ "endCaptures": {
59
+ "1": {
60
+ "name": "keyword.other.purescript"
61
+ }
62
+ },
63
+ "name": "meta.declaration.typeclass.purescript",
64
+ "patterns": [
65
+ {
66
+ "include": "#type_signature"
67
+ }
68
+ ]
69
+ },
70
+ {
71
+ "begin": "^\\s*\\b(else\\s+)?(derive\\s+)?(newtype\\s+)?(instance)(?!')\\b",
72
+ "beginCaptures": {
73
+ "1": {
74
+ "name": "keyword.other.purescript"
75
+ },
76
+ "2": {
77
+ "name": "keyword.other.purescript"
78
+ },
79
+ "3": {
80
+ "name": "keyword.other.purescript"
81
+ },
82
+ "4": {
83
+ "name": "keyword.other.purescript"
84
+ }
85
+ },
86
+ "contentName": "meta.type-signature.purescript",
87
+ "end": "\\b(where)\\b|$",
88
+ "endCaptures": {
89
+ "1": {
90
+ "name": "keyword.other.purescript"
91
+ }
92
+ },
93
+ "name": "meta.declaration.instance.purescript",
94
+ "patterns": [
95
+ {
96
+ "include": "#type_signature"
97
+ }
98
+ ]
99
+ },
100
+ {
101
+ "begin": "^(\\s*)(foreign)\\s+(import)\\s+(data)\\s+([\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)",
102
+ "beginCaptures": {
103
+ "2": {
104
+ "name": "keyword.other.purescript"
105
+ },
106
+ "3": {
107
+ "name": "keyword.other.purescript"
108
+ },
109
+ "4": {
110
+ "name": "keyword.other.purescript"
111
+ },
112
+ "5": {
113
+ "name": "entity.name.type.purescript"
114
+ },
115
+ "6": {
116
+ "name": "keyword.other.double-colon.purescript"
117
+ }
118
+ },
119
+ "contentName": "meta.kind-signature.purescript",
120
+ "end": "^(?!\\1[ \\t]|[ \\t]*$)",
121
+ "name": "meta.foreign.data.purescript",
122
+ "patterns": [
123
+ {
124
+ "include": "#double_colon"
125
+ },
126
+ {
127
+ "include": "#kind_signature"
128
+ }
129
+ ]
130
+ },
131
+ {
132
+ "begin": "^(\\s*)(foreign)\\s+(import)\\s+([\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)",
133
+ "beginCaptures": {
134
+ "2": {
135
+ "name": "keyword.other.purescript"
136
+ },
137
+ "3": {
138
+ "name": "keyword.other.purescript"
139
+ },
140
+ "4": {
141
+ "name": "entity.name.function.purescript"
142
+ }
143
+ },
144
+ "contentName": "meta.type-signature.purescript",
145
+ "end": "^(?!\\1[ \\t]|[ \\t]*$)",
146
+ "name": "meta.foreign.purescript",
147
+ "patterns": [
148
+ {
149
+ "include": "#double_colon"
150
+ },
151
+ {
152
+ "include": "#type_signature"
153
+ }
154
+ ]
155
+ },
156
+ {
157
+ "begin": "^\\s*\\b(import)(?!')\\b",
158
+ "beginCaptures": {
159
+ "1": {
160
+ "name": "keyword.other.purescript"
161
+ }
162
+ },
163
+ "end": "($|(?=--))",
164
+ "name": "meta.import.purescript",
165
+ "patterns": [
166
+ {
167
+ "include": "#module_name"
168
+ },
169
+ {
170
+ "include": "#module_exports"
171
+ },
172
+ {
173
+ "captures": {
174
+ "1": {
175
+ "name": "keyword.other.purescript"
176
+ }
177
+ },
178
+ "match": "\\b(as|hiding)\\b"
179
+ }
180
+ ]
181
+ },
182
+ {
183
+ "begin": "^(\\s)*(data|newtype)\\s+(.+?)\\s*(?=\\=|$)",
184
+ "beginCaptures": {
185
+ "2": {
186
+ "name": "storage.type.data.purescript"
187
+ },
188
+ "3": {
189
+ "name": "meta.type-signature.purescript",
190
+ "patterns": [
191
+ {
192
+ "include": "#type_signature"
193
+ }
194
+ ]
195
+ }
196
+ },
197
+ "end": "^(?!\\1[ \\t]|[ \\t]*$)",
198
+ "name": "meta.declaration.type.data.purescript",
199
+ "patterns": [
200
+ {
201
+ "include": "#comments"
202
+ },
203
+ {
204
+ "captures": {
205
+ "0": {
206
+ "name": "keyword.operator.assignment.purescript"
207
+ }
208
+ },
209
+ "match": "="
210
+ },
211
+ {
212
+ "captures": {
213
+ "1": {
214
+ "patterns": [
215
+ {
216
+ "include": "#data_ctor"
217
+ }
218
+ ]
219
+ },
220
+ "2": {
221
+ "name": "meta.type-signature.purescript",
222
+ "patterns": [
223
+ {
224
+ "include": "#type_signature"
225
+ }
226
+ ]
227
+ }
228
+ },
229
+ "match": "(?:(?:\\b([\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*)\\s+)(?:(?<ctorArgs>(?:(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*|(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*|(?:(?:[\\w()'→⇒\\[\\],]|->|=>)+\\s*)+))(?:\\s*(?:\\s+)\\s*\\g<ctorArgs>)?)?))"
230
+ },
231
+ {
232
+ "captures": {
233
+ "0": {
234
+ "name": "punctuation.separator.pipe.purescript"
235
+ }
236
+ },
237
+ "match": "\\|"
238
+ },
239
+ {
240
+ "include": "#record_types"
241
+ }
242
+ ]
243
+ },
244
+ {
245
+ "begin": "^(\\s)*(type)\\s+(.+?)\\s*(?=\\=|$)",
246
+ "beginCaptures": {
247
+ "2": {
248
+ "name": "storage.type.data.purescript"
249
+ },
250
+ "3": {
251
+ "name": "meta.type-signature.purescript",
252
+ "patterns": [
253
+ {
254
+ "include": "#type_signature"
255
+ }
256
+ ]
257
+ }
258
+ },
259
+ "contentName": "meta.type-signature.purescript",
260
+ "end": "^(?!\\1[ \\t]|[ \\t]*$)",
261
+ "name": "meta.declaration.type.type.purescript",
262
+ "patterns": [
263
+ {
264
+ "captures": {
265
+ "0": {
266
+ "name": "keyword.operator.assignment.purescript"
267
+ }
268
+ },
269
+ "match": "="
270
+ },
271
+ {
272
+ "include": "#type_signature"
273
+ },
274
+ {
275
+ "include": "#record_types"
276
+ },
277
+ {
278
+ "include": "#comments"
279
+ }
280
+ ]
281
+ },
282
+ {
283
+ "match": "^\\s*\\b(derive|where|data|type|newtype|infix[lr]?|foreign(\\s+import)?(\\s+data)?)(?!')\\b",
284
+ "name": "keyword.other.purescript"
285
+ },
286
+ {
287
+ "match": "\\?(?:[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*|[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)",
288
+ "name": "entity.name.function.typed-hole.purescript"
289
+ },
290
+ {
291
+ "match": "^\\s*\\b(data|type|newtype)(?!')\\b",
292
+ "name": "storage.type.purescript"
293
+ },
294
+ {
295
+ "match": "\\b(do|ado|if|then|else|case|of|let|in)(?!('|\\s*(:|=)))\\b",
296
+ "name": "keyword.control.purescript"
297
+ },
298
+ {
299
+ "match": "\\b(?<!\\$)0(x|X)[0-9a-fA-F]+\\b(?!\\$)",
300
+ "name": "constant.numeric.hex.purescript"
301
+ },
302
+ {
303
+ "captures": {
304
+ "0": {
305
+ "name": "constant.numeric.decimal.purescript"
306
+ },
307
+ "1": {
308
+ "name": "meta.delimiter.decimal.period.purescript"
309
+ },
310
+ "2": {
311
+ "name": "meta.delimiter.decimal.period.purescript"
312
+ },
313
+ "3": {
314
+ "name": "meta.delimiter.decimal.period.purescript"
315
+ },
316
+ "4": {
317
+ "name": "meta.delimiter.decimal.period.purescript"
318
+ },
319
+ "5": {
320
+ "name": "meta.delimiter.decimal.period.purescript"
321
+ },
322
+ "6": {
323
+ "name": "meta.delimiter.decimal.period.purescript"
324
+ }
325
+ },
326
+ "match": "(?x)\n(?<!\\$)(?:\n (?:\\b[0-9]+(\\.)[0-9]+[eE][+-]?[0-9]+\\b)| # 1.1E+3\n (?:\\b[0-9]+[eE][+-]?[0-9]+\\b)| # 1E+3\n (?:\\b[0-9]+(\\.)[0-9]+\\b)| # 1.1\n (?:\\b[0-9]+\\b(?!\\.)) # 1\n)(?!\\$)",
327
+ "name": "constant.numeric.decimal.purescript"
328
+ },
329
+ {
330
+ "match": "\\b(true|false)\\b",
331
+ "name": "constant.language.boolean.purescript"
332
+ },
333
+ {
334
+ "match": "\\b(([0-9]+_?)*[0-9]+|0([xX][0-9a-fA-F]+|[oO][0-7]+))\\b",
335
+ "name": "constant.numeric.purescript"
336
+ },
337
+ {
338
+ "begin": "\"\"\"",
339
+ "beginCaptures": {
340
+ "0": {
341
+ "name": "punctuation.definition.string.begin.purescript"
342
+ }
343
+ },
344
+ "end": "\"\"\"",
345
+ "endCaptures": {
346
+ "0": {
347
+ "name": "punctuation.definition.string.end.purescript"
348
+ }
349
+ },
350
+ "name": "string.quoted.triple.purescript"
351
+ },
352
+ {
353
+ "begin": "\"",
354
+ "beginCaptures": {
355
+ "0": {
356
+ "name": "punctuation.definition.string.begin.purescript"
357
+ }
358
+ },
359
+ "end": "\"",
360
+ "endCaptures": {
361
+ "0": {
362
+ "name": "punctuation.definition.string.end.purescript"
363
+ }
364
+ },
365
+ "name": "string.quoted.double.purescript",
366
+ "patterns": [
367
+ {
368
+ "include": "#characters"
369
+ },
370
+ {
371
+ "begin": "\\\\\\s",
372
+ "beginCaptures": {
373
+ "0": {
374
+ "name": "markup.other.escape.newline.begin.purescript"
375
+ }
376
+ },
377
+ "end": "\\\\",
378
+ "endCaptures": {
379
+ "0": {
380
+ "name": "markup.other.escape.newline.end.purescript"
381
+ }
382
+ },
383
+ "patterns": [
384
+ {
385
+ "match": "\\S+",
386
+ "name": "invalid.illegal.character-not-allowed-here.purescript"
387
+ }
388
+ ]
389
+ }
390
+ ]
391
+ },
392
+ {
393
+ "match": "\\\\$",
394
+ "name": "markup.other.escape.newline.purescript"
395
+ },
396
+ {
397
+ "captures": {
398
+ "1": {
399
+ "name": "punctuation.definition.string.begin.purescript"
400
+ },
401
+ "2": {
402
+ "patterns": [
403
+ {
404
+ "include": "#characters"
405
+ }
406
+ ]
407
+ },
408
+ "7": {
409
+ "name": "punctuation.definition.string.end.purescript"
410
+ }
411
+ },
412
+ "match": "(')((?:[ -\\[\\]-~]|(\\\\(?:NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|[abfnrtv\\\\\\\"'\\&]))|(\\\\o[0-7]+)|(\\\\x[0-9A-Fa-f]+)|(\\^[A-Z@\\[\\]\\\\\\^_])))(')",
413
+ "name": "string.quoted.single.purescript"
414
+ },
415
+ {
416
+ "include": "#function_type_declaration"
417
+ },
418
+ {
419
+ "captures": {
420
+ "1": {
421
+ "patterns": [
422
+ {
423
+ "include": "$self"
424
+ }
425
+ ]
426
+ },
427
+ "2": {
428
+ "name": "keyword.other.double-colon.purescript"
429
+ },
430
+ "3": {
431
+ "name": "meta.type-signature.purescript",
432
+ "patterns": [
433
+ {
434
+ "include": "#type_signature"
435
+ }
436
+ ]
437
+ }
438
+ },
439
+ "match": "\\((?<paren>(?:[^()]|\\(\\g<paren>\\))*)(::|∷)(?<paren2>(?:[^()]|\\(\\g<paren2>\\))*)\\)"
440
+ },
441
+ {
442
+ "begin": "^(\\s*)(?:(::|∷))",
443
+ "beginCaptures": {
444
+ "2": {
445
+ "name": "keyword.other.double-colon.purescript"
446
+ }
447
+ },
448
+ "end": "^(?!\\1[ \\t]*|[ \\t]*$)",
449
+ "patterns": [
450
+ {
451
+ "include": "#type_signature"
452
+ }
453
+ ]
454
+ },
455
+ {
456
+ "include": "#data_ctor"
457
+ },
458
+ {
459
+ "include": "#comments"
460
+ },
461
+ {
462
+ "include": "#infix_op"
463
+ },
464
+ {
465
+ "match": "\\<-|-\\>",
466
+ "name": "keyword.other.arrow.purescript"
467
+ },
468
+ {
469
+ "match": "[\\p{S}\\p{P}&&[^(),;\\[\\]`{}_\"']]+",
470
+ "name": "keyword.operator.purescript"
471
+ },
472
+ {
473
+ "match": ",",
474
+ "name": "punctuation.separator.comma.purescript"
475
+ }
476
+ ],
477
+ "repository": {
478
+ "block_comment": {
479
+ "patterns": [
480
+ {
481
+ "applyEndPatternLast": 1,
482
+ "begin": "\\{-\\s*\\|",
483
+ "beginCaptures": {
484
+ "0": {
485
+ "name": "punctuation.definition.comment.documentation.purescript"
486
+ }
487
+ },
488
+ "end": "-\\}",
489
+ "endCaptures": {
490
+ "0": {
491
+ "name": "punctuation.definition.comment.documentation.purescript"
492
+ }
493
+ },
494
+ "name": "comment.block.documentation.purescript",
495
+ "patterns": [
496
+ {
497
+ "include": "#block_comment"
498
+ }
499
+ ]
500
+ },
501
+ {
502
+ "applyEndPatternLast": 1,
503
+ "begin": "\\{-",
504
+ "beginCaptures": {
505
+ "0": {
506
+ "name": "punctuation.definition.comment.purescript"
507
+ }
508
+ },
509
+ "end": "-\\}",
510
+ "name": "comment.block.purescript",
511
+ "patterns": [
512
+ {
513
+ "include": "#block_comment"
514
+ }
515
+ ]
516
+ }
517
+ ]
518
+ },
519
+ "characters": {
520
+ "patterns": [
521
+ {
522
+ "captures": {
523
+ "1": {
524
+ "name": "constant.character.escape.purescript"
525
+ },
526
+ "2": {
527
+ "name": "constant.character.escape.octal.purescript"
528
+ },
529
+ "3": {
530
+ "name": "constant.character.escape.hexadecimal.purescript"
531
+ },
532
+ "4": {
533
+ "name": "constant.character.escape.control.purescript"
534
+ }
535
+ },
536
+ "match": "(?:[ -\\[\\]-~]|(\\\\(?:NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|[abfnrtv\\\\\\\"'\\&]))|(\\\\o[0-7]+)|(\\\\x[0-9A-Fa-f]+)|(\\^[A-Z@\\[\\]\\\\\\^_]))"
537
+ }
538
+ ]
539
+ },
540
+ "class_constraint": {
541
+ "patterns": [
542
+ {
543
+ "captures": {
544
+ "1": {
545
+ "patterns": [
546
+ {
547
+ "match": "\\b[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*",
548
+ "name": "entity.name.type.purescript"
549
+ }
550
+ ]
551
+ },
552
+ "2": {
553
+ "patterns": [
554
+ {
555
+ "include": "#type_name"
556
+ },
557
+ {
558
+ "include": "#generic_type"
559
+ }
560
+ ]
561
+ }
562
+ },
563
+ "match": "(?:(?:([\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*)\\s+)(?:(?<classConstraint>(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*|(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)(?:\\s*(?:\\s+)\\s*\\g<classConstraint>)?)))",
564
+ "name": "meta.class-constraint.purescript"
565
+ }
566
+ ]
567
+ },
568
+ "comments": {
569
+ "patterns": [
570
+ {
571
+ "begin": "(^[ \\t]+)?(?=--+\\s+\\|)",
572
+ "beginCaptures": {
573
+ "1": {
574
+ "name": "punctuation.whitespace.comment.leading.purescript"
575
+ }
576
+ },
577
+ "end": "(?!\\G)",
578
+ "patterns": [
579
+ {
580
+ "begin": "(--+)\\s+(\\|)",
581
+ "beginCaptures": {
582
+ "1": {
583
+ "name": "punctuation.definition.comment.purescript"
584
+ },
585
+ "2": {
586
+ "name": "punctuation.definition.comment.documentation.purescript"
587
+ }
588
+ },
589
+ "end": "\\n",
590
+ "name": "comment.line.double-dash.documentation.purescript"
591
+ }
592
+ ]
593
+ },
594
+ {
595
+ "begin": "(^[ \\t]+)?(?=--+(?![\\p{S}\\p{P}&&[^(),;\\[\\]`{}_\"']]))",
596
+ "beginCaptures": {
597
+ "1": {
598
+ "name": "punctuation.whitespace.comment.leading.purescript"
599
+ }
600
+ },
601
+ "end": "(?!\\G)",
602
+ "patterns": [
603
+ {
604
+ "begin": "--",
605
+ "beginCaptures": {
606
+ "0": {
607
+ "name": "punctuation.definition.comment.purescript"
608
+ }
609
+ },
610
+ "end": "\\n",
611
+ "name": "comment.line.double-dash.purescript"
612
+ }
613
+ ]
614
+ },
615
+ {
616
+ "include": "#block_comment"
617
+ }
618
+ ]
619
+ },
620
+ "data_ctor": {
621
+ "patterns": [
622
+ {
623
+ "match": "\\b[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*",
624
+ "name": "entity.name.tag.purescript"
625
+ }
626
+ ]
627
+ },
628
+ "double_colon": {
629
+ "patterns": [
630
+ {
631
+ "match": "(?:::|∷)",
632
+ "name": "keyword.other.double-colon.purescript"
633
+ }
634
+ ]
635
+ },
636
+ "function_type_declaration": {
637
+ "patterns": [
638
+ {
639
+ "begin": "^(\\s*)([\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)\\s*(?:(::|∷)(?!.*<-))",
640
+ "beginCaptures": {
641
+ "2": {
642
+ "name": "entity.name.function.purescript"
643
+ },
644
+ "3": {
645
+ "name": "keyword.other.double-colon.purescript"
646
+ }
647
+ },
648
+ "contentName": "meta.type-signature.purescript",
649
+ "end": "^(?!\\1[ \\t]|[ \\t]*$)",
650
+ "name": "meta.function.type-declaration.purescript",
651
+ "patterns": [
652
+ {
653
+ "include": "#double_colon"
654
+ },
655
+ {
656
+ "include": "#type_signature"
657
+ }
658
+ ]
659
+ }
660
+ ]
661
+ },
662
+ "generic_type": {
663
+ "patterns": [
664
+ {
665
+ "match": "\\b(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*",
666
+ "name": "variable.other.generic-type.purescript"
667
+ }
668
+ ]
669
+ },
670
+ "infix_op": {
671
+ "patterns": [
672
+ {
673
+ "match": "(?:\\((?!--+\\))[\\p{S}\\p{P}&&[^(),;\\[\\]`{}_\"']]+\\))",
674
+ "name": "entity.name.function.infix.purescript"
675
+ }
676
+ ]
677
+ },
678
+ "kind_signature": {
679
+ "patterns": [
680
+ {
681
+ "match": "\\*",
682
+ "name": "keyword.other.star.purescript"
683
+ },
684
+ {
685
+ "match": "!",
686
+ "name": "keyword.other.exclaimation-point.purescript"
687
+ },
688
+ {
689
+ "match": "#",
690
+ "name": "keyword.other.pound-sign.purescript"
691
+ },
692
+ {
693
+ "match": "->|→",
694
+ "name": "keyword.other.arrow.purescript"
695
+ }
696
+ ]
697
+ },
698
+ "module_exports": {
699
+ "patterns": [
700
+ {
701
+ "begin": "\\(",
702
+ "end": "\\)",
703
+ "name": "meta.declaration.exports.purescript",
704
+ "patterns": [
705
+ {
706
+ "include": "#comments"
707
+ },
708
+ {
709
+ "match": "\\b(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*",
710
+ "name": "entity.name.function.purescript"
711
+ },
712
+ {
713
+ "include": "#type_name"
714
+ },
715
+ {
716
+ "match": ",",
717
+ "name": "punctuation.separator.comma.purescript"
718
+ },
719
+ {
720
+ "include": "#infix_op"
721
+ },
722
+ {
723
+ "match": "\\(.*?\\)",
724
+ "name": "meta.other.constructor-list.purescript"
725
+ }
726
+ ]
727
+ }
728
+ ]
729
+ },
730
+ "module_name": {
731
+ "patterns": [
732
+ {
733
+ "match": "(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)*[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.?",
734
+ "name": "support.other.module.purescript"
735
+ }
736
+ ]
737
+ },
738
+ "record_field_declaration": {
739
+ "patterns": [
740
+ {
741
+ "begin": "([\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)\\s*(::|∷)",
742
+ "beginCaptures": {
743
+ "1": {
744
+ "patterns": [
745
+ {
746
+ "match": "(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*",
747
+ "name": "entity.other.attribute-name.purescript"
748
+ }
749
+ ]
750
+ },
751
+ "2": {
752
+ "name": "keyword.other.double-colon.purescript"
753
+ }
754
+ },
755
+ "contentName": "meta.type-signature.purescript",
756
+ "end": "(?=([\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)\\s*(::|∷)|})",
757
+ "name": "meta.record-field.type-declaration.purescript",
758
+ "patterns": [
759
+ {
760
+ "include": "#type_signature"
761
+ },
762
+ {
763
+ "include": "#record_types"
764
+ }
765
+ ]
766
+ }
767
+ ]
768
+ },
769
+ "record_types": {
770
+ "patterns": [
771
+ {
772
+ "begin": "\\{",
773
+ "beginCaptures": {
774
+ "0": {
775
+ "name": "keyword.operator.type.record.begin.purescript"
776
+ }
777
+ },
778
+ "end": "\\}",
779
+ "endCaptures": {
780
+ "0": {
781
+ "name": "keyword.operator.type.record.end.purescript"
782
+ }
783
+ },
784
+ "name": "meta.type.record.purescript",
785
+ "patterns": [
786
+ {
787
+ "match": ",",
788
+ "name": "punctuation.separator.comma.purescript"
789
+ },
790
+ {
791
+ "include": "#record_field_declaration"
792
+ },
793
+ {
794
+ "include": "#comments"
795
+ }
796
+ ]
797
+ }
798
+ ]
799
+ },
800
+ "type_name": {
801
+ "patterns": [
802
+ {
803
+ "match": "\\b[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*",
804
+ "name": "entity.name.type.purescript"
805
+ }
806
+ ]
807
+ },
808
+ "type_signature": {
809
+ "patterns": [
810
+ {
811
+ "captures": {
812
+ "1": {
813
+ "patterns": [
814
+ {
815
+ "include": "#class_constraint"
816
+ }
817
+ ]
818
+ },
819
+ "4": {
820
+ "name": "keyword.other.big-arrow.purescript"
821
+ }
822
+ },
823
+ "match": "(?:(?:\\()(?:(?<classConstraints>(?:(?:(?:([\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*)\\s+)(?:(?<classConstraint>(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*|(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)(?:\\s*(?:\\s+)\\s*\\g<classConstraint>)?))))(?:\\s*(?:,)\\s*\\g<classConstraints>)?))(?:\\))(?:\\s*(=>|<=|⇐|⇒)))",
824
+ "name": "meta.class-constraints.purescript"
825
+ },
826
+ {
827
+ "captures": {
828
+ "1": {
829
+ "patterns": [
830
+ {
831
+ "include": "#class_constraint"
832
+ }
833
+ ]
834
+ },
835
+ "4": {
836
+ "name": "keyword.other.big-arrow.purescript"
837
+ }
838
+ },
839
+ "match": "((?:(?:([\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*)\\s+)(?:(?<classConstraint>(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*|(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)(?:\\s*(?:\\s+)\\s*\\g<classConstraint>)?))))\\s*(=>|<=|⇐|⇒)",
840
+ "name": "meta.class-constraints.purescript"
841
+ },
842
+ {
843
+ "match": "->|→",
844
+ "name": "keyword.other.arrow.purescript"
845
+ },
846
+ {
847
+ "match": "=>|⇒",
848
+ "name": "keyword.other.big-arrow.purescript"
849
+ },
850
+ {
851
+ "match": "<=|⇐",
852
+ "name": "keyword.other.big-arrow-left.purescript"
853
+ },
854
+ {
855
+ "match": "forall|∀",
856
+ "name": "keyword.other.forall.purescript"
857
+ },
858
+ {
859
+ "include": "#generic_type"
860
+ },
861
+ {
862
+ "include": "#type_name"
863
+ },
864
+ {
865
+ "include": "#comments"
866
+ }
867
+ ]
868
+ }
869
+ },
870
+ "scopeName": "source.purescript"
871
+ }