app-ai-solution-exp 0.1.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 (173) hide show
  1. package/bin/app-ai-solution-exp.js +20 -0
  2. package/out/main/index.js +1631 -0
  3. package/out/preload/index.js +108 -0
  4. package/out/renderer/assets/abap-D5KwWAsZ.js +1399 -0
  5. package/out/renderer/assets/apex-DVGUZ64i.js +331 -0
  6. package/out/renderer/assets/azcli-BEAhqcuE.js +69 -0
  7. package/out/renderer/assets/bat-Bqkp9Cfu.js +101 -0
  8. package/out/renderer/assets/bicep-DIlfshcM.js +110 -0
  9. package/out/renderer/assets/cameligo-CLaaYNMV.js +175 -0
  10. package/out/renderer/assets/clojure-fcgFaMHx.js +762 -0
  11. package/out/renderer/assets/codicon-ngg6Pgfi.ttf +0 -0
  12. package/out/renderer/assets/coffee-CzJ5oEdj.js +233 -0
  13. package/out/renderer/assets/cpp-CcN6f0ik.js +390 -0
  14. package/out/renderer/assets/csharp-BJeIuvde.js +327 -0
  15. package/out/renderer/assets/csp-D_3BK2Wp.js +54 -0
  16. package/out/renderer/assets/css-i3rI3_64.js +186 -0
  17. package/out/renderer/assets/css.worker-umuuUiIb.js +53567 -0
  18. package/out/renderer/assets/cssMode-BlKZF8mS.js +208 -0
  19. package/out/renderer/assets/cypher-D0--_GAN.js +264 -0
  20. package/out/renderer/assets/dart-vLMHv35g.js +282 -0
  21. package/out/renderer/assets/dockerfile--oxj0cAH.js +131 -0
  22. package/out/renderer/assets/ecl-CeuUgzaZ.js +457 -0
  23. package/out/renderer/assets/editor.worker-CNgWLVu7.js +13695 -0
  24. package/out/renderer/assets/elixir-eLfY1jWH.js +570 -0
  25. package/out/renderer/assets/flow9-ZSTChSMd.js +143 -0
  26. package/out/renderer/assets/freemarker2-BTb0QKKy.js +995 -0
  27. package/out/renderer/assets/fsharp-D2uoxuLH.js +218 -0
  28. package/out/renderer/assets/go-brnMpFrj.js +219 -0
  29. package/out/renderer/assets/graphql-BeiGgjIU.js +152 -0
  30. package/out/renderer/assets/handlebars-DKVnkZoO.js +414 -0
  31. package/out/renderer/assets/hcl-CrX1Es2W.js +184 -0
  32. package/out/renderer/assets/html-DSHBWNSF.js +303 -0
  33. package/out/renderer/assets/html.worker-BT47iy49.js +29777 -0
  34. package/out/renderer/assets/htmlMode-hdSFcfq-.js +224 -0
  35. package/out/renderer/assets/index-ByP1RhpK.js +309272 -0
  36. package/out/renderer/assets/index-CgixHIqL.css +11502 -0
  37. package/out/renderer/assets/ini-BcQysCTb.js +72 -0
  38. package/out/renderer/assets/inter-cyrillic-400-normal-HOLc17fK.woff +0 -0
  39. package/out/renderer/assets/inter-cyrillic-400-normal-obahsSVq.woff2 +0 -0
  40. package/out/renderer/assets/inter-cyrillic-500-normal-BasfLYem.woff2 +0 -0
  41. package/out/renderer/assets/inter-cyrillic-500-normal-CxZf_p3X.woff +0 -0
  42. package/out/renderer/assets/inter-cyrillic-600-normal-4D_pXhcN.woff +0 -0
  43. package/out/renderer/assets/inter-cyrillic-600-normal-CWCymEST.woff2 +0 -0
  44. package/out/renderer/assets/inter-cyrillic-700-normal-CjBOestx.woff2 +0 -0
  45. package/out/renderer/assets/inter-cyrillic-700-normal-DrXBdSj3.woff +0 -0
  46. package/out/renderer/assets/inter-cyrillic-ext-400-normal-BQZuk6qB.woff2 +0 -0
  47. package/out/renderer/assets/inter-cyrillic-ext-400-normal-DQukG94-.woff +0 -0
  48. package/out/renderer/assets/inter-cyrillic-ext-500-normal-B0yAr1jD.woff2 +0 -0
  49. package/out/renderer/assets/inter-cyrillic-ext-500-normal-BmqWE9Dz.woff +0 -0
  50. package/out/renderer/assets/inter-cyrillic-ext-600-normal-Bcila6Z-.woff +0 -0
  51. package/out/renderer/assets/inter-cyrillic-ext-600-normal-Dfes3d0z.woff2 +0 -0
  52. package/out/renderer/assets/inter-cyrillic-ext-700-normal-BjwYoWNd.woff2 +0 -0
  53. package/out/renderer/assets/inter-cyrillic-ext-700-normal-LO58E6JB.woff +0 -0
  54. package/out/renderer/assets/inter-greek-400-normal-B4URO6DV.woff2 +0 -0
  55. package/out/renderer/assets/inter-greek-400-normal-q2sYcFCs.woff +0 -0
  56. package/out/renderer/assets/inter-greek-500-normal-BIZE56-Y.woff2 +0 -0
  57. package/out/renderer/assets/inter-greek-500-normal-Xzm54t5V.woff +0 -0
  58. package/out/renderer/assets/inter-greek-600-normal-BZpKdvQh.woff +0 -0
  59. package/out/renderer/assets/inter-greek-600-normal-plRanbMR.woff2 +0 -0
  60. package/out/renderer/assets/inter-greek-700-normal-BUv2fZ6O.woff +0 -0
  61. package/out/renderer/assets/inter-greek-700-normal-C3JjAnD8.woff2 +0 -0
  62. package/out/renderer/assets/inter-greek-ext-400-normal-DGGRlc-M.woff2 +0 -0
  63. package/out/renderer/assets/inter-greek-ext-400-normal-KugGGMne.woff +0 -0
  64. package/out/renderer/assets/inter-greek-ext-500-normal-2j5mBUwD.woff +0 -0
  65. package/out/renderer/assets/inter-greek-ext-500-normal-C4iEst2y.woff2 +0 -0
  66. package/out/renderer/assets/inter-greek-ext-600-normal-B8X0CLgF.woff +0 -0
  67. package/out/renderer/assets/inter-greek-ext-600-normal-DRtmH8MT.woff2 +0 -0
  68. package/out/renderer/assets/inter-greek-ext-700-normal-BoQ6DsYi.woff +0 -0
  69. package/out/renderer/assets/inter-greek-ext-700-normal-qfdV9bQt.woff2 +0 -0
  70. package/out/renderer/assets/inter-latin-400-normal-C38fXH4l.woff2 +0 -0
  71. package/out/renderer/assets/inter-latin-400-normal-CyCys3Eg.woff +0 -0
  72. package/out/renderer/assets/inter-latin-500-normal-BL9OpVg8.woff +0 -0
  73. package/out/renderer/assets/inter-latin-500-normal-Cerq10X2.woff2 +0 -0
  74. package/out/renderer/assets/inter-latin-600-normal-CiBQ2DWP.woff +0 -0
  75. package/out/renderer/assets/inter-latin-600-normal-LgqL8muc.woff2 +0 -0
  76. package/out/renderer/assets/inter-latin-700-normal-BLAVimhd.woff +0 -0
  77. package/out/renderer/assets/inter-latin-700-normal-Yt3aPRUw.woff2 +0 -0
  78. package/out/renderer/assets/inter-latin-ext-400-normal-77YHD8bZ.woff +0 -0
  79. package/out/renderer/assets/inter-latin-ext-400-normal-C1nco2VV.woff2 +0 -0
  80. package/out/renderer/assets/inter-latin-ext-500-normal-BxGbmqWO.woff +0 -0
  81. package/out/renderer/assets/inter-latin-ext-500-normal-CV4jyFjo.woff2 +0 -0
  82. package/out/renderer/assets/inter-latin-ext-600-normal-CIVaiw4L.woff +0 -0
  83. package/out/renderer/assets/inter-latin-ext-600-normal-D2bJ5OIk.woff2 +0 -0
  84. package/out/renderer/assets/inter-latin-ext-700-normal-Ca8adRJv.woff2 +0 -0
  85. package/out/renderer/assets/inter-latin-ext-700-normal-TidjK2hL.woff +0 -0
  86. package/out/renderer/assets/inter-vietnamese-400-normal-Bbgyi5SW.woff +0 -0
  87. package/out/renderer/assets/inter-vietnamese-400-normal-DMkecbls.woff2 +0 -0
  88. package/out/renderer/assets/inter-vietnamese-500-normal-DOriooB6.woff2 +0 -0
  89. package/out/renderer/assets/inter-vietnamese-500-normal-mJboJaSs.woff +0 -0
  90. package/out/renderer/assets/inter-vietnamese-600-normal-BuLX-rYi.woff +0 -0
  91. package/out/renderer/assets/inter-vietnamese-600-normal-Cc8MFFhd.woff2 +0 -0
  92. package/out/renderer/assets/inter-vietnamese-700-normal-BZaoP0fm.woff +0 -0
  93. package/out/renderer/assets/inter-vietnamese-700-normal-DlLaEgI2.woff2 +0 -0
  94. package/out/renderer/assets/java-Dt3iMn2o.js +233 -0
  95. package/out/renderer/assets/javascript-Ae6t5gfn.js +72 -0
  96. package/out/renderer/assets/jetbrains-mono-cyrillic-400-normal-BEIGL1Tu.woff2 +0 -0
  97. package/out/renderer/assets/jetbrains-mono-cyrillic-400-normal-ugxPyKxw.woff +0 -0
  98. package/out/renderer/assets/jetbrains-mono-cyrillic-500-normal-DJqRU3vO.woff +0 -0
  99. package/out/renderer/assets/jetbrains-mono-cyrillic-500-normal-DmUKJPL_.woff2 +0 -0
  100. package/out/renderer/assets/jetbrains-mono-greek-400-normal-B9oWc5Lo.woff +0 -0
  101. package/out/renderer/assets/jetbrains-mono-greek-400-normal-C190GLew.woff2 +0 -0
  102. package/out/renderer/assets/jetbrains-mono-greek-500-normal-D7SFKleX.woff +0 -0
  103. package/out/renderer/assets/jetbrains-mono-greek-500-normal-JpySY46c.woff2 +0 -0
  104. package/out/renderer/assets/jetbrains-mono-latin-400-normal-6-qcROiO.woff +0 -0
  105. package/out/renderer/assets/jetbrains-mono-latin-400-normal-V6pRDFza.woff2 +0 -0
  106. package/out/renderer/assets/jetbrains-mono-latin-500-normal-BWZEU5yA.woff2 +0 -0
  107. package/out/renderer/assets/jetbrains-mono-latin-500-normal-CJOVTJB7.woff +0 -0
  108. package/out/renderer/assets/jetbrains-mono-latin-ext-400-normal-Bc8Ftmh3.woff2 +0 -0
  109. package/out/renderer/assets/jetbrains-mono-latin-ext-400-normal-fXTG6kC5.woff +0 -0
  110. package/out/renderer/assets/jetbrains-mono-latin-ext-500-normal-Cut-4mMH.woff2 +0 -0
  111. package/out/renderer/assets/jetbrains-mono-latin-ext-500-normal-ckzbgY84.woff +0 -0
  112. package/out/renderer/assets/jetbrains-mono-vietnamese-400-normal-CqNFfHCs.woff +0 -0
  113. package/out/renderer/assets/jetbrains-mono-vietnamese-500-normal-DNRqzVM1.woff +0 -0
  114. package/out/renderer/assets/json.worker-D4JVmXIe.js +21424 -0
  115. package/out/renderer/assets/jsonMode-B3dQSNhP.js +931 -0
  116. package/out/renderer/assets/julia-Cm3ItYL_.js +512 -0
  117. package/out/renderer/assets/kotlin-Ddo1SjA5.js +253 -0
  118. package/out/renderer/assets/less-B7Qaxw-O.js +162 -0
  119. package/out/renderer/assets/lexon-C1U0m2n9.js +158 -0
  120. package/out/renderer/assets/liquid-Zgyb8DZ5.js +235 -0
  121. package/out/renderer/assets/lspLanguageFeatures-CkDn9c2y.js +1841 -0
  122. package/out/renderer/assets/lua-hNsuGJkO.js +163 -0
  123. package/out/renderer/assets/m3-6ko6q9-_.js +211 -0
  124. package/out/renderer/assets/markdown-B0YTnTxW.js +230 -0
  125. package/out/renderer/assets/mdx-C8e8DFOf.js +159 -0
  126. package/out/renderer/assets/mips-CJm71dS3.js +199 -0
  127. package/out/renderer/assets/msdax-BBeIktCY.js +376 -0
  128. package/out/renderer/assets/mysql-BWiizXSn.js +879 -0
  129. package/out/renderer/assets/objective-c-B1L1C5EC.js +184 -0
  130. package/out/renderer/assets/pascal-DMQyD4Xk.js +252 -0
  131. package/out/renderer/assets/pascaligo-VA_LQ1oU.js +165 -0
  132. package/out/renderer/assets/perl-DC0Z0tlO.js +627 -0
  133. package/out/renderer/assets/pgsql-DaSGFTLp.js +852 -0
  134. package/out/renderer/assets/php-Bkx1qpkQ.js +501 -0
  135. package/out/renderer/assets/pla-DEV89yYj.js +138 -0
  136. package/out/renderer/assets/postiats-CVVurEnu.js +908 -0
  137. package/out/renderer/assets/powerquery-BQ_t1ZiQ.js +891 -0
  138. package/out/renderer/assets/powershell-BXiKvz7Z.js +240 -0
  139. package/out/renderer/assets/protobuf-CndvAUGu.js +421 -0
  140. package/out/renderer/assets/pug-BxCXwerb.js +403 -0
  141. package/out/renderer/assets/python-8eSQckTG.js +295 -0
  142. package/out/renderer/assets/qsharp-BWK6YLKm.js +302 -0
  143. package/out/renderer/assets/r-CtqYUQ6l.js +244 -0
  144. package/out/renderer/assets/razor-eAkN4Qfv.js +545 -0
  145. package/out/renderer/assets/redis-O7gSt3oh.js +303 -0
  146. package/out/renderer/assets/redshift-CvYMMYZY.js +810 -0
  147. package/out/renderer/assets/restructuredtext-B-KQCVu_.js +175 -0
  148. package/out/renderer/assets/ruby-DCd4DmAr.js +512 -0
  149. package/out/renderer/assets/rust-B1c0VCeq.js +344 -0
  150. package/out/renderer/assets/sb-Chfc_wZF.js +116 -0
  151. package/out/renderer/assets/scala-DbVzH-3O.js +371 -0
  152. package/out/renderer/assets/scheme-D7PxodDG.js +109 -0
  153. package/out/renderer/assets/scss-B42qMyAu.js +261 -0
  154. package/out/renderer/assets/shell-vZEubQ82.js +222 -0
  155. package/out/renderer/assets/solidity-yHOxYChb.js +1368 -0
  156. package/out/renderer/assets/sophia-D7pU0Y1d.js +200 -0
  157. package/out/renderer/assets/sparql-DxuVdnRl.js +202 -0
  158. package/out/renderer/assets/sql-BAGepFCR.js +854 -0
  159. package/out/renderer/assets/st-C-b0Dh53.js +417 -0
  160. package/out/renderer/assets/swift-BmOZGynf.js +313 -0
  161. package/out/renderer/assets/systemverilog-BOC0OOdC.js +577 -0
  162. package/out/renderer/assets/tcl-Bb4GCwBr.js +233 -0
  163. package/out/renderer/assets/ts.worker-C7hW3aY-.js +225330 -0
  164. package/out/renderer/assets/tsMode-D7ET908H.js +1265 -0
  165. package/out/renderer/assets/twig-DvgEGWAV.js +393 -0
  166. package/out/renderer/assets/typescript-BhqUlrW4.js +337 -0
  167. package/out/renderer/assets/typespec-R77Ln7Jb.js +128 -0
  168. package/out/renderer/assets/vb-Bm6ESA0Q.js +373 -0
  169. package/out/renderer/assets/wgsl-_KPae5vw.js +454 -0
  170. package/out/renderer/assets/xml-Bg3Ctug6.js +89 -0
  171. package/out/renderer/assets/yaml-C9aCL4uU.js +200 -0
  172. package/out/renderer/index.html +13 -0
  173. package/package.json +110 -0
@@ -0,0 +1,908 @@
1
+ const conf = {
2
+ comments: {
3
+ lineComment: "//",
4
+ blockComment: ["(*", "*)"]
5
+ },
6
+ brackets: [
7
+ ["{", "}"],
8
+ ["[", "]"],
9
+ ["(", ")"],
10
+ ["<", ">"]
11
+ ],
12
+ autoClosingPairs: [
13
+ { open: '"', close: '"', notIn: ["string", "comment"] },
14
+ { open: "{", close: "}", notIn: ["string", "comment"] },
15
+ { open: "[", close: "]", notIn: ["string", "comment"] },
16
+ { open: "(", close: ")", notIn: ["string", "comment"] }
17
+ ]
18
+ };
19
+ const language = {
20
+ tokenPostfix: ".pats",
21
+ // TODO: staload and dynload are followed by a special kind of string literals
22
+ // with {$IDENTIFER} variables, and it also may make sense to highlight
23
+ // the punctuation (. and / and \) differently.
24
+ // Set defaultToken to invalid to see what you do not tokenize yet
25
+ defaultToken: "invalid",
26
+ // keyword reference: https://github.com/githwxi/ATS-Postiats/blob/master/src/pats_lexing_token.dats
27
+ keywords: [
28
+ //
29
+ "abstype",
30
+ // ABSTYPE
31
+ "abst0ype",
32
+ // ABST0YPE
33
+ "absprop",
34
+ // ABSPROP
35
+ "absview",
36
+ // ABSVIEW
37
+ "absvtype",
38
+ // ABSVIEWTYPE
39
+ "absviewtype",
40
+ // ABSVIEWTYPE
41
+ "absvt0ype",
42
+ // ABSVIEWT0YPE
43
+ "absviewt0ype",
44
+ // ABSVIEWT0YPE
45
+ //
46
+ "as",
47
+ // T_AS
48
+ //
49
+ "and",
50
+ // T_AND
51
+ //
52
+ "assume",
53
+ // T_ASSUME
54
+ //
55
+ "begin",
56
+ // T_BEGIN
57
+ //
58
+ /*
59
+ "case", // CASE
60
+ */
61
+ //
62
+ "classdec",
63
+ // T_CLASSDEC
64
+ //
65
+ "datasort",
66
+ // T_DATASORT
67
+ //
68
+ "datatype",
69
+ // DATATYPE
70
+ "dataprop",
71
+ // DATAPROP
72
+ "dataview",
73
+ // DATAVIEW
74
+ "datavtype",
75
+ // DATAVIEWTYPE
76
+ "dataviewtype",
77
+ // DATAVIEWTYPE
78
+ //
79
+ "do",
80
+ // T_DO
81
+ //
82
+ "end",
83
+ // T_END
84
+ //
85
+ "extern",
86
+ // T_EXTERN
87
+ "extype",
88
+ // T_EXTYPE
89
+ "extvar",
90
+ // T_EXTVAR
91
+ //
92
+ "exception",
93
+ // T_EXCEPTION
94
+ //
95
+ "fn",
96
+ // FN // non-recursive
97
+ "fnx",
98
+ // FNX // mutual tail-rec.
99
+ "fun",
100
+ // FUN // general-recursive
101
+ //
102
+ "prfn",
103
+ // PRFN
104
+ "prfun",
105
+ // PRFUN
106
+ //
107
+ "praxi",
108
+ // PRAXI
109
+ "castfn",
110
+ // CASTFN
111
+ //
112
+ "if",
113
+ // T_IF
114
+ "then",
115
+ // T_THEN
116
+ "else",
117
+ // T_ELSE
118
+ //
119
+ "ifcase",
120
+ // T_IFCASE
121
+ //
122
+ "in",
123
+ // T_IN
124
+ //
125
+ "infix",
126
+ // INFIX
127
+ "infixl",
128
+ // INFIXL
129
+ "infixr",
130
+ // INFIXR
131
+ "prefix",
132
+ // PREFIX
133
+ "postfix",
134
+ // POSTFIX
135
+ //
136
+ "implmnt",
137
+ // IMPLMNT // 0
138
+ "implement",
139
+ // IMPLEMENT // 1
140
+ //
141
+ "primplmnt",
142
+ // PRIMPLMNT // ~1
143
+ "primplement",
144
+ // PRIMPLMNT // ~1
145
+ //
146
+ "import",
147
+ // T_IMPORT // for importing packages
148
+ //
149
+ /*
150
+ "lam", // LAM
151
+ "llam", // LLAM
152
+ "fix", // FIX
153
+ */
154
+ //
155
+ "let",
156
+ // T_LET
157
+ //
158
+ "local",
159
+ // T_LOCAL
160
+ //
161
+ "macdef",
162
+ // MACDEF
163
+ "macrodef",
164
+ // MACRODEF
165
+ //
166
+ "nonfix",
167
+ // T_NONFIX
168
+ //
169
+ "symelim",
170
+ // T_SYMELIM
171
+ "symintr",
172
+ // T_SYMINTR
173
+ "overload",
174
+ // T_OVERLOAD
175
+ //
176
+ "of",
177
+ // T_OF
178
+ "op",
179
+ // T_OP
180
+ //
181
+ "rec",
182
+ // T_REC
183
+ //
184
+ "sif",
185
+ // T_SIF
186
+ "scase",
187
+ // T_SCASE
188
+ //
189
+ "sortdef",
190
+ // T_SORTDEF
191
+ /*
192
+ // HX: [sta] is now deprecated
193
+ */
194
+ "sta",
195
+ // T_STACST
196
+ "stacst",
197
+ // T_STACST
198
+ "stadef",
199
+ // T_STADEF
200
+ "static",
201
+ // T_STATIC
202
+ /*
203
+ "stavar", // T_STAVAR
204
+ */
205
+ //
206
+ "staload",
207
+ // T_STALOAD
208
+ "dynload",
209
+ // T_DYNLOAD
210
+ //
211
+ "try",
212
+ // T_TRY
213
+ //
214
+ "tkindef",
215
+ // T_TKINDEF // HX-2012-05-23
216
+ //
217
+ /*
218
+ "type", // TYPE
219
+ */
220
+ "typedef",
221
+ // TYPEDEF
222
+ "propdef",
223
+ // PROPDEF
224
+ "viewdef",
225
+ // VIEWDEF
226
+ "vtypedef",
227
+ // VIEWTYPEDEF
228
+ "viewtypedef",
229
+ // VIEWTYPEDEF
230
+ //
231
+ /*
232
+ "val", // VAL
233
+ */
234
+ "prval",
235
+ // PRVAL
236
+ //
237
+ "var",
238
+ // VAR
239
+ "prvar",
240
+ // PRVAR
241
+ //
242
+ "when",
243
+ // T_WHEN
244
+ "where",
245
+ // T_WHERE
246
+ //
247
+ /*
248
+ "for", // T_FOR
249
+ "while", // T_WHILE
250
+ */
251
+ //
252
+ "with",
253
+ // T_WITH
254
+ //
255
+ "withtype",
256
+ // WITHTYPE
257
+ "withprop",
258
+ // WITHPROP
259
+ "withview",
260
+ // WITHVIEW
261
+ "withvtype",
262
+ // WITHVIEWTYPE
263
+ "withviewtype"
264
+ // WITHVIEWTYPE
265
+ //
266
+ ],
267
+ keywords_dlr: [
268
+ "$delay",
269
+ // DLRDELAY
270
+ "$ldelay",
271
+ // DLRLDELAY
272
+ //
273
+ "$arrpsz",
274
+ // T_DLRARRPSZ
275
+ "$arrptrsize",
276
+ // T_DLRARRPSZ
277
+ //
278
+ "$d2ctype",
279
+ // T_DLRD2CTYPE
280
+ //
281
+ "$effmask",
282
+ // DLREFFMASK
283
+ "$effmask_ntm",
284
+ // DLREFFMASK_NTM
285
+ "$effmask_exn",
286
+ // DLREFFMASK_EXN
287
+ "$effmask_ref",
288
+ // DLREFFMASK_REF
289
+ "$effmask_wrt",
290
+ // DLREFFMASK_WRT
291
+ "$effmask_all",
292
+ // DLREFFMASK_ALL
293
+ //
294
+ "$extern",
295
+ // T_DLREXTERN
296
+ "$extkind",
297
+ // T_DLREXTKIND
298
+ "$extype",
299
+ // T_DLREXTYPE
300
+ "$extype_struct",
301
+ // T_DLREXTYPE_STRUCT
302
+ //
303
+ "$extval",
304
+ // T_DLREXTVAL
305
+ "$extfcall",
306
+ // T_DLREXTFCALL
307
+ "$extmcall",
308
+ // T_DLREXTMCALL
309
+ //
310
+ "$literal",
311
+ // T_DLRLITERAL
312
+ //
313
+ "$myfilename",
314
+ // T_DLRMYFILENAME
315
+ "$mylocation",
316
+ // T_DLRMYLOCATION
317
+ "$myfunction",
318
+ // T_DLRMYFUNCTION
319
+ //
320
+ "$lst",
321
+ // DLRLST
322
+ "$lst_t",
323
+ // DLRLST_T
324
+ "$lst_vt",
325
+ // DLRLST_VT
326
+ "$list",
327
+ // DLRLST
328
+ "$list_t",
329
+ // DLRLST_T
330
+ "$list_vt",
331
+ // DLRLST_VT
332
+ //
333
+ "$rec",
334
+ // DLRREC
335
+ "$rec_t",
336
+ // DLRREC_T
337
+ "$rec_vt",
338
+ // DLRREC_VT
339
+ "$record",
340
+ // DLRREC
341
+ "$record_t",
342
+ // DLRREC_T
343
+ "$record_vt",
344
+ // DLRREC_VT
345
+ //
346
+ "$tup",
347
+ // DLRTUP
348
+ "$tup_t",
349
+ // DLRTUP_T
350
+ "$tup_vt",
351
+ // DLRTUP_VT
352
+ "$tuple",
353
+ // DLRTUP
354
+ "$tuple_t",
355
+ // DLRTUP_T
356
+ "$tuple_vt",
357
+ // DLRTUP_VT
358
+ //
359
+ "$break",
360
+ // T_DLRBREAK
361
+ "$continue",
362
+ // T_DLRCONTINUE
363
+ //
364
+ "$raise",
365
+ // T_DLRRAISE
366
+ //
367
+ "$showtype",
368
+ // T_DLRSHOWTYPE
369
+ //
370
+ "$vcopyenv_v",
371
+ // DLRVCOPYENV_V
372
+ "$vcopyenv_vt",
373
+ // DLRVCOPYENV_VT
374
+ //
375
+ "$tempenver",
376
+ // T_DLRTEMPENVER
377
+ //
378
+ "$solver_assert",
379
+ // T_DLRSOLASSERT
380
+ "$solver_verify"
381
+ // T_DLRSOLVERIFY
382
+ ],
383
+ keywords_srp: [
384
+ //
385
+ "#if",
386
+ // T_SRPIF
387
+ "#ifdef",
388
+ // T_SRPIFDEF
389
+ "#ifndef",
390
+ // T_SRPIFNDEF
391
+ //
392
+ "#then",
393
+ // T_SRPTHEN
394
+ //
395
+ "#elif",
396
+ // T_SRPELIF
397
+ "#elifdef",
398
+ // T_SRPELIFDEF
399
+ "#elifndef",
400
+ // T_SRPELIFNDEF
401
+ //
402
+ "#else",
403
+ // T_SRPELSE
404
+ "#endif",
405
+ // T_SRPENDIF
406
+ //
407
+ "#error",
408
+ // T_SRPERROR
409
+ //
410
+ "#prerr",
411
+ // T_SRPPRERR // outpui to stderr
412
+ "#print",
413
+ // T_SRPPRINT // output to stdout
414
+ //
415
+ "#assert",
416
+ // T_SRPASSERT
417
+ //
418
+ "#undef",
419
+ // T_SRPUNDEF
420
+ "#define",
421
+ // T_SRPDEFINE
422
+ //
423
+ "#include",
424
+ // T_SRPINCLUDE
425
+ "#require",
426
+ // T_SRPREQUIRE
427
+ //
428
+ "#pragma",
429
+ // T_SRPPRAGMA // HX: general pragma
430
+ "#codegen2",
431
+ // T_SRPCODEGEN2 // for level-2 codegen
432
+ "#codegen3"
433
+ // T_SRPCODEGEN3 // for level-3 codegen
434
+ //
435
+ // HX: end of special tokens
436
+ //
437
+ ],
438
+ irregular_keyword_list: [
439
+ "val+",
440
+ "val-",
441
+ "val",
442
+ "case+",
443
+ "case-",
444
+ "case",
445
+ "addr@",
446
+ "addr",
447
+ "fold@",
448
+ "free@",
449
+ "fix@",
450
+ "fix",
451
+ "lam@",
452
+ "lam",
453
+ "llam@",
454
+ "llam",
455
+ "viewt@ype+",
456
+ "viewt@ype-",
457
+ "viewt@ype",
458
+ "viewtype+",
459
+ "viewtype-",
460
+ "viewtype",
461
+ "view+",
462
+ "view-",
463
+ "view@",
464
+ "view",
465
+ "type+",
466
+ "type-",
467
+ "type",
468
+ "vtype+",
469
+ "vtype-",
470
+ "vtype",
471
+ "vt@ype+",
472
+ "vt@ype-",
473
+ "vt@ype",
474
+ "viewt@ype+",
475
+ "viewt@ype-",
476
+ "viewt@ype",
477
+ "viewtype+",
478
+ "viewtype-",
479
+ "viewtype",
480
+ "prop+",
481
+ "prop-",
482
+ "prop",
483
+ "type+",
484
+ "type-",
485
+ "type",
486
+ "t@ype",
487
+ "t@ype+",
488
+ "t@ype-",
489
+ "abst@ype",
490
+ "abstype",
491
+ "absviewt@ype",
492
+ "absvt@ype",
493
+ "for*",
494
+ "for",
495
+ "while*",
496
+ "while"
497
+ ],
498
+ keywords_types: [
499
+ "bool",
500
+ "double",
501
+ "byte",
502
+ "int",
503
+ "short",
504
+ "char",
505
+ "void",
506
+ "unit",
507
+ "long",
508
+ "float",
509
+ "string",
510
+ "strptr"
511
+ ],
512
+ // TODO: reference for this?
513
+ keywords_effects: [
514
+ "0",
515
+ // no effects
516
+ "fun",
517
+ "clo",
518
+ "prf",
519
+ "funclo",
520
+ "cloptr",
521
+ "cloref",
522
+ "ref",
523
+ "ntm",
524
+ "1"
525
+ // all effects
526
+ ],
527
+ operators: [
528
+ "@",
529
+ // T_AT
530
+ "!",
531
+ // T_BANG
532
+ "|",
533
+ // T_BAR
534
+ "`",
535
+ // T_BQUOTE
536
+ ":",
537
+ // T_COLON
538
+ "$",
539
+ // T_DOLLAR
540
+ ".",
541
+ // T_DOT
542
+ "=",
543
+ // T_EQ
544
+ "#",
545
+ // T_HASH
546
+ "~",
547
+ // T_TILDE
548
+ //
549
+ "..",
550
+ // T_DOTDOT
551
+ "...",
552
+ // T_DOTDOTDOT
553
+ //
554
+ "=>",
555
+ // T_EQGT
556
+ // "=<", // T_EQLT
557
+ "=<>",
558
+ // T_EQLTGT
559
+ "=/=>",
560
+ // T_EQSLASHEQGT
561
+ "=>>",
562
+ // T_EQGTGT
563
+ "=/=>>",
564
+ // T_EQSLASHEQGTGT
565
+ //
566
+ "<",
567
+ // T_LT // opening a tmparg
568
+ ">",
569
+ // T_GT // closing a tmparg
570
+ //
571
+ "><",
572
+ // T_GTLT
573
+ //
574
+ ".<",
575
+ // T_DOTLT
576
+ ">.",
577
+ // T_GTDOT
578
+ //
579
+ ".<>.",
580
+ // T_DOTLTGTDOT
581
+ //
582
+ "->",
583
+ // T_MINUSGT
584
+ //"-<", // T_MINUSLT
585
+ "-<>"
586
+ // T_MINUSLTGT
587
+ //
588
+ /*
589
+ ":<", // T_COLONLT
590
+ */
591
+ ],
592
+ brackets: [
593
+ { open: ",(", close: ")", token: "delimiter.parenthesis" },
594
+ // meta-programming syntax
595
+ { open: "`(", close: ")", token: "delimiter.parenthesis" },
596
+ { open: "%(", close: ")", token: "delimiter.parenthesis" },
597
+ { open: "'(", close: ")", token: "delimiter.parenthesis" },
598
+ { open: "'{", close: "}", token: "delimiter.parenthesis" },
599
+ { open: "@(", close: ")", token: "delimiter.parenthesis" },
600
+ { open: "@{", close: "}", token: "delimiter.brace" },
601
+ { open: "@[", close: "]", token: "delimiter.square" },
602
+ { open: "#[", close: "]", token: "delimiter.square" },
603
+ { open: "{", close: "}", token: "delimiter.curly" },
604
+ { open: "[", close: "]", token: "delimiter.square" },
605
+ { open: "(", close: ")", token: "delimiter.parenthesis" },
606
+ { open: "<", close: ">", token: "delimiter.angle" }
607
+ ],
608
+ // we include these common regular expressions
609
+ symbols: /[=><!~?:&|+\-*\/\^%]+/,
610
+ IDENTFST: /[a-zA-Z_]/,
611
+ IDENTRST: /[a-zA-Z0-9_'$]/,
612
+ symbolic: /[%&+-./:=@~`^|*!$#?<>]/,
613
+ digit: /[0-9]/,
614
+ digitseq0: /@digit*/,
615
+ xdigit: /[0-9A-Za-z]/,
616
+ xdigitseq0: /@xdigit*/,
617
+ INTSP: /[lLuU]/,
618
+ FLOATSP: /[fFlL]/,
619
+ fexponent: /[eE][+-]?[0-9]+/,
620
+ fexponent_bin: /[pP][+-]?[0-9]+/,
621
+ deciexp: /\.[0-9]*@fexponent?/,
622
+ hexiexp: /\.[0-9a-zA-Z]*@fexponent_bin?/,
623
+ irregular_keywords: /val[+-]?|case[+-]?|addr\@?|fold\@|free\@|fix\@?|lam\@?|llam\@?|prop[+-]?|type[+-]?|view[+-@]?|viewt@?ype[+-]?|t@?ype[+-]?|v(iew)?t@?ype[+-]?|abst@?ype|absv(iew)?t@?ype|for\*?|while\*?/,
624
+ ESCHAR: /[ntvbrfa\\\?'"\(\[\{]/,
625
+ start: "root",
626
+ // The main tokenizer for ATS/Postiats
627
+ // reference: https://github.com/githwxi/ATS-Postiats/blob/master/src/pats_lexing.dats
628
+ tokenizer: {
629
+ root: [
630
+ // lexing_blankseq0
631
+ { regex: /[ \t\r\n]+/, action: { token: "" } },
632
+ // NOTE: (*) is an invalid ML-like comment!
633
+ { regex: /\(\*\)/, action: { token: "invalid" } },
634
+ {
635
+ regex: /\(\*/,
636
+ action: { token: "comment", next: "lexing_COMMENT_block_ml" }
637
+ },
638
+ {
639
+ regex: /\(/,
640
+ action: "@brackets"
641
+ /*{ token: 'delimiter.parenthesis' }*/
642
+ },
643
+ {
644
+ regex: /\)/,
645
+ action: "@brackets"
646
+ /*{ token: 'delimiter.parenthesis' }*/
647
+ },
648
+ {
649
+ regex: /\[/,
650
+ action: "@brackets"
651
+ /*{ token: 'delimiter.bracket' }*/
652
+ },
653
+ {
654
+ regex: /\]/,
655
+ action: "@brackets"
656
+ /*{ token: 'delimiter.bracket' }*/
657
+ },
658
+ {
659
+ regex: /\{/,
660
+ action: "@brackets"
661
+ /*{ token: 'delimiter.brace' }*/
662
+ },
663
+ {
664
+ regex: /\}/,
665
+ action: "@brackets"
666
+ /*{ token: 'delimiter.brace' }*/
667
+ },
668
+ // lexing_COMMA
669
+ {
670
+ regex: /,\(/,
671
+ action: "@brackets"
672
+ /*{ token: 'delimiter.parenthesis' }*/
673
+ },
674
+ // meta-programming syntax
675
+ { regex: /,/, action: { token: "delimiter.comma" } },
676
+ { regex: /;/, action: { token: "delimiter.semicolon" } },
677
+ // lexing_AT
678
+ {
679
+ regex: /@\(/,
680
+ action: "@brackets"
681
+ /* { token: 'delimiter.parenthesis' }*/
682
+ },
683
+ {
684
+ regex: /@\[/,
685
+ action: "@brackets"
686
+ /* { token: 'delimiter.bracket' }*/
687
+ },
688
+ {
689
+ regex: /@\{/,
690
+ action: "@brackets"
691
+ /*{ token: 'delimiter.brace' }*/
692
+ },
693
+ // lexing_COLON
694
+ {
695
+ regex: /:</,
696
+ action: { token: "keyword", next: "@lexing_EFFECT_commaseq0" }
697
+ },
698
+ // T_COLONLT
699
+ /*
700
+ lexing_DOT:
701
+
702
+ . // SYMBOLIC => lexing_IDENT_sym
703
+ . FLOATDOT => lexing_FLOAT_deciexp
704
+ . DIGIT => T_DOTINT
705
+ */
706
+ { regex: /\.@symbolic+/, action: { token: "identifier.sym" } },
707
+ // FLOATDOT case
708
+ {
709
+ regex: /\.@digit*@fexponent@FLOATSP*/,
710
+ action: { token: "number.float" }
711
+ },
712
+ { regex: /\.@digit+/, action: { token: "number.float" } },
713
+ // T_DOTINT
714
+ // lexing_DOLLAR:
715
+ // '$' IDENTFST IDENTRST* => lexing_IDENT_dlr, _ => lexing_IDENT_sym
716
+ {
717
+ regex: /\$@IDENTFST@IDENTRST*/,
718
+ action: {
719
+ cases: {
720
+ "@keywords_dlr": { token: "keyword.dlr" },
721
+ "@default": { token: "namespace" }
722
+ // most likely a module qualifier
723
+ }
724
+ }
725
+ },
726
+ // lexing_SHARP:
727
+ // '#' IDENTFST IDENTRST* => lexing_ident_srp, _ => lexing_IDENT_sym
728
+ {
729
+ regex: /\#@IDENTFST@IDENTRST*/,
730
+ action: {
731
+ cases: {
732
+ "@keywords_srp": { token: "keyword.srp" },
733
+ "@default": { token: "identifier" }
734
+ }
735
+ }
736
+ },
737
+ // lexing_PERCENT:
738
+ { regex: /%\(/, action: { token: "delimiter.parenthesis" } },
739
+ {
740
+ regex: /^%{(#|\^|\$)?/,
741
+ action: {
742
+ token: "keyword",
743
+ next: "@lexing_EXTCODE",
744
+ nextEmbedded: "text/javascript"
745
+ }
746
+ },
747
+ { regex: /^%}/, action: { token: "keyword" } },
748
+ // lexing_QUOTE
749
+ { regex: /'\(/, action: { token: "delimiter.parenthesis" } },
750
+ { regex: /'\[/, action: { token: "delimiter.bracket" } },
751
+ { regex: /'\{/, action: { token: "delimiter.brace" } },
752
+ [/(')(\\@ESCHAR|\\[xX]@xdigit+|\\@digit+)(')/, ["string", "string.escape", "string"]],
753
+ [/'[^\\']'/, "string"],
754
+ // lexing_DQUOTE
755
+ [/"/, "string.quote", "@lexing_DQUOTE"],
756
+ // lexing_BQUOTE
757
+ {
758
+ regex: /`\(/,
759
+ action: "@brackets"
760
+ /* { token: 'delimiter.parenthesis' }*/
761
+ },
762
+ // TODO: otherwise, try lexing_IDENT_sym
763
+ { regex: /\\/, action: { token: "punctuation" } },
764
+ // just T_BACKSLASH
765
+ // lexing_IDENT_alp:
766
+ // NOTE: (?!regex) is syntax for "not-followed-by" regex
767
+ // to resolve ambiguity such as foreach$fwork being incorrectly lexed as [for] [each$fwork]!
768
+ {
769
+ regex: /@irregular_keywords(?!@IDENTRST)/,
770
+ action: { token: "keyword" }
771
+ },
772
+ {
773
+ regex: /@IDENTFST@IDENTRST*[<!\[]?/,
774
+ action: {
775
+ cases: {
776
+ // TODO: dynload and staload should be specially parsed
777
+ // dynload whitespace+ "special_string"
778
+ // this special string is really:
779
+ // '/' '\\' '.' => punctuation
780
+ // ({\$)([a-zA-Z_][a-zA-Z_0-9]*)(}) => punctuation,keyword,punctuation
781
+ // [^"] => identifier/literal
782
+ "@keywords": { token: "keyword" },
783
+ "@keywords_types": { token: "type" },
784
+ "@default": { token: "identifier" }
785
+ }
786
+ }
787
+ },
788
+ // lexing_IDENT_sym:
789
+ {
790
+ regex: /\/\/\/\//,
791
+ action: { token: "comment", next: "@lexing_COMMENT_rest" }
792
+ },
793
+ { regex: /\/\/.*$/, action: { token: "comment" } },
794
+ {
795
+ regex: /\/\*/,
796
+ action: { token: "comment", next: "@lexing_COMMENT_block_c" }
797
+ },
798
+ // AS-20160627: specifically for effect annotations
799
+ {
800
+ regex: /-<|=</,
801
+ action: { token: "keyword", next: "@lexing_EFFECT_commaseq0" }
802
+ },
803
+ {
804
+ regex: /@symbolic+/,
805
+ action: {
806
+ cases: {
807
+ "@operators": "keyword",
808
+ "@default": "operator"
809
+ }
810
+ }
811
+ },
812
+ // lexing_ZERO:
813
+ // FIXME: this one is quite messy/unfinished yet
814
+ // TODO: lexing_INT_hex
815
+ // - testing_hexiexp => lexing_FLOAT_hexiexp
816
+ // - testing_fexponent_bin => lexing_FLOAT_hexiexp
817
+ // - testing_intspseq0 => T_INT_hex
818
+ // lexing_INT_hex:
819
+ {
820
+ regex: /0[xX]@xdigit+(@hexiexp|@fexponent_bin)@FLOATSP*/,
821
+ action: { token: "number.float" }
822
+ },
823
+ { regex: /0[xX]@xdigit+@INTSP*/, action: { token: "number.hex" } },
824
+ {
825
+ regex: /0[0-7]+(?![0-9])@INTSP*/,
826
+ action: { token: "number.octal" }
827
+ },
828
+ // lexing_INT_oct
829
+ //{regex: /0/, action: { token: 'number' } }, // INTZERO
830
+ // lexing_INT_dec:
831
+ // - testing_deciexp => lexing_FLOAT_deciexp
832
+ // - testing_fexponent => lexing_FLOAT_deciexp
833
+ // - otherwise => intspseq0 ([0-9]*[lLuU]?)
834
+ {
835
+ regex: /@digit+(@fexponent|@deciexp)@FLOATSP*/,
836
+ action: { token: "number.float" }
837
+ },
838
+ {
839
+ regex: /@digit@digitseq0@INTSP*/,
840
+ action: { token: "number.decimal" }
841
+ },
842
+ // DIGIT, if followed by digitseq0, is lexing_INT_dec
843
+ { regex: /@digit+@INTSP*/, action: { token: "number" } }
844
+ ],
845
+ lexing_COMMENT_block_ml: [
846
+ [/[^\(\*]+/, "comment"],
847
+ [/\(\*/, "comment", "@push"],
848
+ [/\(\*/, "comment.invalid"],
849
+ [/\*\)/, "comment", "@pop"],
850
+ [/\*/, "comment"]
851
+ ],
852
+ lexing_COMMENT_block_c: [
853
+ [/[^\/*]+/, "comment"],
854
+ // [/\/\*/, 'comment', '@push' ], // nested C-style block comments not allowed
855
+ // [/\/\*/, 'comment.invalid' ], // NOTE: this breaks block comments in the shape of /* //*/
856
+ [/\*\//, "comment", "@pop"],
857
+ [/[\/*]/, "comment"]
858
+ ],
859
+ lexing_COMMENT_rest: [
860
+ [/$/, "comment", "@pop"],
861
+ // FIXME: does it match? docs say 'no'
862
+ [/.*/, "comment"]
863
+ ],
864
+ // NOTE: added by AS, specifically for highlighting
865
+ lexing_EFFECT_commaseq0: [
866
+ {
867
+ regex: /@IDENTFST@IDENTRST+|@digit+/,
868
+ action: {
869
+ cases: {
870
+ "@keywords_effects": { token: "type.effect" },
871
+ "@default": { token: "identifier" }
872
+ }
873
+ }
874
+ },
875
+ { regex: /,/, action: { token: "punctuation" } },
876
+ { regex: />/, action: { token: "@rematch", next: "@pop" } }
877
+ ],
878
+ lexing_EXTCODE: [
879
+ {
880
+ regex: /^%}/,
881
+ action: {
882
+ token: "@rematch",
883
+ next: "@pop",
884
+ nextEmbedded: "@pop"
885
+ }
886
+ },
887
+ { regex: /[^%]+/, action: "" }
888
+ ],
889
+ lexing_DQUOTE: [
890
+ { regex: /"/, action: { token: "string.quote", next: "@pop" } },
891
+ // AS-20160628: additional hi-lighting for variables in staload/dynload strings
892
+ {
893
+ regex: /(\{\$)(@IDENTFST@IDENTRST*)(\})/,
894
+ action: [{ token: "string.escape" }, { token: "identifier" }, { token: "string.escape" }]
895
+ },
896
+ { regex: /\\$/, action: { token: "string.escape" } },
897
+ {
898
+ regex: /\\(@ESCHAR|[xX]@xdigit+|@digit+)/,
899
+ action: { token: "string.escape" }
900
+ },
901
+ { regex: /[^\\"]+/, action: { token: "string" } }
902
+ ]
903
+ }
904
+ };
905
+ export {
906
+ conf,
907
+ language
908
+ };