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