online-compiler-widget 0.0.4 → 1.0.2

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 (161) hide show
  1. package/dist/abap-CrvW7_qN.js +1398 -0
  2. package/dist/apex-BAOI8p1v.js +327 -0
  3. package/dist/assets/css.worker-Cb0JI69t.js +93 -0
  4. package/dist/assets/html.worker-BNFZMwEc.js +470 -0
  5. package/dist/assets/json.worker-BCybXpia.js +58 -0
  6. package/dist/assets/ts.worker-DAVh1bw1.js +67731 -0
  7. package/dist/azcli-BlCk_UqW.js +68 -0
  8. package/dist/bat-DPoEelVx.js +100 -0
  9. package/dist/bicep-Cp1F394l.js +102 -0
  10. package/dist/cameligo-CWqtSlQs.js +174 -0
  11. package/dist/clojure-CKBp32Gf.js +761 -0
  12. package/dist/coffee-CDo6vc-J.js +232 -0
  13. package/dist/cpp-DokufPgf.js +389 -0
  14. package/dist/csharp-BQi3szM0.js +326 -0
  15. package/dist/csp-BSGtCCZ-.js +53 -0
  16. package/dist/css-DEPFDJfb.js +187 -0
  17. package/dist/cssMode-nHrB9Mnr.js +141 -0
  18. package/dist/cypher-DAb1vOxS.js +263 -0
  19. package/dist/dart-C8p4jewR.js +281 -0
  20. package/dist/dockerfile-DP0iLFPN.js +130 -0
  21. package/dist/ecl-BDQHA6fi.js +456 -0
  22. package/dist/elixir-D4II6kDM.js +569 -0
  23. package/dist/flow9-StcnL-VB.js +142 -0
  24. package/dist/freemarker2-BoiXdkJM.js +982 -0
  25. package/dist/fsharp-DdUVp3EN.js +217 -0
  26. package/dist/go-D1-I258M.js +218 -0
  27. package/dist/graphql-DWkL3f8U.js +151 -0
  28. package/dist/handlebars-C7PJzkmo.js +412 -0
  29. package/dist/hcl-D_0MNifv.js +183 -0
  30. package/dist/html-D_xe_tUa.js +301 -0
  31. package/dist/htmlMode-Dk_luXu_.js +152 -0
  32. package/dist/index-Ds0EJmOd.js +129200 -0
  33. package/dist/index.js +14 -0
  34. package/dist/ini-C4I2-MT7.js +71 -0
  35. package/dist/java-OBvaP_SS.js +232 -0
  36. package/dist/javascript-CUK67ITD.js +70 -0
  37. package/dist/jsonMode-BIAYTpVF.js +569 -0
  38. package/dist/julia-BmDH8Kkf.js +511 -0
  39. package/dist/kotlin-Dhu5AGOD.js +252 -0
  40. package/dist/less-CzmjXREq.js +162 -0
  41. package/dist/lexon-CV2c4pN9.js +157 -0
  42. package/dist/liquid-Cgsk8EmK.js +233 -0
  43. package/dist/lspLanguageFeatures-HqO1l9Me.js +1458 -0
  44. package/dist/lua-CFY5U8qF.js +162 -0
  45. package/dist/m3-BL_AnZVh.js +210 -0
  46. package/dist/markdown-CWKQPXCv.js +229 -0
  47. package/dist/mdx-QboWmT4M.js +158 -0
  48. package/dist/mips-ButYmJ5E.js +198 -0
  49. package/dist/msdax-C3cnXqDh.js +375 -0
  50. package/dist/mysql-YlSHaf6G.js +878 -0
  51. package/dist/objective-c-Dwnlproe.js +183 -0
  52. package/dist/pascal-UzGbSWEN.js +251 -0
  53. package/dist/pascaligo-CslTgu68.js +164 -0
  54. package/dist/perl-oj6r_mgw.js +626 -0
  55. package/dist/pgsql-DSBO0Mev.js +851 -0
  56. package/dist/php-YzCD--7j.js +500 -0
  57. package/dist/pla-CmylB8vQ.js +137 -0
  58. package/dist/postiats-CLFW5gNY.js +907 -0
  59. package/dist/powerquery-CmOWUvlh.js +890 -0
  60. package/dist/powershell-fHQcmBLK.js +239 -0
  61. package/dist/protobuf-p5BArb-9.js +420 -0
  62. package/dist/pug-gVdUDvqf.js +402 -0
  63. package/dist/python-kIZaMFF7.js +294 -0
  64. package/dist/qsharp-DnrWSUlt.js +301 -0
  65. package/dist/r-Cv309K2z.js +243 -0
  66. package/dist/razor-ms2cCMGp.js +543 -0
  67. package/dist/redis-DTcS4wMj.js +302 -0
  68. package/dist/redshift-hLxZVESM.js +809 -0
  69. package/dist/restructuredtext-C898lK4f.js +174 -0
  70. package/dist/ruby-CgKtnJIQ.js +511 -0
  71. package/dist/rust-bj8oxVnh.js +343 -0
  72. package/dist/sb-DWynz26l.js +115 -0
  73. package/dist/scala-BL5z1UEd.js +370 -0
  74. package/dist/scheme-DUJsH6VU.js +108 -0
  75. package/dist/scss-CxjmhvaL.js +262 -0
  76. package/dist/shell-D14Zs1dF.js +221 -0
  77. package/dist/solidity-WyRm-BGK.js +1367 -0
  78. package/dist/sophia-CKk-_Oa5.js +199 -0
  79. package/dist/sparql-DHtmINMZ.js +201 -0
  80. package/dist/sql-Dqaj5JHC.js +853 -0
  81. package/dist/st-Bj2IIaop.js +416 -0
  82. package/dist/style.css +1 -0
  83. package/dist/swift-DwxP72iM.js +312 -0
  84. package/dist/systemverilog-D7wJfuql.js +576 -0
  85. package/dist/tcl-0ApMt-eC.js +232 -0
  86. package/dist/tsMode-BiXWAJYS.js +946 -0
  87. package/dist/twig-DxwbdmvQ.js +392 -0
  88. package/dist/typescript-ByMmjZ38.js +336 -0
  89. package/dist/typespec-Fd-JwSuS.js +117 -0
  90. package/dist/vb-CxuyYE1I.js +372 -0
  91. package/dist/wgsl-DoEGc31J.js +439 -0
  92. package/dist/xml-iOXTZgNN.js +88 -0
  93. package/dist/yaml-RRlyy-QW.js +199 -0
  94. package/package.json +41 -36
  95. package/FileStorage/obj/FileStorage.csproj.EntityFrameworkCore.targets +0 -28
  96. package/README.md +0 -1
  97. package/eslint.config.js +0 -26
  98. package/index.html +0 -13
  99. package/index.tsx +0 -3
  100. package/openapitools.json +0 -7
  101. package/pnpm-workspace.yaml +0 -2
  102. package/public/vite.svg +0 -1
  103. package/src/App.css +0 -49
  104. package/src/App.tsx +0 -84
  105. package/src/api/.openapi-generator/FILES +0 -25
  106. package/src/api/.openapi-generator/VERSION +0 -1
  107. package/src/api/.openapi-generator-ignore +0 -23
  108. package/src/api/api.ts +0 -1312
  109. package/src/api/base.ts +0 -62
  110. package/src/api/common.ts +0 -113
  111. package/src/api/configuration.ts +0 -121
  112. package/src/api/docs/CompilationError.md +0 -26
  113. package/src/api/docs/CompileRequest.md +0 -22
  114. package/src/api/docs/CompileResult.md +0 -28
  115. package/src/api/docs/CompilerApi.md +0 -263
  116. package/src/api/docs/CreateFileDto.md +0 -22
  117. package/src/api/docs/CreateProjectRequest.md +0 -20
  118. package/src/api/docs/FileApi.md +0 -274
  119. package/src/api/docs/ProcessStatus.md +0 -28
  120. package/src/api/docs/ProjectApi.md +0 -362
  121. package/src/api/docs/ProjectInfo.md +0 -24
  122. package/src/api/docs/ProjectStats.md +0 -28
  123. package/src/api/docs/RenameFileDto.md +0 -20
  124. package/src/api/docs/RenameProjectRequest.md +0 -20
  125. package/src/api/docs/RunRequest.md +0 -24
  126. package/src/api/docs/RunResult.md +0 -30
  127. package/src/api/docs/RunningProjectInfo.md +0 -26
  128. package/src/api/docs/UpdateFileDto.md +0 -20
  129. package/src/api/git_push.sh +0 -57
  130. package/src/api/index.ts +0 -18
  131. package/src/assets/Badge.svg +0 -17
  132. package/src/assets/closeIcon.svg +0 -20
  133. package/src/assets/documentIcon.svg +0 -11
  134. package/src/assets/history.svg +0 -11
  135. package/src/assets/output.svg +0 -12
  136. package/src/assets/plus.svg +0 -20
  137. package/src/assets/react.svg +0 -1
  138. package/src/assets/save-icon.svg +0 -11
  139. package/src/assets/shield.svg +0 -10
  140. package/src/assets/start.svg +0 -11
  141. package/src/assets/stop.svg +0 -11
  142. package/src/components/CompilerWidget.module.scss +0 -169
  143. package/src/components/CompilerWidget.tsx +0 -331
  144. package/src/components/FileExplorer.module.scss +0 -372
  145. package/src/components/FileExplorer.tsx +0 -285
  146. package/src/components/MonacoEditorWrapper.module.scss +0 -29
  147. package/src/components/MonacoEditorWrapper.tsx +0 -74
  148. package/src/components/OutputPanel.module.scss +0 -123
  149. package/src/components/OutputPanel.tsx +0 -53
  150. package/src/components/RunContainer.module.scss +0 -150
  151. package/src/components/RunContainer.tsx +0 -34
  152. package/src/hooks/useCompiler.ts +0 -228
  153. package/src/hooks/useInitialNodes.ts +0 -0
  154. package/src/index.css +0 -78
  155. package/src/main.tsx +0 -8
  156. package/src/types/EditorDocument.ts +0 -8
  157. package/swagger.json +0 -1020
  158. package/tsconfig.app.json +0 -29
  159. package/tsconfig.json +0 -7
  160. package/tsconfig.node.json +0 -26
  161. package/vite.config.ts +0 -8
@@ -0,0 +1,336 @@
1
+ import { l as e } from "./index-Ds0EJmOd.js";
2
+ const n = {
3
+ wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
4
+ comments: {
5
+ lineComment: "//",
6
+ blockComment: ["/*", "*/"]
7
+ },
8
+ brackets: [
9
+ ["{", "}"],
10
+ ["[", "]"],
11
+ ["(", ")"]
12
+ ],
13
+ onEnterRules: [
14
+ {
15
+ // e.g. /** | */
16
+ beforeText: /^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,
17
+ afterText: /^\s*\*\/$/,
18
+ action: {
19
+ indentAction: e.IndentAction.IndentOutdent,
20
+ appendText: " * "
21
+ }
22
+ },
23
+ {
24
+ // e.g. /** ...|
25
+ beforeText: /^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,
26
+ action: {
27
+ indentAction: e.IndentAction.None,
28
+ appendText: " * "
29
+ }
30
+ },
31
+ {
32
+ // e.g. * ...|
33
+ beforeText: /^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,
34
+ action: {
35
+ indentAction: e.IndentAction.None,
36
+ appendText: "* "
37
+ }
38
+ },
39
+ {
40
+ // e.g. */|
41
+ beforeText: /^(\t|(\ \ ))*\ \*\/\s*$/,
42
+ action: {
43
+ indentAction: e.IndentAction.None,
44
+ removeText: 1
45
+ }
46
+ }
47
+ ],
48
+ autoClosingPairs: [
49
+ { open: "{", close: "}" },
50
+ { open: "[", close: "]" },
51
+ { open: "(", close: ")" },
52
+ { open: '"', close: '"', notIn: ["string"] },
53
+ { open: "'", close: "'", notIn: ["string", "comment"] },
54
+ { open: "`", close: "`", notIn: ["string", "comment"] },
55
+ { open: "/**", close: " */", notIn: ["string"] }
56
+ ],
57
+ folding: {
58
+ markers: {
59
+ start: new RegExp("^\\s*//\\s*#?region\\b"),
60
+ end: new RegExp("^\\s*//\\s*#?endregion\\b")
61
+ }
62
+ }
63
+ }, o = {
64
+ // Set defaultToken to invalid to see what you do not tokenize yet
65
+ defaultToken: "invalid",
66
+ tokenPostfix: ".ts",
67
+ keywords: [
68
+ // Should match the keys of textToKeywordObj in
69
+ // https://github.com/microsoft/TypeScript/blob/master/src/compiler/scanner.ts
70
+ "abstract",
71
+ "any",
72
+ "as",
73
+ "asserts",
74
+ "bigint",
75
+ "boolean",
76
+ "break",
77
+ "case",
78
+ "catch",
79
+ "class",
80
+ "continue",
81
+ "const",
82
+ "constructor",
83
+ "debugger",
84
+ "declare",
85
+ "default",
86
+ "delete",
87
+ "do",
88
+ "else",
89
+ "enum",
90
+ "export",
91
+ "extends",
92
+ "false",
93
+ "finally",
94
+ "for",
95
+ "from",
96
+ "function",
97
+ "get",
98
+ "if",
99
+ "implements",
100
+ "import",
101
+ "in",
102
+ "infer",
103
+ "instanceof",
104
+ "interface",
105
+ "is",
106
+ "keyof",
107
+ "let",
108
+ "module",
109
+ "namespace",
110
+ "never",
111
+ "new",
112
+ "null",
113
+ "number",
114
+ "object",
115
+ "out",
116
+ "package",
117
+ "private",
118
+ "protected",
119
+ "public",
120
+ "override",
121
+ "readonly",
122
+ "require",
123
+ "global",
124
+ "return",
125
+ "satisfies",
126
+ "set",
127
+ "static",
128
+ "string",
129
+ "super",
130
+ "switch",
131
+ "symbol",
132
+ "this",
133
+ "throw",
134
+ "true",
135
+ "try",
136
+ "type",
137
+ "typeof",
138
+ "undefined",
139
+ "unique",
140
+ "unknown",
141
+ "var",
142
+ "void",
143
+ "while",
144
+ "with",
145
+ "yield",
146
+ "async",
147
+ "await",
148
+ "of"
149
+ ],
150
+ operators: [
151
+ "<=",
152
+ ">=",
153
+ "==",
154
+ "!=",
155
+ "===",
156
+ "!==",
157
+ "=>",
158
+ "+",
159
+ "-",
160
+ "**",
161
+ "*",
162
+ "/",
163
+ "%",
164
+ "++",
165
+ "--",
166
+ "<<",
167
+ "</",
168
+ ">>",
169
+ ">>>",
170
+ "&",
171
+ "|",
172
+ "^",
173
+ "!",
174
+ "~",
175
+ "&&",
176
+ "||",
177
+ "??",
178
+ "?",
179
+ ":",
180
+ "=",
181
+ "+=",
182
+ "-=",
183
+ "*=",
184
+ "**=",
185
+ "/=",
186
+ "%=",
187
+ "<<=",
188
+ ">>=",
189
+ ">>>=",
190
+ "&=",
191
+ "|=",
192
+ "^=",
193
+ "@"
194
+ ],
195
+ // we include these common regular expressions
196
+ symbols: /[=><!~?:&|+\-*\/\^%]+/,
197
+ escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
198
+ digits: /\d+(_+\d+)*/,
199
+ octaldigits: /[0-7]+(_+[0-7]+)*/,
200
+ binarydigits: /[0-1]+(_+[0-1]+)*/,
201
+ hexdigits: /[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,
202
+ regexpctl: /[(){}\[\]\$\^|\-*+?\.]/,
203
+ regexpesc: /\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/,
204
+ // The main tokenizer for our languages
205
+ tokenizer: {
206
+ root: [[/[{}]/, "delimiter.bracket"], { include: "common" }],
207
+ common: [
208
+ // identifiers and keywords
209
+ [
210
+ /#?[a-z_$][\w$]*/,
211
+ {
212
+ cases: {
213
+ "@keywords": "keyword",
214
+ "@default": "identifier"
215
+ }
216
+ }
217
+ ],
218
+ [/[A-Z][\w\$]*/, "type.identifier"],
219
+ // to show class names nicely
220
+ // [/[A-Z][\w\$]*/, 'identifier'],
221
+ // whitespace
222
+ { include: "@whitespace" },
223
+ // regular expression: ensure it is terminated before beginning (otherwise it is an opeator)
224
+ [
225
+ /\/(?=([^\\\/]|\\.)+\/([dgimsuy]*)(\s*)(\.|;|,|\)|\]|\}|$))/,
226
+ { token: "regexp", bracket: "@open", next: "@regexp" }
227
+ ],
228
+ // delimiters and operators
229
+ [/[()\[\]]/, "@brackets"],
230
+ [/[<>](?!@symbols)/, "@brackets"],
231
+ [/!(?=([^=]|$))/, "delimiter"],
232
+ [
233
+ /@symbols/,
234
+ {
235
+ cases: {
236
+ "@operators": "delimiter",
237
+ "@default": ""
238
+ }
239
+ }
240
+ ],
241
+ // numbers
242
+ [/(@digits)[eE]([\-+]?(@digits))?/, "number.float"],
243
+ [/(@digits)\.(@digits)([eE][\-+]?(@digits))?/, "number.float"],
244
+ [/0[xX](@hexdigits)n?/, "number.hex"],
245
+ [/0[oO]?(@octaldigits)n?/, "number.octal"],
246
+ [/0[bB](@binarydigits)n?/, "number.binary"],
247
+ [/(@digits)n?/, "number"],
248
+ // delimiter: after number because of .\d floats
249
+ [/[;,.]/, "delimiter"],
250
+ // strings
251
+ [/"([^"\\]|\\.)*$/, "string.invalid"],
252
+ // non-teminated string
253
+ [/'([^'\\]|\\.)*$/, "string.invalid"],
254
+ // non-teminated string
255
+ [/"/, "string", "@string_double"],
256
+ [/'/, "string", "@string_single"],
257
+ [/`/, "string", "@string_backtick"]
258
+ ],
259
+ whitespace: [
260
+ [/[ \t\r\n]+/, ""],
261
+ [/\/\*\*(?!\/)/, "comment.doc", "@jsdoc"],
262
+ [/\/\*/, "comment", "@comment"],
263
+ [/\/\/.*$/, "comment"]
264
+ ],
265
+ comment: [
266
+ [/[^\/*]+/, "comment"],
267
+ [/\*\//, "comment", "@pop"],
268
+ [/[\/*]/, "comment"]
269
+ ],
270
+ jsdoc: [
271
+ [/[^\/*]+/, "comment.doc"],
272
+ [/\*\//, "comment.doc", "@pop"],
273
+ [/[\/*]/, "comment.doc"]
274
+ ],
275
+ // We match regular expression quite precisely
276
+ regexp: [
277
+ [
278
+ /(\{)(\d+(?:,\d*)?)(\})/,
279
+ ["regexp.escape.control", "regexp.escape.control", "regexp.escape.control"]
280
+ ],
281
+ [
282
+ /(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,
283
+ ["regexp.escape.control", { token: "regexp.escape.control", next: "@regexrange" }]
284
+ ],
285
+ [/(\()(\?:|\?=|\?!)/, ["regexp.escape.control", "regexp.escape.control"]],
286
+ [/[()]/, "regexp.escape.control"],
287
+ [/@regexpctl/, "regexp.escape.control"],
288
+ [/[^\\\/]/, "regexp"],
289
+ [/@regexpesc/, "regexp.escape"],
290
+ [/\\\./, "regexp.invalid"],
291
+ [/(\/)([dgimsuy]*)/, [{ token: "regexp", bracket: "@close", next: "@pop" }, "keyword.other"]]
292
+ ],
293
+ regexrange: [
294
+ [/-/, "regexp.escape.control"],
295
+ [/\^/, "regexp.invalid"],
296
+ [/@regexpesc/, "regexp.escape"],
297
+ [/[^\]]/, "regexp"],
298
+ [
299
+ /\]/,
300
+ {
301
+ token: "regexp.escape.control",
302
+ next: "@pop",
303
+ bracket: "@close"
304
+ }
305
+ ]
306
+ ],
307
+ string_double: [
308
+ [/[^\\"]+/, "string"],
309
+ [/@escapes/, "string.escape"],
310
+ [/\\./, "string.escape.invalid"],
311
+ [/"/, "string", "@pop"]
312
+ ],
313
+ string_single: [
314
+ [/[^\\']+/, "string"],
315
+ [/@escapes/, "string.escape"],
316
+ [/\\./, "string.escape.invalid"],
317
+ [/'/, "string", "@pop"]
318
+ ],
319
+ string_backtick: [
320
+ [/\$\{/, { token: "delimiter.bracket", next: "@bracketCounting" }],
321
+ [/[^\\`$]+/, "string"],
322
+ [/@escapes/, "string.escape"],
323
+ [/\\./, "string.escape.invalid"],
324
+ [/`/, "string", "@pop"]
325
+ ],
326
+ bracketCounting: [
327
+ [/\{/, "delimiter.bracket", "@bracketCounting"],
328
+ [/\}/, "delimiter.bracket", "@pop"],
329
+ { include: "common" }
330
+ ]
331
+ }
332
+ };
333
+ export {
334
+ n as conf,
335
+ o as language
336
+ };
@@ -0,0 +1,117 @@
1
+ const o = (e) => `\\b${e}\\b`, n = (e) => `(?!${e})`, i = "[_a-zA-Z]", r = "[_a-zA-Z0-9]", t = o(`${i}${r}*`), s = o("[_a-zA-Z-0-9]+"), c = [
2
+ "import",
3
+ "model",
4
+ "scalar",
5
+ "namespace",
6
+ "op",
7
+ "interface",
8
+ "union",
9
+ "using",
10
+ "is",
11
+ "extends",
12
+ "enum",
13
+ "alias",
14
+ "return",
15
+ "void",
16
+ "if",
17
+ "else",
18
+ "projection",
19
+ "dec",
20
+ "extern",
21
+ "fn"
22
+ ], a = ["true", "false", "null", "unknown", "never"], g = "[ \\t\\r\\n]", l = "[0-9]+", k = {
23
+ comments: {
24
+ lineComment: "//",
25
+ blockComment: ["/*", "*/"]
26
+ },
27
+ brackets: [
28
+ ["{", "}"],
29
+ ["[", "]"],
30
+ ["(", ")"]
31
+ ],
32
+ autoClosingPairs: [
33
+ { open: "{", close: "}" },
34
+ { open: "[", close: "]" },
35
+ { open: "(", close: ")" },
36
+ { open: '"', close: '"' },
37
+ { open: "/**", close: " */", notIn: ["string"] }
38
+ ],
39
+ surroundingPairs: [
40
+ { open: "{", close: "}" },
41
+ { open: "[", close: "]" },
42
+ { open: "(", close: ")" },
43
+ { open: '"', close: '"' }
44
+ ],
45
+ indentationRules: {
46
+ decreaseIndentPattern: new RegExp("^((?!.*?/\\*).*\\*/)?\\s*[\\}\\]].*$"),
47
+ increaseIndentPattern: new RegExp(
48
+ "^((?!//).)*(\\{([^}\"'`/]*|(\\t|[ ])*//.*)|\\([^)\"'`/]*|\\[[^\\]\"'`/]*)$"
49
+ ),
50
+ // e.g. * ...| or */| or *-----*/|
51
+ unIndentedLinePattern: new RegExp(
52
+ "^(\\t|[ ])*[ ]\\*[^/]*\\*/\\s*$|^(\\t|[ ])*[ ]\\*/\\s*$|^(\\t|[ ])*[ ]\\*([ ]([^\\*]|\\*(?!/))*)?$"
53
+ )
54
+ }
55
+ }, x = {
56
+ defaultToken: "",
57
+ tokenPostfix: ".tsp",
58
+ brackets: [
59
+ { open: "{", close: "}", token: "delimiter.curly" },
60
+ { open: "[", close: "]", token: "delimiter.square" },
61
+ { open: "(", close: ")", token: "delimiter.parenthesis" }
62
+ ],
63
+ symbols: /[=:;<>]+/,
64
+ keywords: c,
65
+ namedLiterals: a,
66
+ escapes: '\\\\(u{[0-9A-Fa-f]+}|n|r|t|\\\\|"|\\${)',
67
+ tokenizer: {
68
+ root: [{ include: "@expression" }, { include: "@whitespace" }],
69
+ stringVerbatim: [
70
+ { regex: '(|"|"")[^"]', action: { token: "string" } },
71
+ { regex: `"""${n('"')}`, action: { token: "string", next: "@pop" } }
72
+ ],
73
+ stringLiteral: [
74
+ { regex: "\\${", action: { token: "delimiter.bracket", next: "@bracketCounting" } },
75
+ { regex: '[^\\\\"$]+', action: { token: "string" } },
76
+ { regex: "@escapes", action: { token: "string.escape" } },
77
+ { regex: "\\\\.", action: { token: "string.escape.invalid" } },
78
+ { regex: '"', action: { token: "string", next: "@pop" } }
79
+ ],
80
+ bracketCounting: [
81
+ { regex: "{", action: { token: "delimiter.bracket", next: "@bracketCounting" } },
82
+ { regex: "}", action: { token: "delimiter.bracket", next: "@pop" } },
83
+ { include: "@expression" }
84
+ ],
85
+ comment: [
86
+ { regex: "[^\\*]+", action: { token: "comment" } },
87
+ { regex: "\\*\\/", action: { token: "comment", next: "@pop" } },
88
+ { regex: "[\\/*]", action: { token: "comment" } }
89
+ ],
90
+ whitespace: [
91
+ { regex: g },
92
+ { regex: "\\/\\*", action: { token: "comment", next: "@comment" } },
93
+ { regex: "\\/\\/.*$", action: { token: "comment" } }
94
+ ],
95
+ expression: [
96
+ { regex: '"""', action: { token: "string", next: "@stringVerbatim" } },
97
+ { regex: `"${n('""')}`, action: { token: "string", next: "@stringLiteral" } },
98
+ { regex: l, action: { token: "number" } },
99
+ {
100
+ regex: t,
101
+ action: {
102
+ cases: {
103
+ "@keywords": { token: "keyword" },
104
+ "@namedLiterals": { token: "keyword" },
105
+ "@default": { token: "identifier" }
106
+ }
107
+ }
108
+ },
109
+ { regex: `@${t}`, action: { token: "tag" } },
110
+ { regex: `#${s}`, action: { token: "directive" } }
111
+ ]
112
+ }
113
+ };
114
+ export {
115
+ k as conf,
116
+ x as language
117
+ };