monaco-editor11 1.2.1 → 1.2.4

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 (197) hide show
  1. package/dist/assets/editor.worker-iXcRX1Tq.js +26 -0
  2. package/dist/index.d.ts +2 -3
  3. package/dist/monaco-editor11.es.js +55 -0
  4. package/dist/monaco-editor11.umd.js +1 -0
  5. package/dist/views/Home.vue.d.ts +1 -1
  6. package/dist/worker/json.worker.js +0 -0
  7. package/package.json +9 -13
  8. package/dist/abap-BmV14C8H.js +0 -1
  9. package/dist/abap-CrvW7_qN.mjs +0 -1398
  10. package/dist/apex-BAOI8p1v.mjs +0 -327
  11. package/dist/apex-vQDebnNk.js +0 -1
  12. package/dist/azcli-BlCk_UqW.mjs +0 -68
  13. package/dist/azcli-C4hxwus7.js +0 -1
  14. package/dist/bat-DPoEelVx.mjs +0 -100
  15. package/dist/bat-DYHIOgJW.js +0 -1
  16. package/dist/bicep-BJDZ3U7c.js +0 -2
  17. package/dist/bicep-Cp1F394l.mjs +0 -102
  18. package/dist/cameligo-CWqtSlQs.mjs +0 -174
  19. package/dist/cameligo-l0J6eaPU.js +0 -1
  20. package/dist/clojure-BUv_1vEn.js +0 -1
  21. package/dist/clojure-CKBp32Gf.mjs +0 -761
  22. package/dist/coffee-CDo6vc-J.mjs +0 -232
  23. package/dist/coffee-Cw3141X6.js +0 -1
  24. package/dist/cpp-CHPWmTTa.js +0 -1
  25. package/dist/cpp-DokufPgf.mjs +0 -389
  26. package/dist/csharp-0ISFInBU.js +0 -1
  27. package/dist/csharp-BQi3szM0.mjs +0 -326
  28. package/dist/csp-BSGtCCZ-.mjs +0 -53
  29. package/dist/csp-Dcy9EUAZ.js +0 -1
  30. package/dist/css-DEPFDJfb.mjs +0 -187
  31. package/dist/css-UDjyEDNM.js +0 -3
  32. package/dist/css.worker.js +0 -66
  33. package/dist/cssMode-CZvh5Cxi.js +0 -1
  34. package/dist/cssMode-D5wFpBcJ.mjs +0 -141
  35. package/dist/cypher-BoSKj8sy.js +0 -1
  36. package/dist/cypher-DAb1vOxS.mjs +0 -263
  37. package/dist/dart-75fOVMIC.js +0 -1
  38. package/dist/dart-C8p4jewR.mjs +0 -281
  39. package/dist/dockerfile-CeTDdZJB.js +0 -1
  40. package/dist/dockerfile-DP0iLFPN.mjs +0 -130
  41. package/dist/ecl-BDQHA6fi.mjs +0 -456
  42. package/dist/ecl-BZ8GfbIS.js +0 -1
  43. package/dist/editor.worker.js +0 -1
  44. package/dist/editorWorkerHost-CXSl__Sw.mjs +0 -11917
  45. package/dist/editorWorkerHost-J3OLr02l.js +0 -33
  46. package/dist/elixir-D4II6kDM.mjs +0 -569
  47. package/dist/elixir-HwUoMs-6.js +0 -1
  48. package/dist/flow9-Co-egZvn.js +0 -1
  49. package/dist/flow9-StcnL-VB.mjs +0 -142
  50. package/dist/freemarker2-0KWO0y3D.mjs +0 -982
  51. package/dist/freemarker2-CWgJ4a-p.js +0 -3
  52. package/dist/fsharp-By4FMj_K.js +0 -1
  53. package/dist/fsharp-DdUVp3EN.mjs +0 -217
  54. package/dist/go-D0-3Iavh.js +0 -1
  55. package/dist/go-D1-I258M.mjs +0 -218
  56. package/dist/graphql-DWkL3f8U.mjs +0 -151
  57. package/dist/graphql-arXy5b1U.js +0 -1
  58. package/dist/handlebars-B3DRUYqI.js +0 -1
  59. package/dist/handlebars-CtTh3MzK.mjs +0 -412
  60. package/dist/hcl-DQpT3BXv.js +0 -1
  61. package/dist/hcl-D_0MNifv.mjs +0 -183
  62. package/dist/html-Bfagd5f8.mjs +0 -301
  63. package/dist/html-Cq6ODg2A.js +0 -1
  64. package/dist/htmlMode-BCWHN8H1.js +0 -1
  65. package/dist/htmlMode-Ca4o_48E.mjs +0 -152
  66. package/dist/index-BnVmN2qp.js +0 -875
  67. package/dist/index-CcXLAo11.js +0 -1
  68. package/dist/index-D7fx9aNv.mjs +0 -498
  69. package/dist/index-DnKFAZ-F.mjs +0 -117301
  70. package/dist/index.js +0 -1
  71. package/dist/ini-C4I2-MT7.mjs +0 -71
  72. package/dist/ini-CHrdBSR6.js +0 -1
  73. package/dist/initialize-7Tsg9DJ6.mjs +0 -44
  74. package/dist/initialize-8Cpp42Fp.js +0 -1
  75. package/dist/java-DkNlCtA8.js +0 -1
  76. package/dist/java-OBvaP_SS.mjs +0 -232
  77. package/dist/javascript-C_YSapv9.js +0 -1
  78. package/dist/javascript-D2KmymLa.mjs +0 -70
  79. package/dist/json.worker.js +0 -17
  80. package/dist/jsonMode-DaXUMuRa.js +0 -1
  81. package/dist/jsonMode-Dnqj4FWW.mjs +0 -306
  82. package/dist/julia-BmDH8Kkf.mjs +0 -511
  83. package/dist/julia-D2YHJdZy.js +0 -1
  84. package/dist/kotlin-BSyr2f_w.js +0 -1
  85. package/dist/kotlin-Dhu5AGOD.mjs +0 -252
  86. package/dist/less-C8csD237.js +0 -2
  87. package/dist/less-CzmjXREq.mjs +0 -162
  88. package/dist/lexon-CV2c4pN9.mjs +0 -157
  89. package/dist/lexon-Dg5XMXM-.js +0 -1
  90. package/dist/liquid-CQtA4TA-.mjs +0 -233
  91. package/dist/liquid-Dc6vO2KK.js +0 -1
  92. package/dist/lspLanguageFeatures-CeustN1U.js +0 -2
  93. package/dist/lspLanguageFeatures-DUzyYYsS.mjs +0 -534
  94. package/dist/lua-BOoO7Ej7.js +0 -1
  95. package/dist/lua-CFY5U8qF.mjs +0 -162
  96. package/dist/m3-BL_AnZVh.mjs +0 -210
  97. package/dist/m3-Bny7JARg.js +0 -1
  98. package/dist/main-B2xgQ6G2.mjs +0 -687
  99. package/dist/main-C27EQSK2.mjs +0 -947
  100. package/dist/main-DXJICgQq.js +0 -3
  101. package/dist/main-Dt1Bdcpc.js +0 -15
  102. package/dist/markdown-CWKQPXCv.mjs +0 -229
  103. package/dist/markdown-cseWCS9n.js +0 -1
  104. package/dist/mdx-C2nK3qTe.js +0 -1
  105. package/dist/mdx-cjfOdSKt.mjs +0 -158
  106. package/dist/mips-7JuqcyJ4.js +0 -1
  107. package/dist/mips-ButYmJ5E.mjs +0 -198
  108. package/dist/monaco-editor11.css +0 -1
  109. package/dist/msdax-BmYA5eV5.js +0 -1
  110. package/dist/msdax-C3cnXqDh.mjs +0 -375
  111. package/dist/mysql-CHTrPhJ_.js +0 -1
  112. package/dist/mysql-YlSHaf6G.mjs +0 -878
  113. package/dist/objective-c-CUdbM2R7.js +0 -1
  114. package/dist/objective-c-Dwnlproe.mjs +0 -183
  115. package/dist/pascal-CNC6uGuD.js +0 -1
  116. package/dist/pascal-UzGbSWEN.mjs +0 -251
  117. package/dist/pascaligo-BEZzSZnI.js +0 -1
  118. package/dist/pascaligo-CslTgu68.mjs +0 -164
  119. package/dist/perl-JOl0jAD9.js +0 -1
  120. package/dist/perl-oj6r_mgw.mjs +0 -626
  121. package/dist/pgsql-BlC3cJBr.js +0 -1
  122. package/dist/pgsql-DSBO0Mev.mjs +0 -851
  123. package/dist/php-6ijfJ2jK.js +0 -1
  124. package/dist/php-YzCD--7j.mjs +0 -500
  125. package/dist/pla-CmylB8vQ.mjs +0 -137
  126. package/dist/pla-DB8tU9Tm.js +0 -1
  127. package/dist/postiats-BMJJQsUH.js +0 -1
  128. package/dist/postiats-CLFW5gNY.mjs +0 -907
  129. package/dist/powerquery-CmOWUvlh.mjs +0 -890
  130. package/dist/powerquery-CoLfQ6__.js +0 -1
  131. package/dist/powershell-BA5owzqH.js +0 -1
  132. package/dist/powershell-fHQcmBLK.mjs +0 -239
  133. package/dist/protobuf-DUMRTG9C.js +0 -2
  134. package/dist/protobuf-p5BArb-9.mjs +0 -420
  135. package/dist/pug-D3HDBCR9.js +0 -1
  136. package/dist/pug-gVdUDvqf.mjs +0 -402
  137. package/dist/python-BaSW5leI.js +0 -1
  138. package/dist/python-DA6ByLCZ.mjs +0 -294
  139. package/dist/qsharp-DN7Y6XhL.js +0 -1
  140. package/dist/qsharp-DnrWSUlt.mjs +0 -301
  141. package/dist/r-Bc6rlFXl.js +0 -1
  142. package/dist/r-Cv309K2z.mjs +0 -243
  143. package/dist/razor-3z9XYGZf.mjs +0 -543
  144. package/dist/razor-nQE2Djhf.js +0 -1
  145. package/dist/redis-BVBmvApp.js +0 -1
  146. package/dist/redis-DTcS4wMj.mjs +0 -302
  147. package/dist/redshift-BdEMv0YI.js +0 -1
  148. package/dist/redshift-hLxZVESM.mjs +0 -809
  149. package/dist/restructuredtext-C898lK4f.mjs +0 -174
  150. package/dist/restructuredtext-Cwgkbiv3.js +0 -1
  151. package/dist/ruby-BPqQ0TOE.js +0 -1
  152. package/dist/ruby-CgKtnJIQ.mjs +0 -511
  153. package/dist/rust-DGojqpAN.js +0 -1
  154. package/dist/rust-bj8oxVnh.mjs +0 -343
  155. package/dist/sb-B572kJZe.js +0 -1
  156. package/dist/sb-DWynz26l.mjs +0 -115
  157. package/dist/scala-BL5z1UEd.mjs +0 -370
  158. package/dist/scala-CDQ1h1Nd.js +0 -1
  159. package/dist/scheme-CgaAfqMQ.js +0 -1
  160. package/dist/scheme-DUJsH6VU.mjs +0 -108
  161. package/dist/scss-CxjmhvaL.mjs +0 -262
  162. package/dist/scss-DZHIl239.js +0 -3
  163. package/dist/shell-D14Zs1dF.mjs +0 -221
  164. package/dist/shell-D5kOdfAA.js +0 -1
  165. package/dist/solidity-D6vCwnFo.js +0 -1
  166. package/dist/solidity-WyRm-BGK.mjs +0 -1367
  167. package/dist/sophia-BJdevZpo.js +0 -1
  168. package/dist/sophia-CKk-_Oa5.mjs +0 -199
  169. package/dist/sparql-DHtmINMZ.mjs +0 -201
  170. package/dist/sparql-v4dsLpAQ.js +0 -1
  171. package/dist/sql-Dqaj5JHC.mjs +0 -853
  172. package/dist/sql-RAt0uxGh.js +0 -1
  173. package/dist/st-Bj2IIaop.mjs +0 -416
  174. package/dist/st-CjwpLApO.js +0 -1
  175. package/dist/swift-BcIVfYEa.js +0 -3
  176. package/dist/swift-DwxP72iM.mjs +0 -312
  177. package/dist/systemverilog-CX2A8v2w.js +0 -1
  178. package/dist/systemverilog-D7wJfuql.mjs +0 -576
  179. package/dist/tcl-0ApMt-eC.mjs +0 -232
  180. package/dist/tcl-CCvdS1Ng.js +0 -1
  181. package/dist/ts.worker.js +0 -67706
  182. package/dist/tsMode-CieVaThB.js +0 -11
  183. package/dist/tsMode-pbVGEqHg.mjs +0 -946
  184. package/dist/twig-DxwbdmvQ.mjs +0 -392
  185. package/dist/twig-KWJe-gee.js +0 -1
  186. package/dist/typescript-CL7lZGgL.mjs +0 -336
  187. package/dist/typescript-D-fgoGBJ.js +0 -1
  188. package/dist/typespec-Fd-JwSuS.mjs +0 -117
  189. package/dist/typespec-gb5rMy4D.js +0 -1
  190. package/dist/vb-CxuyYE1I.mjs +0 -372
  191. package/dist/vb-D2rfixXK.js +0 -1
  192. package/dist/wgsl-DoEGc31J.mjs +0 -439
  193. package/dist/wgsl-Dpy8Oyoq.js +0 -298
  194. package/dist/xml-Dm8zU0Zq.mjs +0 -88
  195. package/dist/xml-luJ1w-__.js +0 -1
  196. package/dist/yaml-DDKFPb37.mjs +0 -199
  197. package/dist/yaml-DZkx0RTO.js +0 -1
@@ -1,511 +0,0 @@
1
- const e = {
2
- comments: {
3
- lineComment: "#",
4
- blockComment: ["=begin", "=end"]
5
- },
6
- brackets: [
7
- ["(", ")"],
8
- ["{", "}"],
9
- ["[", "]"]
10
- ],
11
- autoClosingPairs: [
12
- { open: "{", close: "}" },
13
- { open: "[", close: "]" },
14
- { open: "(", close: ")" },
15
- { open: '"', close: '"' },
16
- { open: "'", close: "'" }
17
- ],
18
- surroundingPairs: [
19
- { open: "{", close: "}" },
20
- { open: "[", close: "]" },
21
- { open: "(", close: ")" },
22
- { open: '"', close: '"' },
23
- { open: "'", close: "'" }
24
- ],
25
- indentationRules: {
26
- increaseIndentPattern: new RegExp(
27
- `^\\s*((begin|class|(private|protected)\\s+def|def|else|elsif|ensure|for|if|module|rescue|unless|until|when|while|case)|([^#]*\\sdo\\b)|([^#]*=\\s*(case|if|unless)))\\b([^#\\{;]|("|'|/).*\\4)*(#.*)?$`
28
- ),
29
- decreaseIndentPattern: new RegExp(
30
- "^\\s*([}\\]]([,)]?\\s*(#|$)|\\.[a-zA-Z_]\\w*\\b)|(end|rescue|ensure|else|elsif|when)\\b)"
31
- )
32
- }
33
- }, t = {
34
- tokenPostfix: ".ruby",
35
- keywords: [
36
- "__LINE__",
37
- "__ENCODING__",
38
- "__FILE__",
39
- "BEGIN",
40
- "END",
41
- "alias",
42
- "and",
43
- "begin",
44
- "break",
45
- "case",
46
- "class",
47
- "def",
48
- "defined?",
49
- "do",
50
- "else",
51
- "elsif",
52
- "end",
53
- "ensure",
54
- "for",
55
- "false",
56
- "if",
57
- "in",
58
- "module",
59
- "next",
60
- "nil",
61
- "not",
62
- "or",
63
- "redo",
64
- "rescue",
65
- "retry",
66
- "return",
67
- "self",
68
- "super",
69
- "then",
70
- "true",
71
- "undef",
72
- "unless",
73
- "until",
74
- "when",
75
- "while",
76
- "yield"
77
- ],
78
- keywordops: ["::", "..", "...", "?", ":", "=>"],
79
- builtins: [
80
- "require",
81
- "public",
82
- "private",
83
- "include",
84
- "extend",
85
- "attr_reader",
86
- "protected",
87
- "private_class_method",
88
- "protected_class_method",
89
- "new"
90
- ],
91
- // these are closed by 'end' (if, while and until are handled separately)
92
- declarations: [
93
- "module",
94
- "class",
95
- "def",
96
- "case",
97
- "do",
98
- "begin",
99
- "for",
100
- "if",
101
- "while",
102
- "until",
103
- "unless"
104
- ],
105
- linedecls: ["def", "case", "do", "begin", "for", "if", "while", "until", "unless"],
106
- operators: [
107
- "^",
108
- "&",
109
- "|",
110
- "<=>",
111
- "==",
112
- "===",
113
- "!~",
114
- "=~",
115
- ">",
116
- ">=",
117
- "<",
118
- "<=",
119
- "<<",
120
- ">>",
121
- "+",
122
- "-",
123
- "*",
124
- "/",
125
- "%",
126
- "**",
127
- "~",
128
- "+@",
129
- "-@",
130
- "[]",
131
- "[]=",
132
- "`",
133
- "+=",
134
- "-=",
135
- "*=",
136
- "**=",
137
- "/=",
138
- "^=",
139
- "%=",
140
- "<<=",
141
- ">>=",
142
- "&=",
143
- "&&=",
144
- "||=",
145
- "|="
146
- ],
147
- brackets: [
148
- { open: "(", close: ")", token: "delimiter.parenthesis" },
149
- { open: "{", close: "}", token: "delimiter.curly" },
150
- { open: "[", close: "]", token: "delimiter.square" }
151
- ],
152
- // we include these common regular expressions
153
- symbols: /[=><!~?:&|+\-*\/\^%\.]+/,
154
- // escape sequences
155
- escape: /(?:[abefnrstv\\"'\n\r]|[0-7]{1,3}|x[0-9A-Fa-f]{1,2}|u[0-9A-Fa-f]{4})/,
156
- escapes: /\\(?:C\-(@escape|.)|c(@escape|.)|@escape)/,
157
- decpart: /\d(_?\d)*/,
158
- decimal: /0|@decpart/,
159
- delim: /[^a-zA-Z0-9\s\n\r]/,
160
- heredelim: /(?:\w+|'[^']*'|"[^"]*"|`[^`]*`)/,
161
- regexpctl: /[(){}\[\]\$\^|\-*+?\.]/,
162
- regexpesc: /\\(?:[AzZbBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})?/,
163
- // The main tokenizer for our languages
164
- tokenizer: {
165
- // Main entry.
166
- // root.<decl> where decl is the current opening declaration (like 'class')
167
- root: [
168
- // identifiers and keywords
169
- // most complexity here is due to matching 'end' correctly with declarations.
170
- // We distinguish a declaration that comes first on a line, versus declarations further on a line (which are most likey modifiers)
171
- [
172
- /^(\s*)([a-z_]\w*[!?=]?)/,
173
- [
174
- "white",
175
- {
176
- cases: {
177
- "for|until|while": {
178
- token: "keyword.$2",
179
- next: "@dodecl.$2"
180
- },
181
- "@declarations": {
182
- token: "keyword.$2",
183
- next: "@root.$2"
184
- },
185
- end: { token: "keyword.$S2", next: "@pop" },
186
- "@keywords": "keyword",
187
- "@builtins": "predefined",
188
- "@default": "identifier"
189
- }
190
- }
191
- ]
192
- ],
193
- [
194
- /[a-z_]\w*[!?=]?/,
195
- {
196
- cases: {
197
- "if|unless|while|until": {
198
- token: "keyword.$0x",
199
- next: "@modifier.$0x"
200
- },
201
- for: { token: "keyword.$2", next: "@dodecl.$2" },
202
- "@linedecls": { token: "keyword.$0", next: "@root.$0" },
203
- end: { token: "keyword.$S2", next: "@pop" },
204
- "@keywords": "keyword",
205
- "@builtins": "predefined",
206
- "@default": "identifier"
207
- }
208
- }
209
- ],
210
- [/[A-Z][\w]*[!?=]?/, "constructor.identifier"],
211
- // constant
212
- [/\$[\w]*/, "global.constant"],
213
- // global
214
- [/@[\w]*/, "namespace.instance.identifier"],
215
- // instance
216
- [/@@@[\w]*/, "namespace.class.identifier"],
217
- // class
218
- // here document
219
- [/<<[-~](@heredelim).*/, { token: "string.heredoc.delimiter", next: "@heredoc.$1" }],
220
- [/[ \t\r\n]+<<(@heredelim).*/, { token: "string.heredoc.delimiter", next: "@heredoc.$1" }],
221
- [/^<<(@heredelim).*/, { token: "string.heredoc.delimiter", next: "@heredoc.$1" }],
222
- // whitespace
223
- { include: "@whitespace" },
224
- // strings
225
- [/"/, { token: "string.d.delim", next: '@dstring.d."' }],
226
- [/'/, { token: "string.sq.delim", next: "@sstring.sq" }],
227
- // % literals. For efficiency, rematch in the 'pstring' state
228
- [/%([rsqxwW]|Q?)/, { token: "@rematch", next: "pstring" }],
229
- // commands and symbols
230
- [/`/, { token: "string.x.delim", next: "@dstring.x.`" }],
231
- [/:(\w|[$@])\w*[!?=]?/, "string.s"],
232
- [/:"/, { token: "string.s.delim", next: '@dstring.s."' }],
233
- [/:'/, { token: "string.s.delim", next: "@sstring.s" }],
234
- // regular expressions. Lookahead for a (not escaped) closing forwardslash on the same line
235
- [/\/(?=(\\\/|[^\/\n])+\/)/, { token: "regexp.delim", next: "@regexp" }],
236
- // delimiters and operators
237
- [/[{}()\[\]]/, "@brackets"],
238
- [
239
- /@symbols/,
240
- {
241
- cases: {
242
- "@keywordops": "keyword",
243
- "@operators": "operator",
244
- "@default": ""
245
- }
246
- }
247
- ],
248
- [/[;,]/, "delimiter"],
249
- // numbers
250
- [/0[xX][0-9a-fA-F](_?[0-9a-fA-F])*/, "number.hex"],
251
- [/0[_oO][0-7](_?[0-7])*/, "number.octal"],
252
- [/0[bB][01](_?[01])*/, "number.binary"],
253
- [/0[dD]@decpart/, "number"],
254
- [
255
- /@decimal((\.@decpart)?([eE][\-+]?@decpart)?)/,
256
- {
257
- cases: {
258
- $1: "number.float",
259
- "@default": "number"
260
- }
261
- }
262
- ]
263
- ],
264
- // used to not treat a 'do' as a block opener if it occurs on the same
265
- // line as a 'do' statement: 'while|until|for'
266
- // dodecl.<decl> where decl is the declarations started, like 'while'
267
- dodecl: [
268
- [/^/, { token: "", switchTo: "@root.$S2" }],
269
- // get out of do-skipping mode on a new line
270
- [
271
- /[a-z_]\w*[!?=]?/,
272
- {
273
- cases: {
274
- end: { token: "keyword.$S2", next: "@pop" },
275
- // end on same line
276
- do: { token: "keyword", switchTo: "@root.$S2" },
277
- // do on same line: not an open bracket here
278
- "@linedecls": {
279
- token: "@rematch",
280
- switchTo: "@root.$S2"
281
- },
282
- // other declaration on same line: rematch
283
- "@keywords": "keyword",
284
- "@builtins": "predefined",
285
- "@default": "identifier"
286
- }
287
- }
288
- ],
289
- { include: "@root" }
290
- ],
291
- // used to prevent potential modifiers ('if|until|while|unless') to match
292
- // with 'end' keywords.
293
- // modifier.<decl>x where decl is the declaration starter, like 'if'
294
- modifier: [
295
- [/^/, "", "@pop"],
296
- // it was a modifier: get out of modifier mode on a new line
297
- [
298
- /[a-z_]\w*[!?=]?/,
299
- {
300
- cases: {
301
- end: { token: "keyword.$S2", next: "@pop" },
302
- // end on same line
303
- "then|else|elsif|do": {
304
- token: "keyword",
305
- switchTo: "@root.$S2"
306
- },
307
- // real declaration and not a modifier
308
- "@linedecls": {
309
- token: "@rematch",
310
- switchTo: "@root.$S2"
311
- },
312
- // other declaration => not a modifier
313
- "@keywords": "keyword",
314
- "@builtins": "predefined",
315
- "@default": "identifier"
316
- }
317
- }
318
- ],
319
- { include: "@root" }
320
- ],
321
- // single quote strings (also used for symbols)
322
- // sstring.<kind> where kind is 'sq' (single quote) or 's' (symbol)
323
- sstring: [
324
- [/[^\\']+/, "string.$S2"],
325
- [/\\\\|\\'|\\$/, "string.$S2.escape"],
326
- [/\\./, "string.$S2.invalid"],
327
- [/'/, { token: "string.$S2.delim", next: "@pop" }]
328
- ],
329
- // double quoted "string".
330
- // dstring.<kind>.<delim> where kind is 'd' (double quoted), 'x' (command), or 's' (symbol)
331
- // and delim is the ending delimiter (" or `)
332
- dstring: [
333
- [/[^\\`"#]+/, "string.$S2"],
334
- [/#/, "string.$S2.escape", "@interpolated"],
335
- [/\\$/, "string.$S2.escape"],
336
- [/@escapes/, "string.$S2.escape"],
337
- [/\\./, "string.$S2.escape.invalid"],
338
- [
339
- /[`"]/,
340
- {
341
- cases: {
342
- "$#==$S3": { token: "string.$S2.delim", next: "@pop" },
343
- "@default": "string.$S2"
344
- }
345
- }
346
- ]
347
- ],
348
- // literal documents
349
- // heredoc.<close> where close is the closing delimiter
350
- heredoc: [
351
- [
352
- /^(\s*)(@heredelim)$/,
353
- {
354
- cases: {
355
- "$2==$S2": ["string.heredoc", { token: "string.heredoc.delimiter", next: "@pop" }],
356
- "@default": ["string.heredoc", "string.heredoc"]
357
- }
358
- }
359
- ],
360
- [/.*/, "string.heredoc"]
361
- ],
362
- // interpolated sequence
363
- interpolated: [
364
- [/\$\w*/, "global.constant", "@pop"],
365
- [/@\w*/, "namespace.class.identifier", "@pop"],
366
- [/@@@\w*/, "namespace.instance.identifier", "@pop"],
367
- [
368
- /[{]/,
369
- {
370
- token: "string.escape.curly",
371
- switchTo: "@interpolated_compound"
372
- }
373
- ],
374
- ["", "", "@pop"]
375
- // just a # is interpreted as a #
376
- ],
377
- // any code
378
- interpolated_compound: [
379
- [/[}]/, { token: "string.escape.curly", next: "@pop" }],
380
- { include: "@root" }
381
- ],
382
- // %r quoted regexp
383
- // pregexp.<open>.<close> where open/close are the open/close delimiter
384
- pregexp: [
385
- { include: "@whitespace" },
386
- // turns out that you can quote using regex control characters, aargh!
387
- // for example; %r|kgjgaj| is ok (even though | is used for alternation)
388
- // so, we need to match those first
389
- [
390
- /[^\(\{\[\\]/,
391
- {
392
- cases: {
393
- "$#==$S3": { token: "regexp.delim", next: "@pop" },
394
- "$#==$S2": { token: "regexp.delim", next: "@push" },
395
- // nested delimiters are allowed..
396
- "~[)}\\]]": "@brackets.regexp.escape.control",
397
- "~@regexpctl": "regexp.escape.control",
398
- "@default": "regexp"
399
- }
400
- }
401
- ],
402
- { include: "@regexcontrol" }
403
- ],
404
- // We match regular expression quite precisely
405
- regexp: [
406
- { include: "@regexcontrol" },
407
- [/[^\\\/]/, "regexp"],
408
- ["/[ixmp]*", { token: "regexp.delim" }, "@pop"]
409
- ],
410
- regexcontrol: [
411
- [
412
- /(\{)(\d+(?:,\d*)?)(\})/,
413
- [
414
- "@brackets.regexp.escape.control",
415
- "regexp.escape.control",
416
- "@brackets.regexp.escape.control"
417
- ]
418
- ],
419
- [
420
- /(\[)(\^?)/,
421
- ["@brackets.regexp.escape.control", { token: "regexp.escape.control", next: "@regexrange" }]
422
- ],
423
- [/(\()(\?[:=!])/, ["@brackets.regexp.escape.control", "regexp.escape.control"]],
424
- [/\(\?#/, { token: "regexp.escape.control", next: "@regexpcomment" }],
425
- [/[()]/, "@brackets.regexp.escape.control"],
426
- [/@regexpctl/, "regexp.escape.control"],
427
- [/\\$/, "regexp.escape"],
428
- [/@regexpesc/, "regexp.escape"],
429
- [/\\\./, "regexp.invalid"],
430
- [/#/, "regexp.escape", "@interpolated"]
431
- ],
432
- regexrange: [
433
- [/-/, "regexp.escape.control"],
434
- [/\^/, "regexp.invalid"],
435
- [/\\$/, "regexp.escape"],
436
- [/@regexpesc/, "regexp.escape"],
437
- [/[^\]]/, "regexp"],
438
- [/\]/, "@brackets.regexp.escape.control", "@pop"]
439
- ],
440
- regexpcomment: [
441
- [/[^)]+/, "comment"],
442
- [/\)/, { token: "regexp.escape.control", next: "@pop" }]
443
- ],
444
- // % quoted strings
445
- // A bit repetitive since we need to often special case the kind of ending delimiter
446
- pstring: [
447
- [/%([qws])\(/, { token: "string.$1.delim", switchTo: "@qstring.$1.(.)" }],
448
- [/%([qws])\[/, { token: "string.$1.delim", switchTo: "@qstring.$1.[.]" }],
449
- [/%([qws])\{/, { token: "string.$1.delim", switchTo: "@qstring.$1.{.}" }],
450
- [/%([qws])</, { token: "string.$1.delim", switchTo: "@qstring.$1.<.>" }],
451
- [/%([qws])(@delim)/, { token: "string.$1.delim", switchTo: "@qstring.$1.$2.$2" }],
452
- [/%r\(/, { token: "regexp.delim", switchTo: "@pregexp.(.)" }],
453
- [/%r\[/, { token: "regexp.delim", switchTo: "@pregexp.[.]" }],
454
- [/%r\{/, { token: "regexp.delim", switchTo: "@pregexp.{.}" }],
455
- [/%r</, { token: "regexp.delim", switchTo: "@pregexp.<.>" }],
456
- [/%r(@delim)/, { token: "regexp.delim", switchTo: "@pregexp.$1.$1" }],
457
- [/%(x|W|Q?)\(/, { token: "string.$1.delim", switchTo: "@qqstring.$1.(.)" }],
458
- [/%(x|W|Q?)\[/, { token: "string.$1.delim", switchTo: "@qqstring.$1.[.]" }],
459
- [/%(x|W|Q?)\{/, { token: "string.$1.delim", switchTo: "@qqstring.$1.{.}" }],
460
- [/%(x|W|Q?)</, { token: "string.$1.delim", switchTo: "@qqstring.$1.<.>" }],
461
- [/%(x|W|Q?)(@delim)/, { token: "string.$1.delim", switchTo: "@qqstring.$1.$2.$2" }],
462
- [/%([rqwsxW]|Q?)./, { token: "invalid", next: "@pop" }],
463
- // recover
464
- [/./, { token: "invalid", next: "@pop" }]
465
- // recover
466
- ],
467
- // non-expanded quoted string.
468
- // qstring.<kind>.<open>.<close>
469
- // kind = q|w|s (single quote, array, symbol)
470
- // open = open delimiter
471
- // close = close delimiter
472
- qstring: [
473
- [/\\$/, "string.$S2.escape"],
474
- [/\\./, "string.$S2.escape"],
475
- [
476
- /./,
477
- {
478
- cases: {
479
- "$#==$S4": { token: "string.$S2.delim", next: "@pop" },
480
- "$#==$S3": { token: "string.$S2.delim", next: "@push" },
481
- // nested delimiters are allowed..
482
- "@default": "string.$S2"
483
- }
484
- }
485
- ]
486
- ],
487
- // expanded quoted string.
488
- // qqstring.<kind>.<open>.<close>
489
- // kind = Q|W|x (double quote, array, command)
490
- // open = open delimiter
491
- // close = close delimiter
492
- qqstring: [[/#/, "string.$S2.escape", "@interpolated"], { include: "@qstring" }],
493
- // whitespace & comments
494
- whitespace: [
495
- [/[ \t\r\n]+/, ""],
496
- [/^\s*=begin\b/, "comment", "@comment"],
497
- [/#.*$/, "comment"]
498
- ],
499
- comment: [
500
- [/[^=]+/, "comment"],
501
- [/^\s*=begin\b/, "comment.invalid"],
502
- // nested comment
503
- [/^\s*=end\b.*/, "comment", "@pop"],
504
- [/[=]/, "comment"]
505
- ]
506
- }
507
- };
508
- export {
509
- e as conf,
510
- t as language
511
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"[",close:"]"},{open:"{",close:"}"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*#pragma\\s+region\\b"),end:new RegExp("^\\s*#pragma\\s+endregion\\b")}}},t={tokenPostfix:".rust",defaultToken:"invalid",keywords:["as","async","await","box","break","const","continue","crate","dyn","else","enum","extern","false","fn","for","if","impl","in","let","loop","match","mod","move","mut","pub","ref","return","self","static","struct","super","trait","true","try","type","unsafe","use","where","while","catch","default","union","static","abstract","alignof","become","do","final","macro","offsetof","override","priv","proc","pure","sizeof","typeof","unsized","virtual","yield"],typeKeywords:["Self","m32","m64","m128","f80","f16","f128","int","uint","float","char","bool","u8","u16","u32","u64","f32","f64","i8","i16","i32","i64","str","Option","Either","c_float","c_double","c_void","FILE","fpos_t","DIR","dirent","c_char","c_schar","c_uchar","c_short","c_ushort","c_int","c_uint","c_long","c_ulong","size_t","ptrdiff_t","clock_t","time_t","c_longlong","c_ulonglong","intptr_t","uintptr_t","off_t","dev_t","ino_t","pid_t","mode_t","ssize_t"],constants:["true","false","Some","None","Left","Right","Ok","Err"],supportConstants:["EXIT_FAILURE","EXIT_SUCCESS","RAND_MAX","EOF","SEEK_SET","SEEK_CUR","SEEK_END","_IOFBF","_IONBF","_IOLBF","BUFSIZ","FOPEN_MAX","FILENAME_MAX","L_tmpnam","TMP_MAX","O_RDONLY","O_WRONLY","O_RDWR","O_APPEND","O_CREAT","O_EXCL","O_TRUNC","S_IFIFO","S_IFCHR","S_IFBLK","S_IFDIR","S_IFREG","S_IFMT","S_IEXEC","S_IWRITE","S_IREAD","S_IRWXU","S_IXUSR","S_IWUSR","S_IRUSR","F_OK","R_OK","W_OK","X_OK","STDIN_FILENO","STDOUT_FILENO","STDERR_FILENO"],supportMacros:["format!","print!","println!","panic!","format_args!","unreachable!","write!","writeln!"],operators:["!","!=","%","%=","&","&=","&&","*","*=","+","+=","-","-=","->",".","..","...","/","/=",":",";","<<","<<=","<","<=","=","==","=>",">",">=",">>",">>=","@","^","^=","|","|=","||","_","?","#"],escapes:/\\([nrt0\"''\\]|x\h{2}|u\{\h{1,6}\})/,delimiters:/[,]/,symbols:/[\#\!\%\&\*\+\-\.\/\:\;\<\=\>\@\^\|_\?]+/,intSuffixes:/[iu](8|16|32|64|128|size)/,floatSuffixes:/f(32|64)/,tokenizer:{root:[[/r(#*)"/,{token:"string.quote",bracket:"@open",next:"@stringraw.$1"}],[/[a-zA-Z][a-zA-Z0-9_]*!?|_[a-zA-Z0-9_]+/,{cases:{"@typeKeywords":"keyword.type","@keywords":"keyword","@supportConstants":"keyword","@supportMacros":"keyword","@constants":"keyword","@default":"identifier"}}],[/\$/,"identifier"],[/'[a-zA-Z_][a-zA-Z0-9_]*(?=[^\'])/,"identifier"],[/'(\S|@escapes)'/,"string.byteliteral"],[/"/,{token:"string.quote",bracket:"@open",next:"@string"}],{include:"@numbers"},{include:"@whitespace"},[/@delimiters/,{cases:{"@keywords":"keyword","@default":"delimiter"}}],[/[{}()\[\]<>]/,"@brackets"],[/@symbols/,{cases:{"@operators":"operator","@default":""}}]],whitespace:[[/[ \t\r\n]+/,"white"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\/\*/,"comment","@push"],["\\*/","comment","@pop"],[/[\/*]/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],stringraw:[[/[^"#]+/,{token:"string"}],[/"(#*)/,{cases:{"$1==$S2":{token:"string.quote",bracket:"@close",next:"@pop"},"@default":{token:"string"}}}],[/["#]/,{token:"string"}]],numbers:[[/(0o[0-7_]+)(@intSuffixes)?/,{token:"number"}],[/(0b[0-1_]+)(@intSuffixes)?/,{token:"number"}],[/[\d][\d_]*(\.[\d][\d_]*)?[eE][+-][\d_]+(@floatSuffixes)?/,{token:"number"}],[/\b(\d\.?[\d_]*)(@floatSuffixes)?\b/,{token:"number"}],[/(0x[\da-fA-F]+)_?(@intSuffixes)?/,{token:"number"}],[/[\d][\d_]*(@intSuffixes?)?/,{token:"number"}]]}};exports.conf=e;exports.language=t;