online-compiler-widget 0.0.3 → 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 -279
  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,500 @@
1
+ const e = {
2
+ wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
3
+ comments: {
4
+ lineComment: "//",
5
+ blockComment: ["/*", "*/"]
6
+ },
7
+ brackets: [
8
+ ["{", "}"],
9
+ ["[", "]"],
10
+ ["(", ")"]
11
+ ],
12
+ autoClosingPairs: [
13
+ { open: "{", close: "}", notIn: ["string"] },
14
+ { open: "[", close: "]", notIn: ["string"] },
15
+ { open: "(", close: ")", notIn: ["string"] },
16
+ { open: '"', close: '"', notIn: ["string"] },
17
+ { open: "'", close: "'", notIn: ["string", "comment"] }
18
+ ],
19
+ folding: {
20
+ markers: {
21
+ start: new RegExp("^\\s*(#|//)region\\b"),
22
+ end: new RegExp("^\\s*(#|//)endregion\\b")
23
+ }
24
+ }
25
+ }, t = {
26
+ defaultToken: "",
27
+ tokenPostfix: "",
28
+ // ignoreCase: true,
29
+ // The main tokenizer for our languages
30
+ tokenizer: {
31
+ root: [
32
+ [/<\?((php)|=)?/, { token: "@rematch", switchTo: "@phpInSimpleState.root" }],
33
+ [/<!DOCTYPE/, "metatag.html", "@doctype"],
34
+ [/<!--/, "comment.html", "@comment"],
35
+ [/(<)(\w+)(\/>)/, ["delimiter.html", "tag.html", "delimiter.html"]],
36
+ [/(<)(script)/, ["delimiter.html", { token: "tag.html", next: "@script" }]],
37
+ [/(<)(style)/, ["delimiter.html", { token: "tag.html", next: "@style" }]],
38
+ [/(<)([:\w]+)/, ["delimiter.html", { token: "tag.html", next: "@otherTag" }]],
39
+ [/(<\/)(\w+)/, ["delimiter.html", { token: "tag.html", next: "@otherTag" }]],
40
+ [/</, "delimiter.html"],
41
+ [/[^<]+/]
42
+ // text
43
+ ],
44
+ doctype: [
45
+ [/<\?((php)|=)?/, { token: "@rematch", switchTo: "@phpInSimpleState.comment" }],
46
+ [/[^>]+/, "metatag.content.html"],
47
+ [/>/, "metatag.html", "@pop"]
48
+ ],
49
+ comment: [
50
+ [/<\?((php)|=)?/, { token: "@rematch", switchTo: "@phpInSimpleState.comment" }],
51
+ [/-->/, "comment.html", "@pop"],
52
+ [/[^-]+/, "comment.content.html"],
53
+ [/./, "comment.content.html"]
54
+ ],
55
+ otherTag: [
56
+ [/<\?((php)|=)?/, { token: "@rematch", switchTo: "@phpInSimpleState.otherTag" }],
57
+ [/\/?>/, "delimiter.html", "@pop"],
58
+ [/"([^"]*)"/, "attribute.value"],
59
+ [/'([^']*)'/, "attribute.value"],
60
+ [/[\w\-]+/, "attribute.name"],
61
+ [/=/, "delimiter"],
62
+ [/[ \t\r\n]+/]
63
+ // whitespace
64
+ ],
65
+ // -- BEGIN <script> tags handling
66
+ // After <script
67
+ script: [
68
+ [/<\?((php)|=)?/, { token: "@rematch", switchTo: "@phpInSimpleState.script" }],
69
+ [/type/, "attribute.name", "@scriptAfterType"],
70
+ [/"([^"]*)"/, "attribute.value"],
71
+ [/'([^']*)'/, "attribute.value"],
72
+ [/[\w\-]+/, "attribute.name"],
73
+ [/=/, "delimiter"],
74
+ [
75
+ />/,
76
+ {
77
+ token: "delimiter.html",
78
+ next: "@scriptEmbedded.text/javascript",
79
+ nextEmbedded: "text/javascript"
80
+ }
81
+ ],
82
+ [/[ \t\r\n]+/],
83
+ // whitespace
84
+ [
85
+ /(<\/)(script\s*)(>)/,
86
+ ["delimiter.html", "tag.html", { token: "delimiter.html", next: "@pop" }]
87
+ ]
88
+ ],
89
+ // After <script ... type
90
+ scriptAfterType: [
91
+ [
92
+ /<\?((php)|=)?/,
93
+ {
94
+ token: "@rematch",
95
+ switchTo: "@phpInSimpleState.scriptAfterType"
96
+ }
97
+ ],
98
+ [/=/, "delimiter", "@scriptAfterTypeEquals"],
99
+ [
100
+ />/,
101
+ {
102
+ token: "delimiter.html",
103
+ next: "@scriptEmbedded.text/javascript",
104
+ nextEmbedded: "text/javascript"
105
+ }
106
+ ],
107
+ // cover invalid e.g. <script type>
108
+ [/[ \t\r\n]+/],
109
+ // whitespace
110
+ [/<\/script\s*>/, { token: "@rematch", next: "@pop" }]
111
+ ],
112
+ // After <script ... type =
113
+ scriptAfterTypeEquals: [
114
+ [
115
+ /<\?((php)|=)?/,
116
+ {
117
+ token: "@rematch",
118
+ switchTo: "@phpInSimpleState.scriptAfterTypeEquals"
119
+ }
120
+ ],
121
+ [
122
+ /"([^"]*)"/,
123
+ {
124
+ token: "attribute.value",
125
+ switchTo: "@scriptWithCustomType.$1"
126
+ }
127
+ ],
128
+ [
129
+ /'([^']*)'/,
130
+ {
131
+ token: "attribute.value",
132
+ switchTo: "@scriptWithCustomType.$1"
133
+ }
134
+ ],
135
+ [
136
+ />/,
137
+ {
138
+ token: "delimiter.html",
139
+ next: "@scriptEmbedded.text/javascript",
140
+ nextEmbedded: "text/javascript"
141
+ }
142
+ ],
143
+ // cover invalid e.g. <script type=>
144
+ [/[ \t\r\n]+/],
145
+ // whitespace
146
+ [/<\/script\s*>/, { token: "@rematch", next: "@pop" }]
147
+ ],
148
+ // After <script ... type = $S2
149
+ scriptWithCustomType: [
150
+ [
151
+ /<\?((php)|=)?/,
152
+ {
153
+ token: "@rematch",
154
+ switchTo: "@phpInSimpleState.scriptWithCustomType.$S2"
155
+ }
156
+ ],
157
+ [
158
+ />/,
159
+ {
160
+ token: "delimiter.html",
161
+ next: "@scriptEmbedded.$S2",
162
+ nextEmbedded: "$S2"
163
+ }
164
+ ],
165
+ [/"([^"]*)"/, "attribute.value"],
166
+ [/'([^']*)'/, "attribute.value"],
167
+ [/[\w\-]+/, "attribute.name"],
168
+ [/=/, "delimiter"],
169
+ [/[ \t\r\n]+/],
170
+ // whitespace
171
+ [/<\/script\s*>/, { token: "@rematch", next: "@pop" }]
172
+ ],
173
+ scriptEmbedded: [
174
+ [
175
+ /<\?((php)|=)?/,
176
+ {
177
+ token: "@rematch",
178
+ switchTo: "@phpInEmbeddedState.scriptEmbedded.$S2",
179
+ nextEmbedded: "@pop"
180
+ }
181
+ ],
182
+ [/<\/script/, { token: "@rematch", next: "@pop", nextEmbedded: "@pop" }]
183
+ ],
184
+ // -- END <script> tags handling
185
+ // -- BEGIN <style> tags handling
186
+ // After <style
187
+ style: [
188
+ [/<\?((php)|=)?/, { token: "@rematch", switchTo: "@phpInSimpleState.style" }],
189
+ [/type/, "attribute.name", "@styleAfterType"],
190
+ [/"([^"]*)"/, "attribute.value"],
191
+ [/'([^']*)'/, "attribute.value"],
192
+ [/[\w\-]+/, "attribute.name"],
193
+ [/=/, "delimiter"],
194
+ [
195
+ />/,
196
+ {
197
+ token: "delimiter.html",
198
+ next: "@styleEmbedded.text/css",
199
+ nextEmbedded: "text/css"
200
+ }
201
+ ],
202
+ [/[ \t\r\n]+/],
203
+ // whitespace
204
+ [
205
+ /(<\/)(style\s*)(>)/,
206
+ ["delimiter.html", "tag.html", { token: "delimiter.html", next: "@pop" }]
207
+ ]
208
+ ],
209
+ // After <style ... type
210
+ styleAfterType: [
211
+ [
212
+ /<\?((php)|=)?/,
213
+ {
214
+ token: "@rematch",
215
+ switchTo: "@phpInSimpleState.styleAfterType"
216
+ }
217
+ ],
218
+ [/=/, "delimiter", "@styleAfterTypeEquals"],
219
+ [
220
+ />/,
221
+ {
222
+ token: "delimiter.html",
223
+ next: "@styleEmbedded.text/css",
224
+ nextEmbedded: "text/css"
225
+ }
226
+ ],
227
+ // cover invalid e.g. <style type>
228
+ [/[ \t\r\n]+/],
229
+ // whitespace
230
+ [/<\/style\s*>/, { token: "@rematch", next: "@pop" }]
231
+ ],
232
+ // After <style ... type =
233
+ styleAfterTypeEquals: [
234
+ [
235
+ /<\?((php)|=)?/,
236
+ {
237
+ token: "@rematch",
238
+ switchTo: "@phpInSimpleState.styleAfterTypeEquals"
239
+ }
240
+ ],
241
+ [
242
+ /"([^"]*)"/,
243
+ {
244
+ token: "attribute.value",
245
+ switchTo: "@styleWithCustomType.$1"
246
+ }
247
+ ],
248
+ [
249
+ /'([^']*)'/,
250
+ {
251
+ token: "attribute.value",
252
+ switchTo: "@styleWithCustomType.$1"
253
+ }
254
+ ],
255
+ [
256
+ />/,
257
+ {
258
+ token: "delimiter.html",
259
+ next: "@styleEmbedded.text/css",
260
+ nextEmbedded: "text/css"
261
+ }
262
+ ],
263
+ // cover invalid e.g. <style type=>
264
+ [/[ \t\r\n]+/],
265
+ // whitespace
266
+ [/<\/style\s*>/, { token: "@rematch", next: "@pop" }]
267
+ ],
268
+ // After <style ... type = $S2
269
+ styleWithCustomType: [
270
+ [
271
+ /<\?((php)|=)?/,
272
+ {
273
+ token: "@rematch",
274
+ switchTo: "@phpInSimpleState.styleWithCustomType.$S2"
275
+ }
276
+ ],
277
+ [
278
+ />/,
279
+ {
280
+ token: "delimiter.html",
281
+ next: "@styleEmbedded.$S2",
282
+ nextEmbedded: "$S2"
283
+ }
284
+ ],
285
+ [/"([^"]*)"/, "attribute.value"],
286
+ [/'([^']*)'/, "attribute.value"],
287
+ [/[\w\-]+/, "attribute.name"],
288
+ [/=/, "delimiter"],
289
+ [/[ \t\r\n]+/],
290
+ // whitespace
291
+ [/<\/style\s*>/, { token: "@rematch", next: "@pop" }]
292
+ ],
293
+ styleEmbedded: [
294
+ [
295
+ /<\?((php)|=)?/,
296
+ {
297
+ token: "@rematch",
298
+ switchTo: "@phpInEmbeddedState.styleEmbedded.$S2",
299
+ nextEmbedded: "@pop"
300
+ }
301
+ ],
302
+ [/<\/style/, { token: "@rematch", next: "@pop", nextEmbedded: "@pop" }]
303
+ ],
304
+ // -- END <style> tags handling
305
+ phpInSimpleState: [
306
+ [/<\?((php)|=)?/, "metatag.php"],
307
+ [/\?>/, { token: "metatag.php", switchTo: "@$S2.$S3" }],
308
+ { include: "phpRoot" }
309
+ ],
310
+ phpInEmbeddedState: [
311
+ [/<\?((php)|=)?/, "metatag.php"],
312
+ [
313
+ /\?>/,
314
+ {
315
+ token: "metatag.php",
316
+ switchTo: "@$S2.$S3",
317
+ nextEmbedded: "$S3"
318
+ }
319
+ ],
320
+ { include: "phpRoot" }
321
+ ],
322
+ phpRoot: [
323
+ [
324
+ /[a-zA-Z_]\w*/,
325
+ {
326
+ cases: {
327
+ "@phpKeywords": { token: "keyword.php" },
328
+ "@phpCompileTimeConstants": { token: "constant.php" },
329
+ "@default": "identifier.php"
330
+ }
331
+ }
332
+ ],
333
+ [
334
+ /[$a-zA-Z_]\w*/,
335
+ {
336
+ cases: {
337
+ "@phpPreDefinedVariables": {
338
+ token: "variable.predefined.php"
339
+ },
340
+ "@default": "variable.php"
341
+ }
342
+ }
343
+ ],
344
+ // brackets
345
+ [/[{}]/, "delimiter.bracket.php"],
346
+ [/[\[\]]/, "delimiter.array.php"],
347
+ [/[()]/, "delimiter.parenthesis.php"],
348
+ // whitespace
349
+ [/[ \t\r\n]+/],
350
+ // comments
351
+ [/(#|\/\/)$/, "comment.php"],
352
+ [/(#|\/\/)/, "comment.php", "@phpLineComment"],
353
+ // block comments
354
+ [/\/\*/, "comment.php", "@phpComment"],
355
+ // strings
356
+ [/"/, "string.php", "@phpDoubleQuoteString"],
357
+ [/'/, "string.php", "@phpSingleQuoteString"],
358
+ // delimiters
359
+ [/[\+\-\*\%\&\|\^\~\!\=\<\>\/\?\;\:\.\,\@]/, "delimiter.php"],
360
+ // numbers
361
+ [/\d*\d+[eE]([\-+]?\d+)?/, "number.float.php"],
362
+ [/\d*\.\d+([eE][\-+]?\d+)?/, "number.float.php"],
363
+ [/0[xX][0-9a-fA-F']*[0-9a-fA-F]/, "number.hex.php"],
364
+ [/0[0-7']*[0-7]/, "number.octal.php"],
365
+ [/0[bB][0-1']*[0-1]/, "number.binary.php"],
366
+ [/\d[\d']*/, "number.php"],
367
+ [/\d/, "number.php"]
368
+ ],
369
+ phpComment: [
370
+ [/\*\//, "comment.php", "@pop"],
371
+ [/[^*]+/, "comment.php"],
372
+ [/./, "comment.php"]
373
+ ],
374
+ phpLineComment: [
375
+ [/\?>/, { token: "@rematch", next: "@pop" }],
376
+ [/.$/, "comment.php", "@pop"],
377
+ [/[^?]+$/, "comment.php", "@pop"],
378
+ [/[^?]+/, "comment.php"],
379
+ [/./, "comment.php"]
380
+ ],
381
+ phpDoubleQuoteString: [
382
+ [/[^\\"]+/, "string.php"],
383
+ [/@escapes/, "string.escape.php"],
384
+ [/\\./, "string.escape.invalid.php"],
385
+ [/"/, "string.php", "@pop"]
386
+ ],
387
+ phpSingleQuoteString: [
388
+ [/[^\\']+/, "string.php"],
389
+ [/@escapes/, "string.escape.php"],
390
+ [/\\./, "string.escape.invalid.php"],
391
+ [/'/, "string.php", "@pop"]
392
+ ]
393
+ },
394
+ phpKeywords: [
395
+ "abstract",
396
+ "and",
397
+ "array",
398
+ "as",
399
+ "break",
400
+ "callable",
401
+ "case",
402
+ "catch",
403
+ "cfunction",
404
+ "class",
405
+ "clone",
406
+ "const",
407
+ "continue",
408
+ "declare",
409
+ "default",
410
+ "do",
411
+ "else",
412
+ "elseif",
413
+ "enddeclare",
414
+ "endfor",
415
+ "endforeach",
416
+ "endif",
417
+ "endswitch",
418
+ "endwhile",
419
+ "extends",
420
+ "false",
421
+ "final",
422
+ "for",
423
+ "foreach",
424
+ "function",
425
+ "global",
426
+ "goto",
427
+ "if",
428
+ "implements",
429
+ "interface",
430
+ "instanceof",
431
+ "insteadof",
432
+ "namespace",
433
+ "new",
434
+ "null",
435
+ "object",
436
+ "old_function",
437
+ "or",
438
+ "private",
439
+ "protected",
440
+ "public",
441
+ "resource",
442
+ "static",
443
+ "switch",
444
+ "throw",
445
+ "trait",
446
+ "try",
447
+ "true",
448
+ "use",
449
+ "var",
450
+ "while",
451
+ "xor",
452
+ "die",
453
+ "echo",
454
+ "empty",
455
+ "exit",
456
+ "eval",
457
+ "include",
458
+ "include_once",
459
+ "isset",
460
+ "list",
461
+ "require",
462
+ "require_once",
463
+ "return",
464
+ "print",
465
+ "unset",
466
+ "yield",
467
+ "__construct"
468
+ ],
469
+ phpCompileTimeConstants: [
470
+ "__CLASS__",
471
+ "__DIR__",
472
+ "__FILE__",
473
+ "__LINE__",
474
+ "__NAMESPACE__",
475
+ "__METHOD__",
476
+ "__FUNCTION__",
477
+ "__TRAIT__"
478
+ ],
479
+ phpPreDefinedVariables: [
480
+ "$GLOBALS",
481
+ "$_SERVER",
482
+ "$_GET",
483
+ "$_POST",
484
+ "$_FILES",
485
+ "$_REQUEST",
486
+ "$_SESSION",
487
+ "$_ENV",
488
+ "$_COOKIE",
489
+ "$php_errormsg",
490
+ "$HTTP_RAW_POST_DATA",
491
+ "$http_response_header",
492
+ "$argc",
493
+ "$argv"
494
+ ],
495
+ escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/
496
+ };
497
+ export {
498
+ e as conf,
499
+ t as language
500
+ };
@@ -0,0 +1,137 @@
1
+ const e = {
2
+ comments: {
3
+ lineComment: "#"
4
+ },
5
+ brackets: [
6
+ ["[", "]"],
7
+ ["<", ">"],
8
+ ["(", ")"]
9
+ ],
10
+ autoClosingPairs: [
11
+ { open: "[", close: "]" },
12
+ { open: "<", close: ">" },
13
+ { open: "(", close: ")" }
14
+ ],
15
+ surroundingPairs: [
16
+ { open: "[", close: "]" },
17
+ { open: "<", close: ">" },
18
+ { open: "(", close: ")" }
19
+ ]
20
+ }, o = {
21
+ defaultToken: "",
22
+ tokenPostfix: ".pla",
23
+ brackets: [
24
+ { open: "[", close: "]", token: "delimiter.square" },
25
+ { open: "<", close: ">", token: "delimiter.angle" },
26
+ { open: "(", close: ")", token: "delimiter.parenthesis" }
27
+ ],
28
+ keywords: [
29
+ ".i",
30
+ ".o",
31
+ ".mv",
32
+ ".ilb",
33
+ ".ob",
34
+ ".label",
35
+ ".type",
36
+ ".phase",
37
+ ".pair",
38
+ ".symbolic",
39
+ ".symbolic-output",
40
+ ".kiss",
41
+ ".p",
42
+ ".e",
43
+ ".end"
44
+ ],
45
+ // regular expressions
46
+ comment: /#.*$/,
47
+ identifier: /[a-zA-Z]+[a-zA-Z0-9_\-]*/,
48
+ plaContent: /[01\-~\|]+/,
49
+ // The main tokenizer for our languages
50
+ tokenizer: {
51
+ root: [
52
+ // comments and whitespace
53
+ { include: "@whitespace" },
54
+ [/@comment/, "comment"],
55
+ // keyword
56
+ [
57
+ /\.([a-zA-Z_\-]+)/,
58
+ {
59
+ cases: {
60
+ "@eos": { token: "keyword.$1" },
61
+ "@keywords": {
62
+ cases: {
63
+ ".type": { token: "keyword.$1", next: "@type" },
64
+ "@default": { token: "keyword.$1", next: "@keywordArg" }
65
+ }
66
+ },
67
+ "@default": { token: "keyword.$1" }
68
+ }
69
+ }
70
+ ],
71
+ // identifiers
72
+ [/@identifier/, "identifier"],
73
+ // PLA row
74
+ [/@plaContent/, "string"]
75
+ ],
76
+ whitespace: [[/[ \t\r\n]+/, ""]],
77
+ type: [{ include: "@whitespace" }, [/\w+/, { token: "type", next: "@pop" }]],
78
+ keywordArg: [
79
+ // whitespace
80
+ [
81
+ /[ \t\r\n]+/,
82
+ {
83
+ cases: {
84
+ "@eos": { token: "", next: "@pop" },
85
+ "@default": ""
86
+ }
87
+ }
88
+ ],
89
+ // comments
90
+ [/@comment/, "comment", "@pop"],
91
+ // brackets
92
+ [
93
+ /[<>()\[\]]/,
94
+ {
95
+ cases: {
96
+ "@eos": { token: "@brackets", next: "@pop" },
97
+ "@default": "@brackets"
98
+ }
99
+ }
100
+ ],
101
+ // numbers
102
+ [
103
+ /\-?\d+/,
104
+ {
105
+ cases: {
106
+ "@eos": { token: "number", next: "@pop" },
107
+ "@default": "number"
108
+ }
109
+ }
110
+ ],
111
+ // identifiers
112
+ [
113
+ /@identifier/,
114
+ {
115
+ cases: {
116
+ "@eos": { token: "identifier", next: "@pop" },
117
+ "@default": "identifier"
118
+ }
119
+ }
120
+ ],
121
+ // delimiter
122
+ [
123
+ /[;=]/,
124
+ {
125
+ cases: {
126
+ "@eos": { token: "delimiter", next: "@pop" },
127
+ "@default": "delimiter"
128
+ }
129
+ }
130
+ ]
131
+ ]
132
+ }
133
+ };
134
+ export {
135
+ e as conf,
136
+ o as language
137
+ };