monacozen 0.5.1 → 0.6.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 (163) hide show
  1. package/README.md +4 -0
  2. package/assets/_omit-monaco-features_css-qxObuaCQ.js +1 -0
  3. package/assets/_omit-monaco-features_html-VygYHg7B.js +1 -0
  4. package/assets/_omit-monaco-features_typescript-D_BnRRMx.js +1 -0
  5. package/assets/antimono-400-b0f584bd.woff2 +0 -0
  6. package/assets/antimono-400-italic-09f4c1ae.woff2 +0 -0
  7. package/assets/antimono-700-2072e038.woff2 +0 -0
  8. package/assets/antimono-700-italic-78952312.woff2 +0 -0
  9. package/assets/antimono-XFdMCgZb.js +2 -0
  10. package/assets/antimono-zBXMptjq.css +1 -1
  11. package/assets/bat-DkMb6tS9.js +1 -0
  12. package/assets/bicep-gz7oXw8V.js +2 -0
  13. package/assets/clojure-BeArCv4U.js +1 -0
  14. package/assets/codicon-77f90255.ttf +0 -0
  15. package/assets/coffee-hLOn_V5A.js +1 -0
  16. package/assets/cpp-DxRo2s7O.js +1 -0
  17. package/assets/csharp-C1LINnKt.js +1 -0
  18. package/assets/css-1Eg8GPA8.js +3 -0
  19. package/assets/cypher-Ca1JvSwk.js +1 -0
  20. package/assets/dart-Bje7CIuI.js +1 -0
  21. package/assets/dist-DiJdi6br.js +11 -0
  22. package/assets/dockerfile-DZFCIeNp.js +1 -0
  23. package/assets/editor.api-ClTSSybg.js +912 -0
  24. package/assets/editorWebWorkerMain-9q7AG3J9.js +1 -0
  25. package/assets/editorWebWorkerMain-BeKU-a3I.js +33 -0
  26. package/assets/elixir-6RTg0lbw.js +1 -0
  27. package/assets/fsharp-p7RecL-a.js +1 -0
  28. package/assets/go-B21Jr2Lc.js +1 -0
  29. package/assets/graphql-fmXr3nnJ.js +1 -0
  30. package/assets/handlebars-CyuWwLhs.js +1 -0
  31. package/assets/hcl-CpzslTdj.js +1 -0
  32. package/assets/html-D-6ViuBT.js +1 -0
  33. package/assets/ini-sBoK_t0W.js +1 -0
  34. package/assets/java-ByyLeZXC.js +1 -0
  35. package/assets/javascript-Cs-KDyqn.js +1 -0
  36. package/assets/{json.worker-CAiVr-gV.js → json.worker-BO5JkV3c.js} +6 -6
  37. package/assets/json.worker-D4KZT3k0.js +1 -0
  38. package/assets/jsonMode-CgXNHhiW.js +12 -0
  39. package/assets/julia-BNQOXozl.js +1 -0
  40. package/assets/kotlin-fjNqnENY.js +1 -0
  41. package/assets/less-B9-X_OHM.js +2 -0
  42. package/assets/liquid-Co_Rw9yK.js +1 -0
  43. package/assets/lua-CsQS60Ue.js +1 -0
  44. package/assets/main-DhJSBJDT.js +1 -0
  45. package/assets/main-HAVFq1WZ.js +1 -0
  46. package/assets/main-e2I2uRcQ.js +1 -0
  47. package/assets/markdown-D9M8UCDQ.js +1 -0
  48. package/assets/mdx-QikHivq4.js +1 -0
  49. package/assets/mips-DwkTBQD5.js +1 -0
  50. package/assets/monaco-9bd99409.css +3 -0
  51. package/assets/monaco-BPDUy015.js +59 -0
  52. package/assets/mysql-B9tHR_c9.js +1 -0
  53. package/assets/objective-c-Csug38Zp.js +1 -0
  54. package/assets/pascal-BruRBdsr.js +1 -0
  55. package/assets/perl-Dql_Egn0.js +1 -0
  56. package/assets/pgsql-DI4tfWYt.js +1 -0
  57. package/assets/php-DjHJy6xV.js +1 -0
  58. package/assets/powershell-DOR_yACD.js +1 -0
  59. package/assets/protobuf-B6qBET1H.js +2 -0
  60. package/assets/pug-BC7GTg9W.js +1 -0
  61. package/assets/python-ywrvpsv-.js +1 -0
  62. package/assets/r-B-J1yMT1.js +1 -0
  63. package/assets/redis-DZRGuxk2.js +1 -0
  64. package/assets/ruby-aklVn8qB.js +1 -0
  65. package/assets/rust-nh76nEti.js +1 -0
  66. package/assets/scala-BvnaqAb1.js +1 -0
  67. package/assets/scss-9xZSuRET.js +3 -0
  68. package/assets/shell-BOwo4WfX.js +1 -0
  69. package/assets/solidity-hGP85dDs.js +1 -0
  70. package/assets/sql-CIrXk7iQ.js +1 -0
  71. package/assets/swift-B0ETVgO9.js +1 -0
  72. package/assets/systemverilog-C0rJIDsQ.js +1 -0
  73. package/assets/twig-B_taSrVf.js +1 -0
  74. package/assets/typescript-pjjiBLxk.js +1 -0
  75. package/assets/typespec-uhVOI7Qs.js +1 -0
  76. package/assets/vb-4iFT4G4y.js +1 -0
  77. package/assets/wgsl-DpFanUEy.js +298 -0
  78. package/assets/xml-CuyY6WsM.js +1 -0
  79. package/assets/yaml-BDf1vVDq.js +1 -0
  80. package/assets/yaml.worker-D0QDX0Zj.js +1 -0
  81. package/assets/yaml.worker-DD5NU0Ed.js +431 -0
  82. package/package.json +1 -1
  83. package/src/main.js +19 -19
  84. package/assets/antimono-ClsI0fxy.js +0 -5
  85. package/assets/bat-CAz1OfAu.js +0 -125
  86. package/assets/bicep-B6UDBWZN.js +0 -220
  87. package/assets/clojure-BmcSQAck.js +0 -148
  88. package/assets/coffee-BjQKeqpj.js +0 -262
  89. package/assets/cpp-SbfDT5PL.js +0 -232
  90. package/assets/csharp-DIgVBsD4.js +0 -262
  91. package/assets/css-CyL9hcFb.js +0 -286
  92. package/assets/css.worker-BIsSvM_Q.js +0 -96
  93. package/assets/css.worker-ZGAWMrD5.js +0 -6
  94. package/assets/cssMode-CJXOwqou.js +0 -65
  95. package/assets/cypher-CFQunzEa.js +0 -214
  96. package/assets/dart-DeIsDVRt.js +0 -238
  97. package/assets/dist-Bx9hOuoB.js +0 -624
  98. package/assets/dockerfile-Yk3LuDQk.js +0 -193
  99. package/assets/editor.api-BzOtwRIu.js +0 -85776
  100. package/assets/editorWebWorkerMain-5pwK50BL.js +0 -6
  101. package/assets/editorWebWorkerMain-BioN9fGU.js +0 -33
  102. package/assets/elixir-y_NY5k67.js +0 -525
  103. package/assets/fsharp-DdRbc-sH.js +0 -149
  104. package/assets/go-D7w79i6g.js +0 -167
  105. package/assets/graphql-BsDuKp-c.js +0 -176
  106. package/assets/handlebars-CBxzRnT2.js +0 -412
  107. package/assets/hcl-CXnaLDBx.js +0 -221
  108. package/assets/html-2O_gNlhN.js +0 -333
  109. package/assets/html.worker-CEvqvEpu.js +0 -509
  110. package/assets/html.worker-CjDeE2MB.js +0 -6
  111. package/assets/htmlMode-DXEYjoJO.js +0 -74
  112. package/assets/ini-DAoNsTkV.js +0 -96
  113. package/assets/java-Cp0vrvO9.js +0 -175
  114. package/assets/javascript-b4MphFng.js +0 -20
  115. package/assets/json.worker-C4u3dDHp.js +0 -6
  116. package/assets/jsonMode-CJ6m-6ix.js +0 -450
  117. package/assets/julia-CVutXSdh.js +0 -416
  118. package/assets/kotlin-DYeWZuUb.js +0 -184
  119. package/assets/less-INmgXeDn.js +0 -244
  120. package/assets/liquid-vTiq1Xyj.js +0 -199
  121. package/assets/lspLanguageFeatures-bOiKIJ8R.js +0 -1455
  122. package/assets/lua-COF3XwLj.js +0 -202
  123. package/assets/main-16cPxgwS.js +0 -107
  124. package/assets/main-CB71Lf5W.js +0 -129
  125. package/assets/main-HEYSEiwe.js +0 -66
  126. package/assets/markdown-CCGC2kAW.js +0 -264
  127. package/assets/mdx-CDmJWd6e.js +0 -329
  128. package/assets/mips-ll8pdQLQ.js +0 -130
  129. package/assets/monaco-d37b1a8f.css +0 -3
  130. package/assets/monaco-eCLjoH9K.js +0 -40922
  131. package/assets/mysql-CnCmYLcK.js +0 -170
  132. package/assets/objective-c-D-xZGaTr.js +0 -146
  133. package/assets/pascal-CKVRL3bp.js +0 -178
  134. package/assets/perl-DqL2sfnN.js +0 -318
  135. package/assets/pgsql-BpvbArh-.js +0 -160
  136. package/assets/php-BbqlrNqC.js +0 -473
  137. package/assets/powershell-0oEoSDwW.js +0 -213
  138. package/assets/protobuf-DlOMtU4U.js +0 -661
  139. package/assets/pug-CTxaaQKP.js +0 -302
  140. package/assets/python-H0euVUAi.js +0 -254
  141. package/assets/r-DF_g8_2l.js +0 -191
  142. package/assets/redis-B09Z6nB5.js +0 -125
  143. package/assets/ruby-CWBObvDC.js +0 -529
  144. package/assets/rust-DdLDSWVK.js +0 -180
  145. package/assets/scala-Bg3GaqPc.js +0 -553
  146. package/assets/scss-D-qk8UVY.js +0 -419
  147. package/assets/shell-CpVOERQd.js +0 -225
  148. package/assets/solidity-CVmhJ22u.js +0 -149
  149. package/assets/sql-DHvzW7ba.js +0 -173
  150. package/assets/swift-DIkzszb_.js +0 -215
  151. package/assets/systemverilog-T3rz_k7V.js +0 -300
  152. package/assets/ts.worker-BydNuElr.js +0 -6
  153. package/assets/ts.worker-DZhhT1EO.js +0 -67741
  154. package/assets/tsMode-x1GCvxZU.js +0 -566
  155. package/assets/twig-CWOr6DII.js +0 -390
  156. package/assets/typescript-DGfbroT9.js +0 -257
  157. package/assets/typespec-4ubJw-FV.js +0 -236
  158. package/assets/vb-SSAHHOVh.js +0 -262
  159. package/assets/wgsl-hf5cqFtC.js +0 -147
  160. package/assets/xml-Bz6VGB5E.js +0 -130
  161. package/assets/yaml-D00PSO5v.js +0 -223
  162. package/assets/yaml.worker-DzOKX3TP.js +0 -474
  163. package/assets/yaml.worker-Y0uWi-gi.js +0 -6
@@ -1,412 +0,0 @@
1
- import { m as e } from "./editor.api-BzOtwRIu.js";
2
- //#region node_modules/monaco-editor/esm/vs/languages/definitions/handlebars/handlebars.js
3
- var t = [
4
- "area",
5
- "base",
6
- "br",
7
- "col",
8
- "embed",
9
- "hr",
10
- "img",
11
- "input",
12
- "keygen",
13
- "link",
14
- "menuitem",
15
- "meta",
16
- "param",
17
- "source",
18
- "track",
19
- "wbr"
20
- ], n = {
21
- wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,
22
- comments: { blockComment: ["{{!--", "--}}"] },
23
- brackets: [
24
- ["<!--", "-->"],
25
- ["<", ">"],
26
- ["{{", "}}"],
27
- ["{", "}"],
28
- ["(", ")"]
29
- ],
30
- autoClosingPairs: [
31
- {
32
- open: "{",
33
- close: "}"
34
- },
35
- {
36
- open: "[",
37
- close: "]"
38
- },
39
- {
40
- open: "(",
41
- close: ")"
42
- },
43
- {
44
- open: "\"",
45
- close: "\""
46
- },
47
- {
48
- open: "'",
49
- close: "'"
50
- }
51
- ],
52
- surroundingPairs: [
53
- {
54
- open: "<",
55
- close: ">"
56
- },
57
- {
58
- open: "\"",
59
- close: "\""
60
- },
61
- {
62
- open: "'",
63
- close: "'"
64
- }
65
- ],
66
- onEnterRules: [{
67
- beforeText: RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`, "i"),
68
- afterText: /^<\/(\w[\w\d]*)\s*>$/i,
69
- action: { indentAction: e.IndentAction.IndentOutdent }
70
- }, {
71
- beforeText: RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`, "i"),
72
- action: { indentAction: e.IndentAction.Indent }
73
- }]
74
- }, r = {
75
- defaultToken: "",
76
- tokenPostfix: "",
77
- tokenizer: {
78
- root: [
79
- [
80
- /\{\{!--/,
81
- "comment.block.start.handlebars",
82
- "@commentBlock"
83
- ],
84
- [
85
- /\{\{!/,
86
- "comment.start.handlebars",
87
- "@comment"
88
- ],
89
- [/\{\{/, {
90
- token: "@rematch",
91
- switchTo: "@handlebarsInSimpleState.root"
92
- }],
93
- [
94
- /<!DOCTYPE/,
95
- "metatag.html",
96
- "@doctype"
97
- ],
98
- [
99
- /<!--/,
100
- "comment.html",
101
- "@commentHtml"
102
- ],
103
- [/(<)(\w+)(\/>)/, [
104
- "delimiter.html",
105
- "tag.html",
106
- "delimiter.html"
107
- ]],
108
- [/(<)(script)/, ["delimiter.html", {
109
- token: "tag.html",
110
- next: "@script"
111
- }]],
112
- [/(<)(style)/, ["delimiter.html", {
113
- token: "tag.html",
114
- next: "@style"
115
- }]],
116
- [/(<)([:\w]+)/, ["delimiter.html", {
117
- token: "tag.html",
118
- next: "@otherTag"
119
- }]],
120
- [/(<\/)(\w+)/, ["delimiter.html", {
121
- token: "tag.html",
122
- next: "@otherTag"
123
- }]],
124
- [/</, "delimiter.html"],
125
- [/\{/, "delimiter.html"],
126
- [/[^<{]+/]
127
- ],
128
- doctype: [
129
- [/\{\{/, {
130
- token: "@rematch",
131
- switchTo: "@handlebarsInSimpleState.comment"
132
- }],
133
- [/[^>]+/, "metatag.content.html"],
134
- [
135
- />/,
136
- "metatag.html",
137
- "@pop"
138
- ]
139
- ],
140
- comment: [[
141
- /\}\}/,
142
- "comment.end.handlebars",
143
- "@pop"
144
- ], [/./, "comment.content.handlebars"]],
145
- commentBlock: [[
146
- /--\}\}/,
147
- "comment.block.end.handlebars",
148
- "@pop"
149
- ], [/./, "comment.content.handlebars"]],
150
- commentHtml: [
151
- [/\{\{/, {
152
- token: "@rematch",
153
- switchTo: "@handlebarsInSimpleState.comment"
154
- }],
155
- [
156
- /-->/,
157
- "comment.html",
158
- "@pop"
159
- ],
160
- [/[^-]+/, "comment.content.html"],
161
- [/./, "comment.content.html"]
162
- ],
163
- otherTag: [
164
- [/\{\{/, {
165
- token: "@rematch",
166
- switchTo: "@handlebarsInSimpleState.otherTag"
167
- }],
168
- [
169
- /\/?>/,
170
- "delimiter.html",
171
- "@pop"
172
- ],
173
- [/"([^"]*)"/, "attribute.value"],
174
- [/'([^']*)'/, "attribute.value"],
175
- [/[\w\-]+/, "attribute.name"],
176
- [/=/, "delimiter"],
177
- [/[ \t\r\n]+/]
178
- ],
179
- script: [
180
- [/\{\{/, {
181
- token: "@rematch",
182
- switchTo: "@handlebarsInSimpleState.script"
183
- }],
184
- [
185
- /type/,
186
- "attribute.name",
187
- "@scriptAfterType"
188
- ],
189
- [/"([^"]*)"/, "attribute.value"],
190
- [/'([^']*)'/, "attribute.value"],
191
- [/[\w\-]+/, "attribute.name"],
192
- [/=/, "delimiter"],
193
- [/>/, {
194
- token: "delimiter.html",
195
- next: "@scriptEmbedded.text/javascript",
196
- nextEmbedded: "text/javascript"
197
- }],
198
- [/[ \t\r\n]+/],
199
- [/(<\/)(script\s*)(>)/, [
200
- "delimiter.html",
201
- "tag.html",
202
- {
203
- token: "delimiter.html",
204
- next: "@pop"
205
- }
206
- ]]
207
- ],
208
- scriptAfterType: [
209
- [/\{\{/, {
210
- token: "@rematch",
211
- switchTo: "@handlebarsInSimpleState.scriptAfterType"
212
- }],
213
- [
214
- /=/,
215
- "delimiter",
216
- "@scriptAfterTypeEquals"
217
- ],
218
- [/>/, {
219
- token: "delimiter.html",
220
- next: "@scriptEmbedded.text/javascript",
221
- nextEmbedded: "text/javascript"
222
- }],
223
- [/[ \t\r\n]+/],
224
- [/<\/script\s*>/, {
225
- token: "@rematch",
226
- next: "@pop"
227
- }]
228
- ],
229
- scriptAfterTypeEquals: [
230
- [/\{\{/, {
231
- token: "@rematch",
232
- switchTo: "@handlebarsInSimpleState.scriptAfterTypeEquals"
233
- }],
234
- [/"([^"]*)"/, {
235
- token: "attribute.value",
236
- switchTo: "@scriptWithCustomType.$1"
237
- }],
238
- [/'([^']*)'/, {
239
- token: "attribute.value",
240
- switchTo: "@scriptWithCustomType.$1"
241
- }],
242
- [/>/, {
243
- token: "delimiter.html",
244
- next: "@scriptEmbedded.text/javascript",
245
- nextEmbedded: "text/javascript"
246
- }],
247
- [/[ \t\r\n]+/],
248
- [/<\/script\s*>/, {
249
- token: "@rematch",
250
- next: "@pop"
251
- }]
252
- ],
253
- scriptWithCustomType: [
254
- [/\{\{/, {
255
- token: "@rematch",
256
- switchTo: "@handlebarsInSimpleState.scriptWithCustomType.$S2"
257
- }],
258
- [/>/, {
259
- token: "delimiter.html",
260
- next: "@scriptEmbedded.$S2",
261
- nextEmbedded: "$S2"
262
- }],
263
- [/"([^"]*)"/, "attribute.value"],
264
- [/'([^']*)'/, "attribute.value"],
265
- [/[\w\-]+/, "attribute.name"],
266
- [/=/, "delimiter"],
267
- [/[ \t\r\n]+/],
268
- [/<\/script\s*>/, {
269
- token: "@rematch",
270
- next: "@pop"
271
- }]
272
- ],
273
- scriptEmbedded: [[/\{\{/, {
274
- token: "@rematch",
275
- switchTo: "@handlebarsInEmbeddedState.scriptEmbedded.$S2",
276
- nextEmbedded: "@pop"
277
- }], [/<\/script/, {
278
- token: "@rematch",
279
- next: "@pop",
280
- nextEmbedded: "@pop"
281
- }]],
282
- style: [
283
- [/\{\{/, {
284
- token: "@rematch",
285
- switchTo: "@handlebarsInSimpleState.style"
286
- }],
287
- [
288
- /type/,
289
- "attribute.name",
290
- "@styleAfterType"
291
- ],
292
- [/"([^"]*)"/, "attribute.value"],
293
- [/'([^']*)'/, "attribute.value"],
294
- [/[\w\-]+/, "attribute.name"],
295
- [/=/, "delimiter"],
296
- [/>/, {
297
- token: "delimiter.html",
298
- next: "@styleEmbedded.text/css",
299
- nextEmbedded: "text/css"
300
- }],
301
- [/[ \t\r\n]+/],
302
- [/(<\/)(style\s*)(>)/, [
303
- "delimiter.html",
304
- "tag.html",
305
- {
306
- token: "delimiter.html",
307
- next: "@pop"
308
- }
309
- ]]
310
- ],
311
- styleAfterType: [
312
- [/\{\{/, {
313
- token: "@rematch",
314
- switchTo: "@handlebarsInSimpleState.styleAfterType"
315
- }],
316
- [
317
- /=/,
318
- "delimiter",
319
- "@styleAfterTypeEquals"
320
- ],
321
- [/>/, {
322
- token: "delimiter.html",
323
- next: "@styleEmbedded.text/css",
324
- nextEmbedded: "text/css"
325
- }],
326
- [/[ \t\r\n]+/],
327
- [/<\/style\s*>/, {
328
- token: "@rematch",
329
- next: "@pop"
330
- }]
331
- ],
332
- styleAfterTypeEquals: [
333
- [/\{\{/, {
334
- token: "@rematch",
335
- switchTo: "@handlebarsInSimpleState.styleAfterTypeEquals"
336
- }],
337
- [/"([^"]*)"/, {
338
- token: "attribute.value",
339
- switchTo: "@styleWithCustomType.$1"
340
- }],
341
- [/'([^']*)'/, {
342
- token: "attribute.value",
343
- switchTo: "@styleWithCustomType.$1"
344
- }],
345
- [/>/, {
346
- token: "delimiter.html",
347
- next: "@styleEmbedded.text/css",
348
- nextEmbedded: "text/css"
349
- }],
350
- [/[ \t\r\n]+/],
351
- [/<\/style\s*>/, {
352
- token: "@rematch",
353
- next: "@pop"
354
- }]
355
- ],
356
- styleWithCustomType: [
357
- [/\{\{/, {
358
- token: "@rematch",
359
- switchTo: "@handlebarsInSimpleState.styleWithCustomType.$S2"
360
- }],
361
- [/>/, {
362
- token: "delimiter.html",
363
- next: "@styleEmbedded.$S2",
364
- nextEmbedded: "$S2"
365
- }],
366
- [/"([^"]*)"/, "attribute.value"],
367
- [/'([^']*)'/, "attribute.value"],
368
- [/[\w\-]+/, "attribute.name"],
369
- [/=/, "delimiter"],
370
- [/[ \t\r\n]+/],
371
- [/<\/style\s*>/, {
372
- token: "@rematch",
373
- next: "@pop"
374
- }]
375
- ],
376
- styleEmbedded: [[/\{\{/, {
377
- token: "@rematch",
378
- switchTo: "@handlebarsInEmbeddedState.styleEmbedded.$S2",
379
- nextEmbedded: "@pop"
380
- }], [/<\/style/, {
381
- token: "@rematch",
382
- next: "@pop",
383
- nextEmbedded: "@pop"
384
- }]],
385
- handlebarsInSimpleState: [
386
- [/\{\{\{?/, "delimiter.handlebars"],
387
- [/\}\}\}?/, {
388
- token: "delimiter.handlebars",
389
- switchTo: "@$S2.$S3"
390
- }],
391
- { include: "handlebarsRoot" }
392
- ],
393
- handlebarsInEmbeddedState: [
394
- [/\{\{\{?/, "delimiter.handlebars"],
395
- [/\}\}\}?/, {
396
- token: "delimiter.handlebars",
397
- switchTo: "@$S2.$S3",
398
- nextEmbedded: "$S3"
399
- }],
400
- { include: "handlebarsRoot" }
401
- ],
402
- handlebarsRoot: [
403
- [/"[^"]*"/, "string.handlebars"],
404
- [/[#/][^\s}]+/, "keyword.helper.handlebars"],
405
- [/else\b/, "keyword.helper.handlebars"],
406
- [/[\s]+/],
407
- [/[^}]/, "variable.parameter.handlebars"]
408
- ]
409
- }
410
- };
411
- //#endregion
412
- export { n as conf, r as language };
@@ -1,221 +0,0 @@
1
- //#region node_modules/monaco-editor/esm/vs/languages/definitions/hcl/hcl.js
2
- var e = {
3
- comments: {
4
- lineComment: "#",
5
- blockComment: ["/*", "*/"]
6
- },
7
- brackets: [
8
- ["{", "}"],
9
- ["[", "]"],
10
- ["(", ")"]
11
- ],
12
- autoClosingPairs: [
13
- {
14
- open: "{",
15
- close: "}"
16
- },
17
- {
18
- open: "[",
19
- close: "]"
20
- },
21
- {
22
- open: "(",
23
- close: ")"
24
- },
25
- {
26
- open: "\"",
27
- close: "\"",
28
- notIn: ["string"]
29
- }
30
- ],
31
- surroundingPairs: [
32
- {
33
- open: "{",
34
- close: "}"
35
- },
36
- {
37
- open: "[",
38
- close: "]"
39
- },
40
- {
41
- open: "(",
42
- close: ")"
43
- },
44
- {
45
- open: "\"",
46
- close: "\""
47
- }
48
- ]
49
- }, t = {
50
- defaultToken: "",
51
- tokenPostfix: ".hcl",
52
- keywords: [
53
- "var",
54
- "local",
55
- "path",
56
- "for_each",
57
- "any",
58
- "string",
59
- "number",
60
- "bool",
61
- "true",
62
- "false",
63
- "null",
64
- "if ",
65
- "else ",
66
- "endif ",
67
- "for ",
68
- "in",
69
- "endfor"
70
- ],
71
- operators: [
72
- "=",
73
- ">=",
74
- "<=",
75
- "==",
76
- "!=",
77
- "+",
78
- "-",
79
- "*",
80
- "/",
81
- "%",
82
- "&&",
83
- "||",
84
- "!",
85
- "<",
86
- ">",
87
- "?",
88
- "...",
89
- ":"
90
- ],
91
- symbols: /[=><!~?:&|+\-*\/\^%]+/,
92
- escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
93
- terraformFunctions: /(abs|ceil|floor|log|max|min|pow|signum|chomp|format|formatlist|indent|join|lower|regex|regexall|replace|split|strrev|substr|title|trimspace|upper|chunklist|coalesce|coalescelist|compact|concat|contains|distinct|element|flatten|index|keys|length|list|lookup|map|matchkeys|merge|range|reverse|setintersection|setproduct|setunion|slice|sort|transpose|values|zipmap|base64decode|base64encode|base64gzip|csvdecode|jsondecode|jsonencode|urlencode|yamldecode|yamlencode|abspath|dirname|pathexpand|basename|file|fileexists|fileset|filebase64|templatefile|formatdate|timeadd|timestamp|base64sha256|base64sha512|bcrypt|filebase64sha256|filebase64sha512|filemd5|filemd1|filesha256|filesha512|md5|rsadecrypt|sha1|sha256|sha512|uuid|uuidv5|cidrhost|cidrnetmask|cidrsubnet|tobool|tolist|tomap|tonumber|toset|tostring)/,
94
- terraformMainBlocks: /(module|data|terraform|resource|provider|variable|output|locals)/,
95
- tokenizer: {
96
- root: [
97
- [/^@terraformMainBlocks([ \t]*)([\w-]+|"[\w-]+"|)([ \t]*)([\w-]+|"[\w-]+"|)([ \t]*)(\{)/, [
98
- "type",
99
- "",
100
- "string",
101
- "",
102
- "string",
103
- "",
104
- "@brackets"
105
- ]],
106
- [/(\w+[ \t]+)([ \t]*)([\w-]+|"[\w-]+"|)([ \t]*)([\w-]+|"[\w-]+"|)([ \t]*)(\{)/, [
107
- "identifier",
108
- "",
109
- "string",
110
- "",
111
- "string",
112
- "",
113
- "@brackets"
114
- ]],
115
- [/(\w+[ \t]+)([ \t]*)([\w-]+|"[\w-]+"|)([ \t]*)([\w-]+|"[\w-]+"|)(=)(\{)/, [
116
- "identifier",
117
- "",
118
- "string",
119
- "",
120
- "operator",
121
- "",
122
- "@brackets"
123
- ]],
124
- { include: "@terraform" }
125
- ],
126
- terraform: [
127
- [/@terraformFunctions(\()/, ["type", "@brackets"]],
128
- [/[a-zA-Z_]\w*-*/, { cases: {
129
- "@keywords": { token: "keyword.$0" },
130
- "@default": "variable"
131
- } }],
132
- { include: "@whitespace" },
133
- { include: "@heredoc" },
134
- [/[{}()\[\]]/, "@brackets"],
135
- [/[<>](?!@symbols)/, "@brackets"],
136
- [/@symbols/, { cases: {
137
- "@operators": "operator",
138
- "@default": ""
139
- } }],
140
- [/\d*\d+[eE]([\-+]?\d+)?/, "number.float"],
141
- [/\d*\.\d+([eE][\-+]?\d+)?/, "number.float"],
142
- [/\d[\d']*/, "number"],
143
- [/\d/, "number"],
144
- [/[;,.]/, "delimiter"],
145
- [
146
- /"/,
147
- "string",
148
- "@string"
149
- ],
150
- [/'/, "invalid"]
151
- ],
152
- heredoc: [[/<<[-]*\s*["]?([\w\-]+)["]?/, {
153
- token: "string.heredoc.delimiter",
154
- next: "@heredocBody.$1"
155
- }]],
156
- heredocBody: [[/([\w\-]+)$/, { cases: {
157
- "$1==$S2": [{
158
- token: "string.heredoc.delimiter",
159
- next: "@popall"
160
- }],
161
- "@default": "string.heredoc"
162
- } }], [/./, "string.heredoc"]],
163
- whitespace: [
164
- [/[ \t\r\n]+/, ""],
165
- [
166
- /\/\*/,
167
- "comment",
168
- "@comment"
169
- ],
170
- [/\/\/.*$/, "comment"],
171
- [/#.*$/, "comment"]
172
- ],
173
- comment: [
174
- [/[^\/*]+/, "comment"],
175
- [
176
- /\*\//,
177
- "comment",
178
- "@pop"
179
- ],
180
- [/[\/*]/, "comment"]
181
- ],
182
- string: [
183
- [/\$\{/, {
184
- token: "delimiter",
185
- next: "@stringExpression"
186
- }],
187
- [/[^\\"\$]+/, "string"],
188
- [/@escapes/, "string.escape"],
189
- [/\\./, "string.escape.invalid"],
190
- [
191
- /"/,
192
- "string",
193
- "@popall"
194
- ]
195
- ],
196
- stringInsideExpression: [
197
- [/[^\\"]+/, "string"],
198
- [/@escapes/, "string.escape"],
199
- [/\\./, "string.escape.invalid"],
200
- [
201
- /"/,
202
- "string",
203
- "@pop"
204
- ]
205
- ],
206
- stringExpression: [
207
- [/\}/, {
208
- token: "delimiter",
209
- next: "@pop"
210
- }],
211
- [
212
- /"/,
213
- "string",
214
- "@stringInsideExpression"
215
- ],
216
- { include: "@terraform" }
217
- ]
218
- }
219
- };
220
- //#endregion
221
- export { e as conf, t as language };