purus 0.2.1 → 0.4.0
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.
- package/bin/purus.js +14 -5
- package/lib/build-wrapper.js +30 -14
- package/lib/check-wrapper.js +97 -0
- package/lib/create.js +6 -3
- package/lib/purus-compiler.js +1386 -1125
- package/lib/purus-core.js +4 -2
- package/lib/run-wrapper.js +12 -15
- package/package.json +1 -1
package/lib/purus-compiler.js
CHANGED
|
@@ -155,89 +155,93 @@ const $64$username$47$core$46$TokenKind$Mul = { $tag: 13, $name: "Mul" };
|
|
|
155
155
|
const $64$username$47$core$46$TokenKind$Div = { $tag: 14, $name: "Div" };
|
|
156
156
|
const $64$username$47$core$46$TokenKind$Mod = { $tag: 15, $name: "Mod" };
|
|
157
157
|
const $64$username$47$core$46$TokenKind$Neg = { $tag: 16, $name: "Neg" };
|
|
158
|
-
const $64$username$47$core$46$TokenKind$
|
|
159
|
-
const $64$username$47$core$46$TokenKind$
|
|
160
|
-
const $64$username$47$core$46$TokenKind$
|
|
161
|
-
const $64$username$47$core$46$TokenKind$
|
|
162
|
-
const $64$username$47$core$46$TokenKind$
|
|
163
|
-
const $64$username$47$core$46$TokenKind$
|
|
164
|
-
const $64$username$47$core$46$TokenKind$
|
|
165
|
-
const $64$username$47$core$46$TokenKind$
|
|
166
|
-
const $64$username$47$core$46$TokenKind$
|
|
167
|
-
const $64$username$47$core$46$TokenKind$
|
|
168
|
-
const $64$username$47$core$46$TokenKind$
|
|
169
|
-
const $64$username$47$core$46$TokenKind$
|
|
170
|
-
const $64$username$47$core$46$TokenKind$
|
|
171
|
-
const $64$username$47$core$46$TokenKind$
|
|
172
|
-
const $64$username$47$core$46$TokenKind$
|
|
173
|
-
const $64$username$47$core$46$TokenKind$
|
|
174
|
-
const $64$username$47$core$46$TokenKind$
|
|
175
|
-
const $64$username$47$core$46$TokenKind$
|
|
176
|
-
const $64$username$47$core$46$TokenKind$
|
|
177
|
-
const $64$username$47$core$46$TokenKind$
|
|
178
|
-
const $64$username$47$core$46$TokenKind$
|
|
179
|
-
const $64$username$47$core$46$TokenKind$
|
|
180
|
-
const $64$username$47$core$46$TokenKind$
|
|
181
|
-
const $64$username$47$core$46$TokenKind$
|
|
182
|
-
const $64$username$47$core$46$TokenKind$
|
|
183
|
-
const $64$username$47$core$46$TokenKind$
|
|
184
|
-
const $64$username$47$core$46$TokenKind$
|
|
185
|
-
const $64$username$47$core$46$TokenKind$
|
|
186
|
-
const $64$username$47$core$46$TokenKind$
|
|
187
|
-
const $64$username$47$core$46$TokenKind$
|
|
188
|
-
const $64$username$47$core$46$TokenKind$
|
|
189
|
-
const $64$username$47$core$46$TokenKind$
|
|
190
|
-
const $64$username$47$core$46$TokenKind$
|
|
191
|
-
const $64$username$47$core$46$TokenKind$
|
|
192
|
-
const $64$username$47$core$46$TokenKind$
|
|
193
|
-
const $64$username$47$core$46$TokenKind$
|
|
194
|
-
const $64$username$47$core$46$TokenKind$
|
|
195
|
-
const $64$username$47$core$46$TokenKind$
|
|
196
|
-
const $64$username$47$core$46$TokenKind$
|
|
197
|
-
const $64$username$47$core$46$TokenKind$
|
|
198
|
-
const $64$username$47$core$46$TokenKind$
|
|
199
|
-
const $64$username$47$core$46$TokenKind$
|
|
200
|
-
const $64$username$47$core$46$TokenKind$
|
|
201
|
-
const $64$username$47$core$46$TokenKind$
|
|
202
|
-
const $64$username$47$core$46$TokenKind$
|
|
203
|
-
const $64$username$47$core$46$TokenKind$
|
|
204
|
-
const $64$username$47$core$46$TokenKind$
|
|
205
|
-
const $64$username$47$core$46$TokenKind$
|
|
206
|
-
const $64$username$47$core$46$TokenKind$
|
|
207
|
-
const $64$username$47$core$46$TokenKind$
|
|
208
|
-
const $64$username$47$core$46$TokenKind$
|
|
209
|
-
const $64$username$47$core$46$TokenKind$
|
|
210
|
-
const $64$username$47$core$46$TokenKind$
|
|
211
|
-
const $64$username$47$core$46$TokenKind$
|
|
212
|
-
const $64$username$47$core$46$TokenKind$
|
|
213
|
-
const $64$username$47$core$46$TokenKind$
|
|
214
|
-
const $64$username$47$core$46$TokenKind$
|
|
215
|
-
const $64$username$47$core$46$TokenKind$
|
|
216
|
-
const $64$username$47$core$46$TokenKind$
|
|
217
|
-
const $64$username$47$core$46$TokenKind$
|
|
218
|
-
const $64$username$47$core$46$TokenKind$
|
|
219
|
-
const $64$username$47$core$46$TokenKind$
|
|
158
|
+
const $64$username$47$core$46$TokenKind$Pow = { $tag: 17, $name: "Pow" };
|
|
159
|
+
const $64$username$47$core$46$TokenKind$Eq = { $tag: 18, $name: "Eq" };
|
|
160
|
+
const $64$username$47$core$46$TokenKind$Neq = { $tag: 19, $name: "Neq" };
|
|
161
|
+
const $64$username$47$core$46$TokenKind$Lt = { $tag: 20, $name: "Lt" };
|
|
162
|
+
const $64$username$47$core$46$TokenKind$Gt = { $tag: 21, $name: "Gt" };
|
|
163
|
+
const $64$username$47$core$46$TokenKind$Le = { $tag: 22, $name: "Le" };
|
|
164
|
+
const $64$username$47$core$46$TokenKind$Ge = { $tag: 23, $name: "Ge" };
|
|
165
|
+
const $64$username$47$core$46$TokenKind$And = { $tag: 24, $name: "And" };
|
|
166
|
+
const $64$username$47$core$46$TokenKind$Or = { $tag: 25, $name: "Or" };
|
|
167
|
+
const $64$username$47$core$46$TokenKind$Not = { $tag: 26, $name: "Not" };
|
|
168
|
+
const $64$username$47$core$46$TokenKind$Fn = { $tag: 27, $name: "Fn" };
|
|
169
|
+
const $64$username$47$core$46$TokenKind$Return_ = { $tag: 28, $name: "Return_" };
|
|
170
|
+
const $64$username$47$core$46$TokenKind$To = { $tag: 29, $name: "To" };
|
|
171
|
+
const $64$username$47$core$46$TokenKind$If_ = { $tag: 30, $name: "If_" };
|
|
172
|
+
const $64$username$47$core$46$TokenKind$Elif = { $tag: 31, $name: "Elif" };
|
|
173
|
+
const $64$username$47$core$46$TokenKind$Else_ = { $tag: 32, $name: "Else_" };
|
|
174
|
+
const $64$username$47$core$46$TokenKind$Unless = { $tag: 33, $name: "Unless" };
|
|
175
|
+
const $64$username$47$core$46$TokenKind$Then_ = { $tag: 34, $name: "Then_" };
|
|
176
|
+
const $64$username$47$core$46$TokenKind$While_ = { $tag: 35, $name: "While_" };
|
|
177
|
+
const $64$username$47$core$46$TokenKind$Until = { $tag: 36, $name: "Until" };
|
|
178
|
+
const $64$username$47$core$46$TokenKind$For_ = { $tag: 37, $name: "For_" };
|
|
179
|
+
const $64$username$47$core$46$TokenKind$In_ = { $tag: 38, $name: "In_" };
|
|
180
|
+
const $64$username$47$core$46$TokenKind$Range_ = { $tag: 39, $name: "Range_" };
|
|
181
|
+
const $64$username$47$core$46$TokenKind$Break_ = { $tag: 40, $name: "Break_" };
|
|
182
|
+
const $64$username$47$core$46$TokenKind$Continue_ = { $tag: 41, $name: "Continue_" };
|
|
183
|
+
const $64$username$47$core$46$TokenKind$Match_ = { $tag: 42, $name: "Match_" };
|
|
184
|
+
const $64$username$47$core$46$TokenKind$When_ = { $tag: 43, $name: "When_" };
|
|
185
|
+
const $64$username$47$core$46$TokenKind$Pipe_ = { $tag: 44, $name: "Pipe_" };
|
|
186
|
+
const $64$username$47$core$46$TokenKind$Is = { $tag: 45, $name: "Is" };
|
|
187
|
+
const $64$username$47$core$46$TokenKind$As = { $tag: 46, $name: "As" };
|
|
188
|
+
const $64$username$47$core$46$TokenKind$Of = { $tag: 47, $name: "Of" };
|
|
189
|
+
const $64$username$47$core$46$TokenKind$Gives = { $tag: 48, $name: "Gives" };
|
|
190
|
+
const $64$username$47$core$46$TokenKind$Typeof_ = { $tag: 49, $name: "Typeof_" };
|
|
191
|
+
const $64$username$47$core$46$TokenKind$Instanceof_ = { $tag: 50, $name: "Instanceof_" };
|
|
192
|
+
const $64$username$47$core$46$TokenKind$New_ = { $tag: 51, $name: "New_" };
|
|
193
|
+
const $64$username$47$core$46$TokenKind$Delete_ = { $tag: 52, $name: "Delete_" };
|
|
194
|
+
const $64$username$47$core$46$TokenKind$This_ = { $tag: 53, $name: "This_" };
|
|
195
|
+
const $64$username$47$core$46$TokenKind$Async_ = { $tag: 54, $name: "Async_" };
|
|
196
|
+
const $64$username$47$core$46$TokenKind$Await_ = { $tag: 55, $name: "Await_" };
|
|
197
|
+
const $64$username$47$core$46$TokenKind$Try_ = { $tag: 56, $name: "Try_" };
|
|
198
|
+
const $64$username$47$core$46$TokenKind$Catch_ = { $tag: 57, $name: "Catch_" };
|
|
199
|
+
const $64$username$47$core$46$TokenKind$Finally_ = { $tag: 58, $name: "Finally_" };
|
|
200
|
+
const $64$username$47$core$46$TokenKind$Throw_ = { $tag: 59, $name: "Throw_" };
|
|
201
|
+
const $64$username$47$core$46$TokenKind$Import_ = { $tag: 60, $name: "Import_" };
|
|
202
|
+
const $64$username$47$core$46$TokenKind$From_ = { $tag: 61, $name: "From_" };
|
|
203
|
+
const $64$username$47$core$46$TokenKind$Export_ = { $tag: 62, $name: "Export_" };
|
|
204
|
+
const $64$username$47$core$46$TokenKind$Default_ = { $tag: 63, $name: "Default_" };
|
|
205
|
+
const $64$username$47$core$46$TokenKind$Require_ = { $tag: 64, $name: "Require_" };
|
|
206
|
+
const $64$username$47$core$46$TokenKind$Use_ = { $tag: 65, $name: "Use_" };
|
|
207
|
+
const $64$username$47$core$46$TokenKind$Mod_ = { $tag: 66, $name: "Mod_" };
|
|
208
|
+
const $64$username$47$core$46$TokenKind$Pub_ = { $tag: 67, $name: "Pub_" };
|
|
209
|
+
const $64$username$47$core$46$TokenKind$All_ = { $tag: 68, $name: "All_" };
|
|
210
|
+
const $64$username$47$core$46$TokenKind$Type_ = { $tag: 69, $name: "Type_" };
|
|
211
|
+
const $64$username$47$core$46$TokenKind$Null_ = { $tag: 70, $name: "Null_" };
|
|
212
|
+
const $64$username$47$core$46$TokenKind$Nil_ = { $tag: 71, $name: "Nil_" };
|
|
213
|
+
const $64$username$47$core$46$TokenKind$Undefined_ = { $tag: 72, $name: "Undefined_" };
|
|
214
|
+
const $64$username$47$core$46$TokenKind$List_ = { $tag: 73, $name: "List_" };
|
|
215
|
+
const $64$username$47$core$46$TokenKind$Object_ = { $tag: 74, $name: "Object_" };
|
|
216
|
+
const $64$username$47$core$46$TokenKind$LBracket = { $tag: 75, $name: "LBracket" };
|
|
217
|
+
const $64$username$47$core$46$TokenKind$RBracket = { $tag: 76, $name: "RBracket" };
|
|
218
|
+
const $64$username$47$core$46$TokenKind$Comma = { $tag: 77, $name: "Comma" };
|
|
219
|
+
const $64$username$47$core$46$TokenKind$Semicolon = { $tag: 78, $name: "Semicolon" };
|
|
220
|
+
const $64$username$47$core$46$TokenKind$Dot = { $tag: 79, $name: "Dot" };
|
|
221
|
+
const $64$username$47$core$46$TokenKind$DotDot = { $tag: 80, $name: "DotDot" };
|
|
222
|
+
const $64$username$47$core$46$TokenKind$DotDotDot = { $tag: 81, $name: "DotDotDot" };
|
|
223
|
+
const $64$username$47$core$46$TokenKind$Newline = { $tag: 82, $name: "Newline" };
|
|
220
224
|
function $64$username$47$core$46$TokenKind$Indent(param0) {
|
|
221
225
|
this._0 = param0;
|
|
222
226
|
}
|
|
223
|
-
$64$username$47$core$46$TokenKind$Indent.prototype.$tag =
|
|
227
|
+
$64$username$47$core$46$TokenKind$Indent.prototype.$tag = 83;
|
|
224
228
|
$64$username$47$core$46$TokenKind$Indent.prototype.$name = "Indent";
|
|
225
229
|
function $64$username$47$core$46$TokenKind$Shebang(param0) {
|
|
226
230
|
this._0 = param0;
|
|
227
231
|
}
|
|
228
|
-
$64$username$47$core$46$TokenKind$Shebang.prototype.$tag =
|
|
232
|
+
$64$username$47$core$46$TokenKind$Shebang.prototype.$tag = 84;
|
|
229
233
|
$64$username$47$core$46$TokenKind$Shebang.prototype.$name = "Shebang";
|
|
230
234
|
function $64$username$47$core$46$TokenKind$Comment(param0) {
|
|
231
235
|
this._0 = param0;
|
|
232
236
|
}
|
|
233
|
-
$64$username$47$core$46$TokenKind$Comment.prototype.$tag =
|
|
237
|
+
$64$username$47$core$46$TokenKind$Comment.prototype.$tag = 85;
|
|
234
238
|
$64$username$47$core$46$TokenKind$Comment.prototype.$name = "Comment";
|
|
235
239
|
function $64$username$47$core$46$TokenKind$BlockComment(param0) {
|
|
236
240
|
this._0 = param0;
|
|
237
241
|
}
|
|
238
|
-
$64$username$47$core$46$TokenKind$BlockComment.prototype.$tag =
|
|
242
|
+
$64$username$47$core$46$TokenKind$BlockComment.prototype.$tag = 86;
|
|
239
243
|
$64$username$47$core$46$TokenKind$BlockComment.prototype.$name = "BlockComment";
|
|
240
|
-
const $64$username$47$core$46$TokenKind$Eof = { $tag:
|
|
244
|
+
const $64$username$47$core$46$TokenKind$Eof = { $tag: 87, $name: "Eof" };
|
|
241
245
|
function $64$username$47$core$46$Stmt$VarDecl(param0, param1, param2) {
|
|
242
246
|
this._0 = param0;
|
|
243
247
|
this._1 = param1;
|
|
@@ -245,16 +249,23 @@ function $64$username$47$core$46$Stmt$VarDecl(param0, param1, param2) {
|
|
|
245
249
|
}
|
|
246
250
|
$64$username$47$core$46$Stmt$VarDecl.prototype.$tag = 0;
|
|
247
251
|
$64$username$47$core$46$Stmt$VarDecl.prototype.$name = "VarDecl";
|
|
252
|
+
function $64$username$47$core$46$Stmt$DestructDecl(param0, param1, param2) {
|
|
253
|
+
this._0 = param0;
|
|
254
|
+
this._1 = param1;
|
|
255
|
+
this._2 = param2;
|
|
256
|
+
}
|
|
257
|
+
$64$username$47$core$46$Stmt$DestructDecl.prototype.$tag = 1;
|
|
258
|
+
$64$username$47$core$46$Stmt$DestructDecl.prototype.$name = "DestructDecl";
|
|
248
259
|
function $64$username$47$core$46$Stmt$Assign(param0, param1) {
|
|
249
260
|
this._0 = param0;
|
|
250
261
|
this._1 = param1;
|
|
251
262
|
}
|
|
252
|
-
$64$username$47$core$46$Stmt$Assign.prototype.$tag =
|
|
263
|
+
$64$username$47$core$46$Stmt$Assign.prototype.$tag = 2;
|
|
253
264
|
$64$username$47$core$46$Stmt$Assign.prototype.$name = "Assign";
|
|
254
265
|
function $64$username$47$core$46$Stmt$FnDecl(param0) {
|
|
255
266
|
this._0 = param0;
|
|
256
267
|
}
|
|
257
|
-
$64$username$47$core$46$Stmt$FnDecl.prototype.$tag =
|
|
268
|
+
$64$username$47$core$46$Stmt$FnDecl.prototype.$tag = 3;
|
|
258
269
|
$64$username$47$core$46$Stmt$FnDecl.prototype.$name = "FnDecl";
|
|
259
270
|
function $64$username$47$core$46$Stmt$If(param0, param1, param2, param3) {
|
|
260
271
|
this._0 = param0;
|
|
@@ -262,25 +273,25 @@ function $64$username$47$core$46$Stmt$If(param0, param1, param2, param3) {
|
|
|
262
273
|
this._2 = param2;
|
|
263
274
|
this._3 = param3;
|
|
264
275
|
}
|
|
265
|
-
$64$username$47$core$46$Stmt$If.prototype.$tag =
|
|
276
|
+
$64$username$47$core$46$Stmt$If.prototype.$tag = 4;
|
|
266
277
|
$64$username$47$core$46$Stmt$If.prototype.$name = "If";
|
|
267
278
|
function $64$username$47$core$46$Stmt$Unless(param0, param1) {
|
|
268
279
|
this._0 = param0;
|
|
269
280
|
this._1 = param1;
|
|
270
281
|
}
|
|
271
|
-
$64$username$47$core$46$Stmt$Unless.prototype.$tag =
|
|
282
|
+
$64$username$47$core$46$Stmt$Unless.prototype.$tag = 5;
|
|
272
283
|
$64$username$47$core$46$Stmt$Unless.prototype.$name = "Unless";
|
|
273
284
|
function $64$username$47$core$46$Stmt$While(param0, param1) {
|
|
274
285
|
this._0 = param0;
|
|
275
286
|
this._1 = param1;
|
|
276
287
|
}
|
|
277
|
-
$64$username$47$core$46$Stmt$While.prototype.$tag =
|
|
288
|
+
$64$username$47$core$46$Stmt$While.prototype.$tag = 6;
|
|
278
289
|
$64$username$47$core$46$Stmt$While.prototype.$name = "While";
|
|
279
290
|
function $64$username$47$core$46$Stmt$Until(param0, param1) {
|
|
280
291
|
this._0 = param0;
|
|
281
292
|
this._1 = param1;
|
|
282
293
|
}
|
|
283
|
-
$64$username$47$core$46$Stmt$Until.prototype.$tag =
|
|
294
|
+
$64$username$47$core$46$Stmt$Until.prototype.$tag = 7;
|
|
284
295
|
$64$username$47$core$46$Stmt$Until.prototype.$name = "Until";
|
|
285
296
|
function $64$username$47$core$46$Stmt$ForIn(param0, param1, param2, param3) {
|
|
286
297
|
this._0 = param0;
|
|
@@ -288,7 +299,7 @@ function $64$username$47$core$46$Stmt$ForIn(param0, param1, param2, param3) {
|
|
|
288
299
|
this._2 = param2;
|
|
289
300
|
this._3 = param3;
|
|
290
301
|
}
|
|
291
|
-
$64$username$47$core$46$Stmt$ForIn.prototype.$tag =
|
|
302
|
+
$64$username$47$core$46$Stmt$ForIn.prototype.$tag = 8;
|
|
292
303
|
$64$username$47$core$46$Stmt$ForIn.prototype.$name = "ForIn";
|
|
293
304
|
function $64$username$47$core$46$Stmt$ForRange(param0, param1, param2, param3) {
|
|
294
305
|
this._0 = param0;
|
|
@@ -296,32 +307,32 @@ function $64$username$47$core$46$Stmt$ForRange(param0, param1, param2, param3) {
|
|
|
296
307
|
this._2 = param2;
|
|
297
308
|
this._3 = param3;
|
|
298
309
|
}
|
|
299
|
-
$64$username$47$core$46$Stmt$ForRange.prototype.$tag =
|
|
310
|
+
$64$username$47$core$46$Stmt$ForRange.prototype.$tag = 9;
|
|
300
311
|
$64$username$47$core$46$Stmt$ForRange.prototype.$name = "ForRange";
|
|
301
312
|
function $64$username$47$core$46$Stmt$MatchStmt(param0, param1) {
|
|
302
313
|
this._0 = param0;
|
|
303
314
|
this._1 = param1;
|
|
304
315
|
}
|
|
305
|
-
$64$username$47$core$46$Stmt$MatchStmt.prototype.$tag =
|
|
316
|
+
$64$username$47$core$46$Stmt$MatchStmt.prototype.$tag = 10;
|
|
306
317
|
$64$username$47$core$46$Stmt$MatchStmt.prototype.$name = "MatchStmt";
|
|
307
318
|
function $64$username$47$core$46$Stmt$PostfixIf(param0, param1) {
|
|
308
319
|
this._0 = param0;
|
|
309
320
|
this._1 = param1;
|
|
310
321
|
}
|
|
311
|
-
$64$username$47$core$46$Stmt$PostfixIf.prototype.$tag =
|
|
322
|
+
$64$username$47$core$46$Stmt$PostfixIf.prototype.$tag = 11;
|
|
312
323
|
$64$username$47$core$46$Stmt$PostfixIf.prototype.$name = "PostfixIf";
|
|
313
324
|
function $64$username$47$core$46$Stmt$PostfixUnless(param0, param1) {
|
|
314
325
|
this._0 = param0;
|
|
315
326
|
this._1 = param1;
|
|
316
327
|
}
|
|
317
|
-
$64$username$47$core$46$Stmt$PostfixUnless.prototype.$tag =
|
|
328
|
+
$64$username$47$core$46$Stmt$PostfixUnless.prototype.$tag = 12;
|
|
318
329
|
$64$username$47$core$46$Stmt$PostfixUnless.prototype.$name = "PostfixUnless";
|
|
319
330
|
function $64$username$47$core$46$Stmt$PostfixFor(param0, param1, param2) {
|
|
320
331
|
this._0 = param0;
|
|
321
332
|
this._1 = param1;
|
|
322
333
|
this._2 = param2;
|
|
323
334
|
}
|
|
324
|
-
$64$username$47$core$46$Stmt$PostfixFor.prototype.$tag =
|
|
335
|
+
$64$username$47$core$46$Stmt$PostfixFor.prototype.$tag = 13;
|
|
325
336
|
$64$username$47$core$46$Stmt$PostfixFor.prototype.$name = "PostfixFor";
|
|
326
337
|
function $64$username$47$core$46$Stmt$TryCatch(param0, param1, param2, param3) {
|
|
327
338
|
this._0 = param0;
|
|
@@ -329,62 +340,62 @@ function $64$username$47$core$46$Stmt$TryCatch(param0, param1, param2, param3) {
|
|
|
329
340
|
this._2 = param2;
|
|
330
341
|
this._3 = param3;
|
|
331
342
|
}
|
|
332
|
-
$64$username$47$core$46$Stmt$TryCatch.prototype.$tag =
|
|
343
|
+
$64$username$47$core$46$Stmt$TryCatch.prototype.$tag = 14;
|
|
333
344
|
$64$username$47$core$46$Stmt$TryCatch.prototype.$name = "TryCatch";
|
|
334
345
|
function $64$username$47$core$46$Stmt$Throw(param0) {
|
|
335
346
|
this._0 = param0;
|
|
336
347
|
}
|
|
337
|
-
$64$username$47$core$46$Stmt$Throw.prototype.$tag =
|
|
348
|
+
$64$username$47$core$46$Stmt$Throw.prototype.$tag = 15;
|
|
338
349
|
$64$username$47$core$46$Stmt$Throw.prototype.$name = "Throw";
|
|
339
350
|
function $64$username$47$core$46$Stmt$Return(param0) {
|
|
340
351
|
this._0 = param0;
|
|
341
352
|
}
|
|
342
|
-
$64$username$47$core$46$Stmt$Return.prototype.$tag =
|
|
353
|
+
$64$username$47$core$46$Stmt$Return.prototype.$tag = 16;
|
|
343
354
|
$64$username$47$core$46$Stmt$Return.prototype.$name = "Return";
|
|
344
|
-
const $64$username$47$core$46$Stmt$Break = { $tag:
|
|
345
|
-
const $64$username$47$core$46$Stmt$Continue = { $tag:
|
|
355
|
+
const $64$username$47$core$46$Stmt$Break = { $tag: 17, $name: "Break" };
|
|
356
|
+
const $64$username$47$core$46$Stmt$Continue = { $tag: 18, $name: "Continue" };
|
|
346
357
|
function $64$username$47$core$46$Stmt$ExprStmt(param0) {
|
|
347
358
|
this._0 = param0;
|
|
348
359
|
}
|
|
349
|
-
$64$username$47$core$46$Stmt$ExprStmt.prototype.$tag =
|
|
360
|
+
$64$username$47$core$46$Stmt$ExprStmt.prototype.$tag = 19;
|
|
350
361
|
$64$username$47$core$46$Stmt$ExprStmt.prototype.$name = "ExprStmt";
|
|
351
362
|
function $64$username$47$core$46$Stmt$ImportDecl(param0) {
|
|
352
363
|
this._0 = param0;
|
|
353
364
|
}
|
|
354
|
-
$64$username$47$core$46$Stmt$ImportDecl.prototype.$tag =
|
|
365
|
+
$64$username$47$core$46$Stmt$ImportDecl.prototype.$tag = 20;
|
|
355
366
|
$64$username$47$core$46$Stmt$ImportDecl.prototype.$name = "ImportDecl";
|
|
356
367
|
function $64$username$47$core$46$Stmt$UseDecl(param0, param1) {
|
|
357
368
|
this._0 = param0;
|
|
358
369
|
this._1 = param1;
|
|
359
370
|
}
|
|
360
|
-
$64$username$47$core$46$Stmt$UseDecl.prototype.$tag =
|
|
371
|
+
$64$username$47$core$46$Stmt$UseDecl.prototype.$tag = 21;
|
|
361
372
|
$64$username$47$core$46$Stmt$UseDecl.prototype.$name = "UseDecl";
|
|
362
373
|
function $64$username$47$core$46$Stmt$ModDecl(param0, param1) {
|
|
363
374
|
this._0 = param0;
|
|
364
375
|
this._1 = param1;
|
|
365
376
|
}
|
|
366
|
-
$64$username$47$core$46$Stmt$ModDecl.prototype.$tag =
|
|
377
|
+
$64$username$47$core$46$Stmt$ModDecl.prototype.$tag = 22;
|
|
367
378
|
$64$username$47$core$46$Stmt$ModDecl.prototype.$name = "ModDecl";
|
|
368
379
|
function $64$username$47$core$46$Stmt$ExportDefault(param0) {
|
|
369
380
|
this._0 = param0;
|
|
370
381
|
}
|
|
371
|
-
$64$username$47$core$46$Stmt$ExportDefault.prototype.$tag =
|
|
382
|
+
$64$username$47$core$46$Stmt$ExportDefault.prototype.$tag = 23;
|
|
372
383
|
$64$username$47$core$46$Stmt$ExportDefault.prototype.$name = "ExportDefault";
|
|
373
384
|
function $64$username$47$core$46$Stmt$PubDecl(param0) {
|
|
374
385
|
this._0 = param0;
|
|
375
386
|
}
|
|
376
|
-
$64$username$47$core$46$Stmt$PubDecl.prototype.$tag =
|
|
387
|
+
$64$username$47$core$46$Stmt$PubDecl.prototype.$tag = 24;
|
|
377
388
|
$64$username$47$core$46$Stmt$PubDecl.prototype.$name = "PubDecl";
|
|
378
389
|
function $64$username$47$core$46$Stmt$TypeDecl(param0, param1) {
|
|
379
390
|
this._0 = param0;
|
|
380
391
|
this._1 = param1;
|
|
381
392
|
}
|
|
382
|
-
$64$username$47$core$46$Stmt$TypeDecl.prototype.$tag =
|
|
393
|
+
$64$username$47$core$46$Stmt$TypeDecl.prototype.$tag = 25;
|
|
383
394
|
$64$username$47$core$46$Stmt$TypeDecl.prototype.$name = "TypeDecl";
|
|
384
395
|
function $64$username$47$core$46$Stmt$DeleteStmt(param0) {
|
|
385
396
|
this._0 = param0;
|
|
386
397
|
}
|
|
387
|
-
$64$username$47$core$46$Stmt$DeleteStmt.prototype.$tag =
|
|
398
|
+
$64$username$47$core$46$Stmt$DeleteStmt.prototype.$tag = 26;
|
|
388
399
|
$64$username$47$core$46$Stmt$DeleteStmt.prototype.$name = "DeleteStmt";
|
|
389
400
|
const Option$None$4$ = { $tag: 0, $name: "None" };
|
|
390
401
|
function Option$Some$4$(param0) {
|
|
@@ -459,136 +470,151 @@ function $64$username$47$core$46$Expr$ArrayLit(param0) {
|
|
|
459
470
|
}
|
|
460
471
|
$64$username$47$core$46$Expr$ArrayLit.prototype.$tag = 8;
|
|
461
472
|
$64$username$47$core$46$Expr$ArrayLit.prototype.$name = "ArrayLit";
|
|
473
|
+
function $64$username$47$core$46$Expr$RangeArray(param0, param1, param2) {
|
|
474
|
+
this._0 = param0;
|
|
475
|
+
this._1 = param1;
|
|
476
|
+
this._2 = param2;
|
|
477
|
+
}
|
|
478
|
+
$64$username$47$core$46$Expr$RangeArray.prototype.$tag = 9;
|
|
479
|
+
$64$username$47$core$46$Expr$RangeArray.prototype.$name = "RangeArray";
|
|
480
|
+
function $64$username$47$core$46$Expr$Slice(param0, param1, param2, param3) {
|
|
481
|
+
this._0 = param0;
|
|
482
|
+
this._1 = param1;
|
|
483
|
+
this._2 = param2;
|
|
484
|
+
this._3 = param3;
|
|
485
|
+
}
|
|
486
|
+
$64$username$47$core$46$Expr$Slice.prototype.$tag = 10;
|
|
487
|
+
$64$username$47$core$46$Expr$Slice.prototype.$name = "Slice";
|
|
462
488
|
function $64$username$47$core$46$Expr$ObjectLit(param0) {
|
|
463
489
|
this._0 = param0;
|
|
464
490
|
}
|
|
465
|
-
$64$username$47$core$46$Expr$ObjectLit.prototype.$tag =
|
|
491
|
+
$64$username$47$core$46$Expr$ObjectLit.prototype.$tag = 11;
|
|
466
492
|
$64$username$47$core$46$Expr$ObjectLit.prototype.$name = "ObjectLit";
|
|
467
493
|
function $64$username$47$core$46$Expr$Ident(param0) {
|
|
468
494
|
this._0 = param0;
|
|
469
495
|
}
|
|
470
|
-
$64$username$47$core$46$Expr$Ident.prototype.$tag =
|
|
496
|
+
$64$username$47$core$46$Expr$Ident.prototype.$tag = 12;
|
|
471
497
|
$64$username$47$core$46$Expr$Ident.prototype.$name = "Ident";
|
|
472
498
|
function $64$username$47$core$46$Expr$DotAccess(param0, param1) {
|
|
473
499
|
this._0 = param0;
|
|
474
500
|
this._1 = param1;
|
|
475
501
|
}
|
|
476
|
-
$64$username$47$core$46$Expr$DotAccess.prototype.$tag =
|
|
502
|
+
$64$username$47$core$46$Expr$DotAccess.prototype.$tag = 13;
|
|
477
503
|
$64$username$47$core$46$Expr$DotAccess.prototype.$name = "DotAccess";
|
|
478
504
|
function $64$username$47$core$46$Expr$IndexAccess(param0, param1) {
|
|
479
505
|
this._0 = param0;
|
|
480
506
|
this._1 = param1;
|
|
481
507
|
}
|
|
482
|
-
$64$username$47$core$46$Expr$IndexAccess.prototype.$tag =
|
|
508
|
+
$64$username$47$core$46$Expr$IndexAccess.prototype.$tag = 14;
|
|
483
509
|
$64$username$47$core$46$Expr$IndexAccess.prototype.$name = "IndexAccess";
|
|
484
510
|
function $64$username$47$core$46$Expr$BinOp(param0, param1, param2) {
|
|
485
511
|
this._0 = param0;
|
|
486
512
|
this._1 = param1;
|
|
487
513
|
this._2 = param2;
|
|
488
514
|
}
|
|
489
|
-
$64$username$47$core$46$Expr$BinOp.prototype.$tag =
|
|
515
|
+
$64$username$47$core$46$Expr$BinOp.prototype.$tag = 15;
|
|
490
516
|
$64$username$47$core$46$Expr$BinOp.prototype.$name = "BinOp";
|
|
491
517
|
function $64$username$47$core$46$Expr$UnaryNeg(param0) {
|
|
492
518
|
this._0 = param0;
|
|
493
519
|
}
|
|
494
|
-
$64$username$47$core$46$Expr$UnaryNeg.prototype.$tag =
|
|
520
|
+
$64$username$47$core$46$Expr$UnaryNeg.prototype.$tag = 16;
|
|
495
521
|
$64$username$47$core$46$Expr$UnaryNeg.prototype.$name = "UnaryNeg";
|
|
496
522
|
function $64$username$47$core$46$Expr$UnaryNot(param0) {
|
|
497
523
|
this._0 = param0;
|
|
498
524
|
}
|
|
499
|
-
$64$username$47$core$46$Expr$UnaryNot.prototype.$tag =
|
|
525
|
+
$64$username$47$core$46$Expr$UnaryNot.prototype.$tag = 17;
|
|
500
526
|
$64$username$47$core$46$Expr$UnaryNot.prototype.$name = "UnaryNot";
|
|
501
527
|
function $64$username$47$core$46$Expr$UnaryTypeof(param0) {
|
|
502
528
|
this._0 = param0;
|
|
503
529
|
}
|
|
504
|
-
$64$username$47$core$46$Expr$UnaryTypeof.prototype.$tag =
|
|
530
|
+
$64$username$47$core$46$Expr$UnaryTypeof.prototype.$tag = 18;
|
|
505
531
|
$64$username$47$core$46$Expr$UnaryTypeof.prototype.$name = "UnaryTypeof";
|
|
506
532
|
function $64$username$47$core$46$Expr$IsCheck(param0, param1) {
|
|
507
533
|
this._0 = param0;
|
|
508
534
|
this._1 = param1;
|
|
509
535
|
}
|
|
510
|
-
$64$username$47$core$46$Expr$IsCheck.prototype.$tag =
|
|
536
|
+
$64$username$47$core$46$Expr$IsCheck.prototype.$tag = 19;
|
|
511
537
|
$64$username$47$core$46$Expr$IsCheck.prototype.$name = "IsCheck";
|
|
512
538
|
function $64$username$47$core$46$Expr$AsCast(param0, param1) {
|
|
513
539
|
this._0 = param0;
|
|
514
540
|
this._1 = param1;
|
|
515
541
|
}
|
|
516
|
-
$64$username$47$core$46$Expr$AsCast.prototype.$tag =
|
|
542
|
+
$64$username$47$core$46$Expr$AsCast.prototype.$tag = 20;
|
|
517
543
|
$64$username$47$core$46$Expr$AsCast.prototype.$name = "AsCast";
|
|
518
544
|
function $64$username$47$core$46$Expr$Instanceof(param0, param1) {
|
|
519
545
|
this._0 = param0;
|
|
520
546
|
this._1 = param1;
|
|
521
547
|
}
|
|
522
|
-
$64$username$47$core$46$Expr$Instanceof.prototype.$tag =
|
|
548
|
+
$64$username$47$core$46$Expr$Instanceof.prototype.$tag = 21;
|
|
523
549
|
$64$username$47$core$46$Expr$Instanceof.prototype.$name = "Instanceof";
|
|
524
550
|
function $64$username$47$core$46$Expr$FnExpr(param0, param1) {
|
|
525
551
|
this._0 = param0;
|
|
526
552
|
this._1 = param1;
|
|
527
553
|
}
|
|
528
|
-
$64$username$47$core$46$Expr$FnExpr.prototype.$tag =
|
|
554
|
+
$64$username$47$core$46$Expr$FnExpr.prototype.$tag = 22;
|
|
529
555
|
$64$username$47$core$46$Expr$FnExpr.prototype.$name = "FnExpr";
|
|
530
556
|
function $64$username$47$core$46$Expr$FnExprTo(param0, param1) {
|
|
531
557
|
this._0 = param0;
|
|
532
558
|
this._1 = param1;
|
|
533
559
|
}
|
|
534
|
-
$64$username$47$core$46$Expr$FnExprTo.prototype.$tag =
|
|
560
|
+
$64$username$47$core$46$Expr$FnExprTo.prototype.$tag = 23;
|
|
535
561
|
$64$username$47$core$46$Expr$FnExprTo.prototype.$name = "FnExprTo";
|
|
536
562
|
function $64$username$47$core$46$Expr$Call(param0, param1) {
|
|
537
563
|
this._0 = param0;
|
|
538
564
|
this._1 = param1;
|
|
539
565
|
}
|
|
540
|
-
$64$username$47$core$46$Expr$Call.prototype.$tag =
|
|
566
|
+
$64$username$47$core$46$Expr$Call.prototype.$tag = 24;
|
|
541
567
|
$64$username$47$core$46$Expr$Call.prototype.$name = "Call";
|
|
542
568
|
function $64$username$47$core$46$Expr$MethodCall(param0, param1, param2) {
|
|
543
569
|
this._0 = param0;
|
|
544
570
|
this._1 = param1;
|
|
545
571
|
this._2 = param2;
|
|
546
572
|
}
|
|
547
|
-
$64$username$47$core$46$Expr$MethodCall.prototype.$tag =
|
|
573
|
+
$64$username$47$core$46$Expr$MethodCall.prototype.$tag = 25;
|
|
548
574
|
$64$username$47$core$46$Expr$MethodCall.prototype.$name = "MethodCall";
|
|
549
575
|
function $64$username$47$core$46$Expr$NewExpr(param0, param1) {
|
|
550
576
|
this._0 = param0;
|
|
551
577
|
this._1 = param1;
|
|
552
578
|
}
|
|
553
|
-
$64$username$47$core$46$Expr$NewExpr.prototype.$tag =
|
|
579
|
+
$64$username$47$core$46$Expr$NewExpr.prototype.$tag = 26;
|
|
554
580
|
$64$username$47$core$46$Expr$NewExpr.prototype.$name = "NewExpr";
|
|
555
581
|
function $64$username$47$core$46$Expr$Pipe(param0, param1) {
|
|
556
582
|
this._0 = param0;
|
|
557
583
|
this._1 = param1;
|
|
558
584
|
}
|
|
559
|
-
$64$username$47$core$46$Expr$Pipe.prototype.$tag =
|
|
585
|
+
$64$username$47$core$46$Expr$Pipe.prototype.$tag = 27;
|
|
560
586
|
$64$username$47$core$46$Expr$Pipe.prototype.$name = "Pipe";
|
|
561
587
|
function $64$username$47$core$46$Expr$IfExpr(param0, param1, param2) {
|
|
562
588
|
this._0 = param0;
|
|
563
589
|
this._1 = param1;
|
|
564
590
|
this._2 = param2;
|
|
565
591
|
}
|
|
566
|
-
$64$username$47$core$46$Expr$IfExpr.prototype.$tag =
|
|
592
|
+
$64$username$47$core$46$Expr$IfExpr.prototype.$tag = 28;
|
|
567
593
|
$64$username$47$core$46$Expr$IfExpr.prototype.$name = "IfExpr";
|
|
568
594
|
function $64$username$47$core$46$Expr$TryExpr(param0, param1, param2) {
|
|
569
595
|
this._0 = param0;
|
|
570
596
|
this._1 = param1;
|
|
571
597
|
this._2 = param2;
|
|
572
598
|
}
|
|
573
|
-
$64$username$47$core$46$Expr$TryExpr.prototype.$tag =
|
|
599
|
+
$64$username$47$core$46$Expr$TryExpr.prototype.$tag = 29;
|
|
574
600
|
$64$username$47$core$46$Expr$TryExpr.prototype.$name = "TryExpr";
|
|
575
601
|
function $64$username$47$core$46$Expr$MatchExpr(param0, param1) {
|
|
576
602
|
this._0 = param0;
|
|
577
603
|
this._1 = param1;
|
|
578
604
|
}
|
|
579
|
-
$64$username$47$core$46$Expr$MatchExpr.prototype.$tag =
|
|
605
|
+
$64$username$47$core$46$Expr$MatchExpr.prototype.$tag = 30;
|
|
580
606
|
$64$username$47$core$46$Expr$MatchExpr.prototype.$name = "MatchExpr";
|
|
581
607
|
function $64$username$47$core$46$Expr$AwaitExpr(param0) {
|
|
582
608
|
this._0 = param0;
|
|
583
609
|
}
|
|
584
|
-
$64$username$47$core$46$Expr$AwaitExpr.prototype.$tag =
|
|
610
|
+
$64$username$47$core$46$Expr$AwaitExpr.prototype.$tag = 31;
|
|
585
611
|
$64$username$47$core$46$Expr$AwaitExpr.prototype.$name = "AwaitExpr";
|
|
586
612
|
function $64$username$47$core$46$Expr$DeleteExpr(param0) {
|
|
587
613
|
this._0 = param0;
|
|
588
614
|
}
|
|
589
|
-
$64$username$47$core$46$Expr$DeleteExpr.prototype.$tag =
|
|
615
|
+
$64$username$47$core$46$Expr$DeleteExpr.prototype.$tag = 32;
|
|
590
616
|
$64$username$47$core$46$Expr$DeleteExpr.prototype.$name = "DeleteExpr";
|
|
591
|
-
const $64$username$47$core$46$Expr$ThisExpr = { $tag:
|
|
617
|
+
const $64$username$47$core$46$Expr$ThisExpr = { $tag: 33, $name: "ThisExpr" };
|
|
592
618
|
function $64$username$47$core$46$FnBody$Block(param0) {
|
|
593
619
|
this._0 = param0;
|
|
594
620
|
}
|
|
@@ -616,7 +642,6 @@ function $64$username$47$core$46$MatchBody$BlockBody(param0) {
|
|
|
616
642
|
$64$username$47$core$46$MatchBody$BlockBody.prototype.$tag = 1;
|
|
617
643
|
$64$username$47$core$46$MatchBody$BlockBody.prototype.$name = "BlockBody";
|
|
618
644
|
const _M0FP095_40moonbitlang_2fcore_2fbuiltin_2eStringBuilder_24as_24_40moonbitlang_2fcore_2fbuiltin_2eLogger = { method_0: _M0IP311moonbitlang4core7builtin13StringBuilderP311moonbitlang4core7builtin6Logger13write__string, method_1: _M0IP016_24default__implP311moonbitlang4core7builtin6Logger16write__substringGRP311moonbitlang4core7builtin13StringBuilderE, method_2: _M0IP311moonbitlang4core7builtin13StringBuilderP311moonbitlang4core7builtin6Logger11write__view, method_3: _M0IP311moonbitlang4core7builtin13StringBuilderP311moonbitlang4core7builtin6Logger11write__char };
|
|
619
|
-
const _M0FP48username4core3cmd4main7version = "0.2.0";
|
|
620
645
|
const _M0FP311moonbitlang4core7builtin33brute__force__find_2econstr_2f209 = 0;
|
|
621
646
|
const _M0FP311moonbitlang4core7builtin43boyer__moore__horspool__find_2econstr_2f195 = 0;
|
|
622
647
|
function _M0FP311moonbitlang4core5abort5abortGRP311moonbitlang4core7builtin9ArrayViewGsEE(msg) {
|
|
@@ -1244,10 +1269,10 @@ function _M0MP311moonbitlang4core6string6String4view(self, start_offset$46$opt,
|
|
|
1244
1269
|
function _M0MP311moonbitlang4core5array9ArrayView6lengthGsE(self) {
|
|
1245
1270
|
return self.end - self.start | 0;
|
|
1246
1271
|
}
|
|
1247
|
-
function
|
|
1272
|
+
function _M0MP311moonbitlang4core5array9ArrayView6lengthGcE(self) {
|
|
1248
1273
|
return self.end - self.start | 0;
|
|
1249
1274
|
}
|
|
1250
|
-
function
|
|
1275
|
+
function _M0MP311moonbitlang4core5array9ArrayView6lengthGyE(self) {
|
|
1251
1276
|
return self.end - self.start | 0;
|
|
1252
1277
|
}
|
|
1253
1278
|
function _M0MP311moonbitlang4core6string6String11from__array(chars) {
|
|
@@ -1504,13 +1529,13 @@ function _M0MP311moonbitlang4core5array5Array4pushGRP28username4core4StmtE(self,
|
|
|
1504
1529
|
function _M0MP311moonbitlang4core5array5Array4pushGcE(self, value) {
|
|
1505
1530
|
_M0MP311moonbitlang4core7builtin7JSArray4push(self, value);
|
|
1506
1531
|
}
|
|
1507
|
-
function
|
|
1532
|
+
function _M0MP311moonbitlang4core5array5Array4pushGsE(self, value) {
|
|
1508
1533
|
_M0MP311moonbitlang4core7builtin7JSArray4push(self, value);
|
|
1509
1534
|
}
|
|
1510
1535
|
function _M0MP311moonbitlang4core5array5Array4pushGRP28username4core10ElIfBranchE(self, value) {
|
|
1511
1536
|
_M0MP311moonbitlang4core7builtin7JSArray4push(self, value);
|
|
1512
1537
|
}
|
|
1513
|
-
function
|
|
1538
|
+
function _M0MP311moonbitlang4core5array5Array4pushGyE(self, value) {
|
|
1514
1539
|
_M0MP311moonbitlang4core7builtin7JSArray4push(self, value);
|
|
1515
1540
|
}
|
|
1516
1541
|
function _M0MP311moonbitlang4core5array5Array4pushGRP28username4core4ExprE(self, value) {
|
|
@@ -2061,685 +2086,706 @@ function _M0FP511moonbitlang1x3sys8internal3ffi14get__cli__args() {
|
|
|
2061
2086
|
function _M0FP311moonbitlang1x3sys14get__cli__args() {
|
|
2062
2087
|
return _M0FP511moonbitlang1x3sys8internal3ffi14get__cli__args();
|
|
2063
2088
|
}
|
|
2064
|
-
function _M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(
|
|
2065
|
-
let
|
|
2066
|
-
let
|
|
2089
|
+
function _M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_x_767, _x_768) {
|
|
2090
|
+
let _x0_787;
|
|
2091
|
+
let _y0_788;
|
|
2067
2092
|
_L: {
|
|
2068
|
-
let
|
|
2069
|
-
let
|
|
2093
|
+
let _x0_785;
|
|
2094
|
+
let _y0_786;
|
|
2070
2095
|
_L$2: {
|
|
2071
|
-
let
|
|
2072
|
-
let
|
|
2096
|
+
let _x0_783;
|
|
2097
|
+
let _y0_784;
|
|
2073
2098
|
_L$3: {
|
|
2074
|
-
let
|
|
2075
|
-
let
|
|
2099
|
+
let _x0_781;
|
|
2100
|
+
let _y0_782;
|
|
2076
2101
|
_L$4: {
|
|
2077
|
-
let
|
|
2078
|
-
let
|
|
2102
|
+
let _x0_779;
|
|
2103
|
+
let _y0_780;
|
|
2079
2104
|
_L$5: {
|
|
2080
|
-
let
|
|
2081
|
-
let
|
|
2082
|
-
let
|
|
2083
|
-
let
|
|
2105
|
+
let _x1_776;
|
|
2106
|
+
let _x0_775;
|
|
2107
|
+
let _y0_777;
|
|
2108
|
+
let _y1_778;
|
|
2084
2109
|
_L$6: {
|
|
2085
|
-
let
|
|
2086
|
-
let
|
|
2110
|
+
let _x0_773;
|
|
2111
|
+
let _y0_774;
|
|
2087
2112
|
_L$7: {
|
|
2088
|
-
let
|
|
2089
|
-
let
|
|
2113
|
+
let _x0_771;
|
|
2114
|
+
let _y0_772;
|
|
2090
2115
|
_L$8: {
|
|
2091
|
-
let
|
|
2092
|
-
let
|
|
2116
|
+
let _x0_769;
|
|
2117
|
+
let _y0_770;
|
|
2093
2118
|
_L$9: {
|
|
2094
|
-
switch (
|
|
2119
|
+
switch (_x_767.$tag) {
|
|
2095
2120
|
case 0: {
|
|
2096
|
-
const _Int =
|
|
2097
|
-
const _$42$
|
|
2098
|
-
if (
|
|
2099
|
-
const _Int$2 =
|
|
2100
|
-
const _$42$
|
|
2101
|
-
|
|
2102
|
-
|
|
2121
|
+
const _Int = _x_767;
|
|
2122
|
+
const _$42$x0_769 = _Int._0;
|
|
2123
|
+
if (_x_768.$tag === 0) {
|
|
2124
|
+
const _Int$2 = _x_768;
|
|
2125
|
+
const _$42$y0_770 = _Int$2._0;
|
|
2126
|
+
_x0_769 = _$42$x0_769;
|
|
2127
|
+
_y0_770 = _$42$y0_770;
|
|
2103
2128
|
break _L$9;
|
|
2104
2129
|
} else {
|
|
2105
2130
|
return false;
|
|
2106
2131
|
}
|
|
2107
2132
|
}
|
|
2108
2133
|
case 1: {
|
|
2109
|
-
const _Float =
|
|
2110
|
-
const _$42$
|
|
2111
|
-
if (
|
|
2112
|
-
const _Float$2 =
|
|
2113
|
-
const _$42$
|
|
2114
|
-
|
|
2115
|
-
|
|
2134
|
+
const _Float = _x_767;
|
|
2135
|
+
const _$42$x0_771 = _Float._0;
|
|
2136
|
+
if (_x_768.$tag === 1) {
|
|
2137
|
+
const _Float$2 = _x_768;
|
|
2138
|
+
const _$42$y0_772 = _Float$2._0;
|
|
2139
|
+
_x0_771 = _$42$x0_771;
|
|
2140
|
+
_y0_772 = _$42$y0_772;
|
|
2116
2141
|
break _L$8;
|
|
2117
2142
|
} else {
|
|
2118
2143
|
return false;
|
|
2119
2144
|
}
|
|
2120
2145
|
}
|
|
2121
2146
|
case 2: {
|
|
2122
|
-
const _Str =
|
|
2123
|
-
const _$42$
|
|
2124
|
-
if (
|
|
2125
|
-
const _Str$2 =
|
|
2126
|
-
const _$42$
|
|
2127
|
-
|
|
2128
|
-
|
|
2147
|
+
const _Str = _x_767;
|
|
2148
|
+
const _$42$x0_773 = _Str._0;
|
|
2149
|
+
if (_x_768.$tag === 2) {
|
|
2150
|
+
const _Str$2 = _x_768;
|
|
2151
|
+
const _$42$y0_774 = _Str$2._0;
|
|
2152
|
+
_x0_773 = _$42$x0_773;
|
|
2153
|
+
_y0_774 = _$42$y0_774;
|
|
2129
2154
|
break _L$7;
|
|
2130
2155
|
} else {
|
|
2131
2156
|
return false;
|
|
2132
2157
|
}
|
|
2133
2158
|
}
|
|
2134
2159
|
case 3: {
|
|
2135
|
-
const _Regex =
|
|
2136
|
-
const _$42$
|
|
2137
|
-
const _$42$
|
|
2138
|
-
if (
|
|
2139
|
-
const _Regex$2 =
|
|
2140
|
-
const _$42$
|
|
2141
|
-
const _$42$
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2160
|
+
const _Regex = _x_767;
|
|
2161
|
+
const _$42$x0_775 = _Regex._0;
|
|
2162
|
+
const _$42$x1_776 = _Regex._1;
|
|
2163
|
+
if (_x_768.$tag === 3) {
|
|
2164
|
+
const _Regex$2 = _x_768;
|
|
2165
|
+
const _$42$y0_777 = _Regex$2._0;
|
|
2166
|
+
const _$42$y1_778 = _Regex$2._1;
|
|
2167
|
+
_x1_776 = _$42$x1_776;
|
|
2168
|
+
_x0_775 = _$42$x0_775;
|
|
2169
|
+
_y0_777 = _$42$y0_777;
|
|
2170
|
+
_y1_778 = _$42$y1_778;
|
|
2146
2171
|
break _L$6;
|
|
2147
2172
|
} else {
|
|
2148
2173
|
return false;
|
|
2149
2174
|
}
|
|
2150
2175
|
}
|
|
2151
2176
|
case 4: {
|
|
2152
|
-
if (
|
|
2177
|
+
if (_x_768.$tag === 4) {
|
|
2153
2178
|
return true;
|
|
2154
2179
|
} else {
|
|
2155
2180
|
return false;
|
|
2156
2181
|
}
|
|
2157
2182
|
}
|
|
2158
2183
|
case 5: {
|
|
2159
|
-
if (
|
|
2184
|
+
if (_x_768.$tag === 5) {
|
|
2160
2185
|
return true;
|
|
2161
2186
|
} else {
|
|
2162
2187
|
return false;
|
|
2163
2188
|
}
|
|
2164
2189
|
}
|
|
2165
2190
|
case 6: {
|
|
2166
|
-
const _Ident =
|
|
2167
|
-
const _$42$
|
|
2168
|
-
if (
|
|
2169
|
-
const _Ident$2 =
|
|
2170
|
-
const _$42$
|
|
2171
|
-
|
|
2172
|
-
|
|
2191
|
+
const _Ident = _x_767;
|
|
2192
|
+
const _$42$x0_779 = _Ident._0;
|
|
2193
|
+
if (_x_768.$tag === 6) {
|
|
2194
|
+
const _Ident$2 = _x_768;
|
|
2195
|
+
const _$42$y0_780 = _Ident$2._0;
|
|
2196
|
+
_x0_779 = _$42$x0_779;
|
|
2197
|
+
_y0_780 = _$42$y0_780;
|
|
2173
2198
|
break _L$5;
|
|
2174
2199
|
} else {
|
|
2175
2200
|
return false;
|
|
2176
2201
|
}
|
|
2177
2202
|
}
|
|
2178
2203
|
case 7: {
|
|
2179
|
-
if (
|
|
2204
|
+
if (_x_768.$tag === 7) {
|
|
2180
2205
|
return true;
|
|
2181
2206
|
} else {
|
|
2182
2207
|
return false;
|
|
2183
2208
|
}
|
|
2184
2209
|
}
|
|
2185
2210
|
case 8: {
|
|
2186
|
-
if (
|
|
2211
|
+
if (_x_768.$tag === 8) {
|
|
2187
2212
|
return true;
|
|
2188
2213
|
} else {
|
|
2189
2214
|
return false;
|
|
2190
2215
|
}
|
|
2191
2216
|
}
|
|
2192
2217
|
case 9: {
|
|
2193
|
-
if (
|
|
2218
|
+
if (_x_768.$tag === 9) {
|
|
2194
2219
|
return true;
|
|
2195
2220
|
} else {
|
|
2196
2221
|
return false;
|
|
2197
2222
|
}
|
|
2198
2223
|
}
|
|
2199
2224
|
case 10: {
|
|
2200
|
-
if (
|
|
2225
|
+
if (_x_768.$tag === 10) {
|
|
2201
2226
|
return true;
|
|
2202
2227
|
} else {
|
|
2203
2228
|
return false;
|
|
2204
2229
|
}
|
|
2205
2230
|
}
|
|
2206
2231
|
case 11: {
|
|
2207
|
-
if (
|
|
2232
|
+
if (_x_768.$tag === 11) {
|
|
2208
2233
|
return true;
|
|
2209
2234
|
} else {
|
|
2210
2235
|
return false;
|
|
2211
2236
|
}
|
|
2212
2237
|
}
|
|
2213
2238
|
case 12: {
|
|
2214
|
-
if (
|
|
2239
|
+
if (_x_768.$tag === 12) {
|
|
2215
2240
|
return true;
|
|
2216
2241
|
} else {
|
|
2217
2242
|
return false;
|
|
2218
2243
|
}
|
|
2219
2244
|
}
|
|
2220
2245
|
case 13: {
|
|
2221
|
-
if (
|
|
2246
|
+
if (_x_768.$tag === 13) {
|
|
2222
2247
|
return true;
|
|
2223
2248
|
} else {
|
|
2224
2249
|
return false;
|
|
2225
2250
|
}
|
|
2226
2251
|
}
|
|
2227
2252
|
case 14: {
|
|
2228
|
-
if (
|
|
2253
|
+
if (_x_768.$tag === 14) {
|
|
2229
2254
|
return true;
|
|
2230
2255
|
} else {
|
|
2231
2256
|
return false;
|
|
2232
2257
|
}
|
|
2233
2258
|
}
|
|
2234
2259
|
case 15: {
|
|
2235
|
-
if (
|
|
2260
|
+
if (_x_768.$tag === 15) {
|
|
2236
2261
|
return true;
|
|
2237
2262
|
} else {
|
|
2238
2263
|
return false;
|
|
2239
2264
|
}
|
|
2240
2265
|
}
|
|
2241
2266
|
case 16: {
|
|
2242
|
-
if (
|
|
2267
|
+
if (_x_768.$tag === 16) {
|
|
2243
2268
|
return true;
|
|
2244
2269
|
} else {
|
|
2245
2270
|
return false;
|
|
2246
2271
|
}
|
|
2247
2272
|
}
|
|
2248
2273
|
case 17: {
|
|
2249
|
-
if (
|
|
2274
|
+
if (_x_768.$tag === 17) {
|
|
2250
2275
|
return true;
|
|
2251
2276
|
} else {
|
|
2252
2277
|
return false;
|
|
2253
2278
|
}
|
|
2254
2279
|
}
|
|
2255
2280
|
case 18: {
|
|
2256
|
-
if (
|
|
2281
|
+
if (_x_768.$tag === 18) {
|
|
2257
2282
|
return true;
|
|
2258
2283
|
} else {
|
|
2259
2284
|
return false;
|
|
2260
2285
|
}
|
|
2261
2286
|
}
|
|
2262
2287
|
case 19: {
|
|
2263
|
-
if (
|
|
2288
|
+
if (_x_768.$tag === 19) {
|
|
2264
2289
|
return true;
|
|
2265
2290
|
} else {
|
|
2266
2291
|
return false;
|
|
2267
2292
|
}
|
|
2268
2293
|
}
|
|
2269
2294
|
case 20: {
|
|
2270
|
-
if (
|
|
2295
|
+
if (_x_768.$tag === 20) {
|
|
2271
2296
|
return true;
|
|
2272
2297
|
} else {
|
|
2273
2298
|
return false;
|
|
2274
2299
|
}
|
|
2275
2300
|
}
|
|
2276
2301
|
case 21: {
|
|
2277
|
-
if (
|
|
2302
|
+
if (_x_768.$tag === 21) {
|
|
2278
2303
|
return true;
|
|
2279
2304
|
} else {
|
|
2280
2305
|
return false;
|
|
2281
2306
|
}
|
|
2282
2307
|
}
|
|
2283
2308
|
case 22: {
|
|
2284
|
-
if (
|
|
2309
|
+
if (_x_768.$tag === 22) {
|
|
2285
2310
|
return true;
|
|
2286
2311
|
} else {
|
|
2287
2312
|
return false;
|
|
2288
2313
|
}
|
|
2289
2314
|
}
|
|
2290
2315
|
case 23: {
|
|
2291
|
-
if (
|
|
2316
|
+
if (_x_768.$tag === 23) {
|
|
2292
2317
|
return true;
|
|
2293
2318
|
} else {
|
|
2294
2319
|
return false;
|
|
2295
2320
|
}
|
|
2296
2321
|
}
|
|
2297
2322
|
case 24: {
|
|
2298
|
-
if (
|
|
2323
|
+
if (_x_768.$tag === 24) {
|
|
2299
2324
|
return true;
|
|
2300
2325
|
} else {
|
|
2301
2326
|
return false;
|
|
2302
2327
|
}
|
|
2303
2328
|
}
|
|
2304
2329
|
case 25: {
|
|
2305
|
-
if (
|
|
2330
|
+
if (_x_768.$tag === 25) {
|
|
2306
2331
|
return true;
|
|
2307
2332
|
} else {
|
|
2308
2333
|
return false;
|
|
2309
2334
|
}
|
|
2310
2335
|
}
|
|
2311
2336
|
case 26: {
|
|
2312
|
-
if (
|
|
2337
|
+
if (_x_768.$tag === 26) {
|
|
2313
2338
|
return true;
|
|
2314
2339
|
} else {
|
|
2315
2340
|
return false;
|
|
2316
2341
|
}
|
|
2317
2342
|
}
|
|
2318
2343
|
case 27: {
|
|
2319
|
-
if (
|
|
2344
|
+
if (_x_768.$tag === 27) {
|
|
2320
2345
|
return true;
|
|
2321
2346
|
} else {
|
|
2322
2347
|
return false;
|
|
2323
2348
|
}
|
|
2324
2349
|
}
|
|
2325
2350
|
case 28: {
|
|
2326
|
-
if (
|
|
2351
|
+
if (_x_768.$tag === 28) {
|
|
2327
2352
|
return true;
|
|
2328
2353
|
} else {
|
|
2329
2354
|
return false;
|
|
2330
2355
|
}
|
|
2331
2356
|
}
|
|
2332
2357
|
case 29: {
|
|
2333
|
-
if (
|
|
2358
|
+
if (_x_768.$tag === 29) {
|
|
2334
2359
|
return true;
|
|
2335
2360
|
} else {
|
|
2336
2361
|
return false;
|
|
2337
2362
|
}
|
|
2338
2363
|
}
|
|
2339
2364
|
case 30: {
|
|
2340
|
-
if (
|
|
2365
|
+
if (_x_768.$tag === 30) {
|
|
2341
2366
|
return true;
|
|
2342
2367
|
} else {
|
|
2343
2368
|
return false;
|
|
2344
2369
|
}
|
|
2345
2370
|
}
|
|
2346
2371
|
case 31: {
|
|
2347
|
-
if (
|
|
2372
|
+
if (_x_768.$tag === 31) {
|
|
2348
2373
|
return true;
|
|
2349
2374
|
} else {
|
|
2350
2375
|
return false;
|
|
2351
2376
|
}
|
|
2352
2377
|
}
|
|
2353
2378
|
case 32: {
|
|
2354
|
-
if (
|
|
2379
|
+
if (_x_768.$tag === 32) {
|
|
2355
2380
|
return true;
|
|
2356
2381
|
} else {
|
|
2357
2382
|
return false;
|
|
2358
2383
|
}
|
|
2359
2384
|
}
|
|
2360
2385
|
case 33: {
|
|
2361
|
-
if (
|
|
2386
|
+
if (_x_768.$tag === 33) {
|
|
2362
2387
|
return true;
|
|
2363
2388
|
} else {
|
|
2364
2389
|
return false;
|
|
2365
2390
|
}
|
|
2366
2391
|
}
|
|
2367
2392
|
case 34: {
|
|
2368
|
-
if (
|
|
2393
|
+
if (_x_768.$tag === 34) {
|
|
2369
2394
|
return true;
|
|
2370
2395
|
} else {
|
|
2371
2396
|
return false;
|
|
2372
2397
|
}
|
|
2373
2398
|
}
|
|
2374
2399
|
case 35: {
|
|
2375
|
-
if (
|
|
2400
|
+
if (_x_768.$tag === 35) {
|
|
2376
2401
|
return true;
|
|
2377
2402
|
} else {
|
|
2378
2403
|
return false;
|
|
2379
2404
|
}
|
|
2380
2405
|
}
|
|
2381
2406
|
case 36: {
|
|
2382
|
-
if (
|
|
2407
|
+
if (_x_768.$tag === 36) {
|
|
2383
2408
|
return true;
|
|
2384
2409
|
} else {
|
|
2385
2410
|
return false;
|
|
2386
2411
|
}
|
|
2387
2412
|
}
|
|
2388
2413
|
case 37: {
|
|
2389
|
-
if (
|
|
2414
|
+
if (_x_768.$tag === 37) {
|
|
2390
2415
|
return true;
|
|
2391
2416
|
} else {
|
|
2392
2417
|
return false;
|
|
2393
2418
|
}
|
|
2394
2419
|
}
|
|
2395
2420
|
case 38: {
|
|
2396
|
-
if (
|
|
2421
|
+
if (_x_768.$tag === 38) {
|
|
2397
2422
|
return true;
|
|
2398
2423
|
} else {
|
|
2399
2424
|
return false;
|
|
2400
2425
|
}
|
|
2401
2426
|
}
|
|
2402
2427
|
case 39: {
|
|
2403
|
-
if (
|
|
2428
|
+
if (_x_768.$tag === 39) {
|
|
2404
2429
|
return true;
|
|
2405
2430
|
} else {
|
|
2406
2431
|
return false;
|
|
2407
2432
|
}
|
|
2408
2433
|
}
|
|
2409
2434
|
case 40: {
|
|
2410
|
-
if (
|
|
2435
|
+
if (_x_768.$tag === 40) {
|
|
2411
2436
|
return true;
|
|
2412
2437
|
} else {
|
|
2413
2438
|
return false;
|
|
2414
2439
|
}
|
|
2415
2440
|
}
|
|
2416
2441
|
case 41: {
|
|
2417
|
-
if (
|
|
2442
|
+
if (_x_768.$tag === 41) {
|
|
2418
2443
|
return true;
|
|
2419
2444
|
} else {
|
|
2420
2445
|
return false;
|
|
2421
2446
|
}
|
|
2422
2447
|
}
|
|
2423
2448
|
case 42: {
|
|
2424
|
-
if (
|
|
2449
|
+
if (_x_768.$tag === 42) {
|
|
2425
2450
|
return true;
|
|
2426
2451
|
} else {
|
|
2427
2452
|
return false;
|
|
2428
2453
|
}
|
|
2429
2454
|
}
|
|
2430
2455
|
case 43: {
|
|
2431
|
-
if (
|
|
2456
|
+
if (_x_768.$tag === 43) {
|
|
2432
2457
|
return true;
|
|
2433
2458
|
} else {
|
|
2434
2459
|
return false;
|
|
2435
2460
|
}
|
|
2436
2461
|
}
|
|
2437
2462
|
case 44: {
|
|
2438
|
-
if (
|
|
2463
|
+
if (_x_768.$tag === 44) {
|
|
2439
2464
|
return true;
|
|
2440
2465
|
} else {
|
|
2441
2466
|
return false;
|
|
2442
2467
|
}
|
|
2443
2468
|
}
|
|
2444
2469
|
case 45: {
|
|
2445
|
-
if (
|
|
2470
|
+
if (_x_768.$tag === 45) {
|
|
2446
2471
|
return true;
|
|
2447
2472
|
} else {
|
|
2448
2473
|
return false;
|
|
2449
2474
|
}
|
|
2450
2475
|
}
|
|
2451
2476
|
case 46: {
|
|
2452
|
-
if (
|
|
2477
|
+
if (_x_768.$tag === 46) {
|
|
2453
2478
|
return true;
|
|
2454
2479
|
} else {
|
|
2455
2480
|
return false;
|
|
2456
2481
|
}
|
|
2457
2482
|
}
|
|
2458
2483
|
case 47: {
|
|
2459
|
-
if (
|
|
2484
|
+
if (_x_768.$tag === 47) {
|
|
2460
2485
|
return true;
|
|
2461
2486
|
} else {
|
|
2462
2487
|
return false;
|
|
2463
2488
|
}
|
|
2464
2489
|
}
|
|
2465
2490
|
case 48: {
|
|
2466
|
-
if (
|
|
2491
|
+
if (_x_768.$tag === 48) {
|
|
2467
2492
|
return true;
|
|
2468
2493
|
} else {
|
|
2469
2494
|
return false;
|
|
2470
2495
|
}
|
|
2471
2496
|
}
|
|
2472
2497
|
case 49: {
|
|
2473
|
-
if (
|
|
2498
|
+
if (_x_768.$tag === 49) {
|
|
2474
2499
|
return true;
|
|
2475
2500
|
} else {
|
|
2476
2501
|
return false;
|
|
2477
2502
|
}
|
|
2478
2503
|
}
|
|
2479
2504
|
case 50: {
|
|
2480
|
-
if (
|
|
2505
|
+
if (_x_768.$tag === 50) {
|
|
2481
2506
|
return true;
|
|
2482
2507
|
} else {
|
|
2483
2508
|
return false;
|
|
2484
2509
|
}
|
|
2485
2510
|
}
|
|
2486
2511
|
case 51: {
|
|
2487
|
-
if (
|
|
2512
|
+
if (_x_768.$tag === 51) {
|
|
2488
2513
|
return true;
|
|
2489
2514
|
} else {
|
|
2490
2515
|
return false;
|
|
2491
2516
|
}
|
|
2492
2517
|
}
|
|
2493
2518
|
case 52: {
|
|
2494
|
-
if (
|
|
2519
|
+
if (_x_768.$tag === 52) {
|
|
2495
2520
|
return true;
|
|
2496
2521
|
} else {
|
|
2497
2522
|
return false;
|
|
2498
2523
|
}
|
|
2499
2524
|
}
|
|
2500
2525
|
case 53: {
|
|
2501
|
-
if (
|
|
2526
|
+
if (_x_768.$tag === 53) {
|
|
2502
2527
|
return true;
|
|
2503
2528
|
} else {
|
|
2504
2529
|
return false;
|
|
2505
2530
|
}
|
|
2506
2531
|
}
|
|
2507
2532
|
case 54: {
|
|
2508
|
-
if (
|
|
2533
|
+
if (_x_768.$tag === 54) {
|
|
2509
2534
|
return true;
|
|
2510
2535
|
} else {
|
|
2511
2536
|
return false;
|
|
2512
2537
|
}
|
|
2513
2538
|
}
|
|
2514
2539
|
case 55: {
|
|
2515
|
-
if (
|
|
2540
|
+
if (_x_768.$tag === 55) {
|
|
2516
2541
|
return true;
|
|
2517
2542
|
} else {
|
|
2518
2543
|
return false;
|
|
2519
2544
|
}
|
|
2520
2545
|
}
|
|
2521
2546
|
case 56: {
|
|
2522
|
-
if (
|
|
2547
|
+
if (_x_768.$tag === 56) {
|
|
2523
2548
|
return true;
|
|
2524
2549
|
} else {
|
|
2525
2550
|
return false;
|
|
2526
2551
|
}
|
|
2527
2552
|
}
|
|
2528
2553
|
case 57: {
|
|
2529
|
-
if (
|
|
2554
|
+
if (_x_768.$tag === 57) {
|
|
2530
2555
|
return true;
|
|
2531
2556
|
} else {
|
|
2532
2557
|
return false;
|
|
2533
2558
|
}
|
|
2534
2559
|
}
|
|
2535
2560
|
case 58: {
|
|
2536
|
-
if (
|
|
2561
|
+
if (_x_768.$tag === 58) {
|
|
2537
2562
|
return true;
|
|
2538
2563
|
} else {
|
|
2539
2564
|
return false;
|
|
2540
2565
|
}
|
|
2541
2566
|
}
|
|
2542
2567
|
case 59: {
|
|
2543
|
-
if (
|
|
2568
|
+
if (_x_768.$tag === 59) {
|
|
2544
2569
|
return true;
|
|
2545
2570
|
} else {
|
|
2546
2571
|
return false;
|
|
2547
2572
|
}
|
|
2548
2573
|
}
|
|
2549
2574
|
case 60: {
|
|
2550
|
-
if (
|
|
2575
|
+
if (_x_768.$tag === 60) {
|
|
2551
2576
|
return true;
|
|
2552
2577
|
} else {
|
|
2553
2578
|
return false;
|
|
2554
2579
|
}
|
|
2555
2580
|
}
|
|
2556
2581
|
case 61: {
|
|
2557
|
-
if (
|
|
2582
|
+
if (_x_768.$tag === 61) {
|
|
2558
2583
|
return true;
|
|
2559
2584
|
} else {
|
|
2560
2585
|
return false;
|
|
2561
2586
|
}
|
|
2562
2587
|
}
|
|
2563
2588
|
case 62: {
|
|
2564
|
-
if (
|
|
2589
|
+
if (_x_768.$tag === 62) {
|
|
2565
2590
|
return true;
|
|
2566
2591
|
} else {
|
|
2567
2592
|
return false;
|
|
2568
2593
|
}
|
|
2569
2594
|
}
|
|
2570
2595
|
case 63: {
|
|
2571
|
-
if (
|
|
2596
|
+
if (_x_768.$tag === 63) {
|
|
2572
2597
|
return true;
|
|
2573
2598
|
} else {
|
|
2574
2599
|
return false;
|
|
2575
2600
|
}
|
|
2576
2601
|
}
|
|
2577
2602
|
case 64: {
|
|
2578
|
-
if (
|
|
2603
|
+
if (_x_768.$tag === 64) {
|
|
2579
2604
|
return true;
|
|
2580
2605
|
} else {
|
|
2581
2606
|
return false;
|
|
2582
2607
|
}
|
|
2583
2608
|
}
|
|
2584
2609
|
case 65: {
|
|
2585
|
-
if (
|
|
2610
|
+
if (_x_768.$tag === 65) {
|
|
2586
2611
|
return true;
|
|
2587
2612
|
} else {
|
|
2588
2613
|
return false;
|
|
2589
2614
|
}
|
|
2590
2615
|
}
|
|
2591
2616
|
case 66: {
|
|
2592
|
-
if (
|
|
2617
|
+
if (_x_768.$tag === 66) {
|
|
2593
2618
|
return true;
|
|
2594
2619
|
} else {
|
|
2595
2620
|
return false;
|
|
2596
2621
|
}
|
|
2597
2622
|
}
|
|
2598
2623
|
case 67: {
|
|
2599
|
-
if (
|
|
2624
|
+
if (_x_768.$tag === 67) {
|
|
2600
2625
|
return true;
|
|
2601
2626
|
} else {
|
|
2602
2627
|
return false;
|
|
2603
2628
|
}
|
|
2604
2629
|
}
|
|
2605
2630
|
case 68: {
|
|
2606
|
-
if (
|
|
2631
|
+
if (_x_768.$tag === 68) {
|
|
2607
2632
|
return true;
|
|
2608
2633
|
} else {
|
|
2609
2634
|
return false;
|
|
2610
2635
|
}
|
|
2611
2636
|
}
|
|
2612
2637
|
case 69: {
|
|
2613
|
-
if (
|
|
2638
|
+
if (_x_768.$tag === 69) {
|
|
2614
2639
|
return true;
|
|
2615
2640
|
} else {
|
|
2616
2641
|
return false;
|
|
2617
2642
|
}
|
|
2618
2643
|
}
|
|
2619
2644
|
case 70: {
|
|
2620
|
-
if (
|
|
2645
|
+
if (_x_768.$tag === 70) {
|
|
2621
2646
|
return true;
|
|
2622
2647
|
} else {
|
|
2623
2648
|
return false;
|
|
2624
2649
|
}
|
|
2625
2650
|
}
|
|
2626
2651
|
case 71: {
|
|
2627
|
-
if (
|
|
2652
|
+
if (_x_768.$tag === 71) {
|
|
2628
2653
|
return true;
|
|
2629
2654
|
} else {
|
|
2630
2655
|
return false;
|
|
2631
2656
|
}
|
|
2632
2657
|
}
|
|
2633
2658
|
case 72: {
|
|
2634
|
-
if (
|
|
2659
|
+
if (_x_768.$tag === 72) {
|
|
2635
2660
|
return true;
|
|
2636
2661
|
} else {
|
|
2637
2662
|
return false;
|
|
2638
2663
|
}
|
|
2639
2664
|
}
|
|
2640
2665
|
case 73: {
|
|
2641
|
-
if (
|
|
2666
|
+
if (_x_768.$tag === 73) {
|
|
2642
2667
|
return true;
|
|
2643
2668
|
} else {
|
|
2644
2669
|
return false;
|
|
2645
2670
|
}
|
|
2646
2671
|
}
|
|
2647
2672
|
case 74: {
|
|
2648
|
-
if (
|
|
2673
|
+
if (_x_768.$tag === 74) {
|
|
2649
2674
|
return true;
|
|
2650
2675
|
} else {
|
|
2651
2676
|
return false;
|
|
2652
2677
|
}
|
|
2653
2678
|
}
|
|
2654
2679
|
case 75: {
|
|
2655
|
-
if (
|
|
2680
|
+
if (_x_768.$tag === 75) {
|
|
2656
2681
|
return true;
|
|
2657
2682
|
} else {
|
|
2658
2683
|
return false;
|
|
2659
2684
|
}
|
|
2660
2685
|
}
|
|
2661
2686
|
case 76: {
|
|
2662
|
-
if (
|
|
2687
|
+
if (_x_768.$tag === 76) {
|
|
2663
2688
|
return true;
|
|
2664
2689
|
} else {
|
|
2665
2690
|
return false;
|
|
2666
2691
|
}
|
|
2667
2692
|
}
|
|
2668
2693
|
case 77: {
|
|
2669
|
-
if (
|
|
2694
|
+
if (_x_768.$tag === 77) {
|
|
2670
2695
|
return true;
|
|
2671
2696
|
} else {
|
|
2672
2697
|
return false;
|
|
2673
2698
|
}
|
|
2674
2699
|
}
|
|
2675
2700
|
case 78: {
|
|
2676
|
-
if (
|
|
2701
|
+
if (_x_768.$tag === 78) {
|
|
2677
2702
|
return true;
|
|
2678
2703
|
} else {
|
|
2679
2704
|
return false;
|
|
2680
2705
|
}
|
|
2681
2706
|
}
|
|
2682
2707
|
case 79: {
|
|
2683
|
-
if (
|
|
2708
|
+
if (_x_768.$tag === 79) {
|
|
2684
2709
|
return true;
|
|
2685
2710
|
} else {
|
|
2686
2711
|
return false;
|
|
2687
2712
|
}
|
|
2688
2713
|
}
|
|
2689
2714
|
case 80: {
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
if (_x_715.$tag === 80) {
|
|
2693
|
-
const _Indent$2 = _x_715;
|
|
2694
|
-
const _$42$y0_729 = _Indent$2._0;
|
|
2695
|
-
_x0_728 = _$42$x0_728;
|
|
2696
|
-
_y0_729 = _$42$y0_729;
|
|
2697
|
-
break _L$4;
|
|
2715
|
+
if (_x_768.$tag === 80) {
|
|
2716
|
+
return true;
|
|
2698
2717
|
} else {
|
|
2699
2718
|
return false;
|
|
2700
2719
|
}
|
|
2701
2720
|
}
|
|
2702
2721
|
case 81: {
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
if (_x_715.$tag === 81) {
|
|
2706
|
-
const _Shebang$2 = _x_715;
|
|
2707
|
-
const _$42$y0_731 = _Shebang$2._0;
|
|
2708
|
-
_x0_730 = _$42$x0_730;
|
|
2709
|
-
_y0_731 = _$42$y0_731;
|
|
2710
|
-
break _L$3;
|
|
2722
|
+
if (_x_768.$tag === 81) {
|
|
2723
|
+
return true;
|
|
2711
2724
|
} else {
|
|
2712
2725
|
return false;
|
|
2713
2726
|
}
|
|
2714
2727
|
}
|
|
2715
2728
|
case 82: {
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
if (_x_715.$tag === 82) {
|
|
2719
|
-
const _Comment$2 = _x_715;
|
|
2720
|
-
const _$42$y0_733 = _Comment$2._0;
|
|
2721
|
-
_x0_732 = _$42$x0_732;
|
|
2722
|
-
_y0_733 = _$42$y0_733;
|
|
2723
|
-
break _L$2;
|
|
2729
|
+
if (_x_768.$tag === 82) {
|
|
2730
|
+
return true;
|
|
2724
2731
|
} else {
|
|
2725
2732
|
return false;
|
|
2726
2733
|
}
|
|
2727
2734
|
}
|
|
2728
2735
|
case 83: {
|
|
2729
|
-
const
|
|
2730
|
-
const _$42$
|
|
2731
|
-
if (
|
|
2732
|
-
const
|
|
2733
|
-
const _$42$
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
+
const _Indent = _x_767;
|
|
2737
|
+
const _$42$x0_781 = _Indent._0;
|
|
2738
|
+
if (_x_768.$tag === 83) {
|
|
2739
|
+
const _Indent$2 = _x_768;
|
|
2740
|
+
const _$42$y0_782 = _Indent$2._0;
|
|
2741
|
+
_x0_781 = _$42$x0_781;
|
|
2742
|
+
_y0_782 = _$42$y0_782;
|
|
2743
|
+
break _L$4;
|
|
2744
|
+
} else {
|
|
2745
|
+
return false;
|
|
2746
|
+
}
|
|
2747
|
+
}
|
|
2748
|
+
case 84: {
|
|
2749
|
+
const _Shebang = _x_767;
|
|
2750
|
+
const _$42$x0_783 = _Shebang._0;
|
|
2751
|
+
if (_x_768.$tag === 84) {
|
|
2752
|
+
const _Shebang$2 = _x_768;
|
|
2753
|
+
const _$42$y0_784 = _Shebang$2._0;
|
|
2754
|
+
_x0_783 = _$42$x0_783;
|
|
2755
|
+
_y0_784 = _$42$y0_784;
|
|
2756
|
+
break _L$3;
|
|
2757
|
+
} else {
|
|
2758
|
+
return false;
|
|
2759
|
+
}
|
|
2760
|
+
}
|
|
2761
|
+
case 85: {
|
|
2762
|
+
const _Comment = _x_767;
|
|
2763
|
+
const _$42$x0_785 = _Comment._0;
|
|
2764
|
+
if (_x_768.$tag === 85) {
|
|
2765
|
+
const _Comment$2 = _x_768;
|
|
2766
|
+
const _$42$y0_786 = _Comment$2._0;
|
|
2767
|
+
_x0_785 = _$42$x0_785;
|
|
2768
|
+
_y0_786 = _$42$y0_786;
|
|
2769
|
+
break _L$2;
|
|
2770
|
+
} else {
|
|
2771
|
+
return false;
|
|
2772
|
+
}
|
|
2773
|
+
}
|
|
2774
|
+
case 86: {
|
|
2775
|
+
const _BlockComment = _x_767;
|
|
2776
|
+
const _$42$x0_787 = _BlockComment._0;
|
|
2777
|
+
if (_x_768.$tag === 86) {
|
|
2778
|
+
const _BlockComment$2 = _x_768;
|
|
2779
|
+
const _$42$y0_788 = _BlockComment$2._0;
|
|
2780
|
+
_x0_787 = _$42$x0_787;
|
|
2781
|
+
_y0_788 = _$42$y0_788;
|
|
2736
2782
|
break _L;
|
|
2737
2783
|
} else {
|
|
2738
2784
|
return false;
|
|
2739
2785
|
}
|
|
2740
2786
|
}
|
|
2741
2787
|
default: {
|
|
2742
|
-
if (
|
|
2788
|
+
if (_x_768.$tag === 87) {
|
|
2743
2789
|
return true;
|
|
2744
2790
|
} else {
|
|
2745
2791
|
return false;
|
|
@@ -2747,23 +2793,23 @@ function _M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_x_
|
|
|
2747
2793
|
}
|
|
2748
2794
|
}
|
|
2749
2795
|
}
|
|
2750
|
-
return
|
|
2796
|
+
return _x0_769 === _y0_770;
|
|
2751
2797
|
}
|
|
2752
|
-
return
|
|
2798
|
+
return _x0_771 === _y0_772;
|
|
2753
2799
|
}
|
|
2754
|
-
return
|
|
2800
|
+
return _x0_773 === _y0_774;
|
|
2755
2801
|
}
|
|
2756
|
-
return
|
|
2802
|
+
return _x0_775 === _y0_777 && _x1_776 === _y1_778;
|
|
2757
2803
|
}
|
|
2758
|
-
return
|
|
2804
|
+
return _x0_779 === _y0_780;
|
|
2759
2805
|
}
|
|
2760
|
-
return
|
|
2806
|
+
return _x0_781 === _y0_782;
|
|
2761
2807
|
}
|
|
2762
|
-
return
|
|
2808
|
+
return _x0_783 === _y0_784;
|
|
2763
2809
|
}
|
|
2764
|
-
return
|
|
2810
|
+
return _x0_785 === _y0_786;
|
|
2765
2811
|
}
|
|
2766
|
-
return
|
|
2812
|
+
return _x0_787 === _y0_788;
|
|
2767
2813
|
}
|
|
2768
2814
|
function _M0MP28username4core6Parser4peek(self) {
|
|
2769
2815
|
return self.pos >= self.tokens.length ? $64$username$47$core$46$TokenKind$Eof : _M0MP311moonbitlang4core5array5Array2atGRP28username4core5TokenE(self.tokens, self.pos).kind;
|
|
@@ -2870,19 +2916,19 @@ function _M0MP28username4core6Parser18parse__param__list(self) {
|
|
|
2870
2916
|
_L$3: {
|
|
2871
2917
|
const _bind = _M0MP28username4core6Parser4peek(self);
|
|
2872
2918
|
switch (_bind.$tag) {
|
|
2873
|
-
case
|
|
2919
|
+
case 78: {
|
|
2874
2920
|
break _L$3;
|
|
2875
2921
|
}
|
|
2876
|
-
case
|
|
2922
|
+
case 82: {
|
|
2877
2923
|
break _L$3;
|
|
2878
2924
|
}
|
|
2879
|
-
case
|
|
2925
|
+
case 87: {
|
|
2880
2926
|
break _L$3;
|
|
2881
2927
|
}
|
|
2882
|
-
case
|
|
2928
|
+
case 29: {
|
|
2883
2929
|
break _L$3;
|
|
2884
2930
|
}
|
|
2885
|
-
case
|
|
2931
|
+
case 48: {
|
|
2886
2932
|
break _L$3;
|
|
2887
2933
|
}
|
|
2888
2934
|
case 6: {
|
|
@@ -2924,16 +2970,16 @@ function _M0MP28username4core6Parser27skip__newlines__and__indent(self) {
|
|
|
2924
2970
|
_L$4: {
|
|
2925
2971
|
const _bind = _M0MP28username4core6Parser4peek(self);
|
|
2926
2972
|
switch (_bind.$tag) {
|
|
2927
|
-
case
|
|
2973
|
+
case 82: {
|
|
2928
2974
|
break _L$4;
|
|
2929
2975
|
}
|
|
2930
|
-
case
|
|
2976
|
+
case 85: {
|
|
2931
2977
|
break _L$4;
|
|
2932
2978
|
}
|
|
2933
|
-
case
|
|
2979
|
+
case 86: {
|
|
2934
2980
|
break _L$4;
|
|
2935
2981
|
}
|
|
2936
|
-
case
|
|
2982
|
+
case 83: {
|
|
2937
2983
|
const _Indent = _bind;
|
|
2938
2984
|
const _n = _Indent._0;
|
|
2939
2985
|
n = _n;
|
|
@@ -2967,10 +3013,10 @@ function _M0MP28username4core6Parser22skip__type__annotation(self) {
|
|
|
2967
3013
|
case 10: {
|
|
2968
3014
|
break _L$2;
|
|
2969
3015
|
}
|
|
2970
|
-
case
|
|
3016
|
+
case 82: {
|
|
2971
3017
|
break _L$2;
|
|
2972
3018
|
}
|
|
2973
|
-
case
|
|
3019
|
+
case 87: {
|
|
2974
3020
|
break _L$2;
|
|
2975
3021
|
}
|
|
2976
3022
|
default: {
|
|
@@ -3083,7 +3129,7 @@ function _M0MP28username4core6Parser21parse__bracket__names(self) {
|
|
|
3083
3129
|
s = _s;
|
|
3084
3130
|
break _L$2;
|
|
3085
3131
|
}
|
|
3086
|
-
case
|
|
3132
|
+
case 77: {
|
|
3087
3133
|
self.pos = self.pos + 1 | 0;
|
|
3088
3134
|
break;
|
|
3089
3135
|
}
|
|
@@ -3182,10 +3228,10 @@ function _M0MP28username4core6Parser21parse__match__pattern(self) {
|
|
|
3182
3228
|
self.pos = self.pos + 1 | 0;
|
|
3183
3229
|
return new $64$username$47$core$46$MatchPattern$LitPat(new $64$username$47$core$46$Expr$BoolLit(false));
|
|
3184
3230
|
}
|
|
3185
|
-
case
|
|
3231
|
+
case 70: {
|
|
3186
3232
|
break _L$2;
|
|
3187
3233
|
}
|
|
3188
|
-
case
|
|
3234
|
+
case 71: {
|
|
3189
3235
|
break _L$2;
|
|
3190
3236
|
}
|
|
3191
3237
|
case 6: {
|
|
@@ -3243,7 +3289,7 @@ function _M0MP28username4core6Parser9parse__or(self) {
|
|
|
3243
3289
|
if (_M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_M0MP28username4core6Parser4peek(self), $64$username$47$core$46$TokenKind$Or)) {
|
|
3244
3290
|
self.pos = self.pos + 1 | 0;
|
|
3245
3291
|
const right = _M0MP28username4core6Parser10parse__and(self);
|
|
3246
|
-
left.val = new $64$username$47$core$46$Expr$BinOp(
|
|
3292
|
+
left.val = new $64$username$47$core$46$Expr$BinOp(13, left.val, right);
|
|
3247
3293
|
continue;
|
|
3248
3294
|
} else {
|
|
3249
3295
|
break;
|
|
@@ -3257,7 +3303,7 @@ function _M0MP28username4core6Parser10parse__and(self) {
|
|
|
3257
3303
|
if (_M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_M0MP28username4core6Parser4peek(self), $64$username$47$core$46$TokenKind$And)) {
|
|
3258
3304
|
self.pos = self.pos + 1 | 0;
|
|
3259
3305
|
const right = _M0MP28username4core6Parser15parse__equality(self);
|
|
3260
|
-
left.val = new $64$username$47$core$46$Expr$BinOp(
|
|
3306
|
+
left.val = new $64$username$47$core$46$Expr$BinOp(12, left.val, right);
|
|
3261
3307
|
continue;
|
|
3262
3308
|
} else {
|
|
3263
3309
|
break;
|
|
@@ -3273,19 +3319,34 @@ function _M0MP28username4core6Parser15parse__equality(self) {
|
|
|
3273
3319
|
_L$3: {
|
|
3274
3320
|
const _bind = _M0MP28username4core6Parser4peek(self);
|
|
3275
3321
|
switch (_bind.$tag) {
|
|
3276
|
-
case
|
|
3322
|
+
case 18: {
|
|
3277
3323
|
break _L$3;
|
|
3278
3324
|
}
|
|
3279
|
-
case
|
|
3325
|
+
case 45: {
|
|
3280
3326
|
break _L$3;
|
|
3281
3327
|
}
|
|
3282
|
-
case
|
|
3328
|
+
case 19: {
|
|
3283
3329
|
self.pos = self.pos + 1 | 0;
|
|
3284
3330
|
const right = _M0MP28username4core6Parser17parse__comparison(self);
|
|
3285
|
-
left.val = new $64$username$47$core$46$Expr$BinOp(
|
|
3331
|
+
left.val = new $64$username$47$core$46$Expr$BinOp(7, left.val, right);
|
|
3332
|
+
break;
|
|
3333
|
+
}
|
|
3334
|
+
case 26: {
|
|
3335
|
+
if ((self.pos + 1 | 0) < self.tokens.length) {
|
|
3336
|
+
const _bind$2 = _M0MP311moonbitlang4core5array5Array2atGRP28username4core5TokenE(self.tokens, self.pos + 1 | 0).kind;
|
|
3337
|
+
if (_bind$2.$tag === 18) {
|
|
3338
|
+
self.pos = self.pos + 2 | 0;
|
|
3339
|
+
const right$2 = _M0MP28username4core6Parser17parse__comparison(self);
|
|
3340
|
+
left.val = new $64$username$47$core$46$Expr$BinOp(7, left.val, right$2);
|
|
3341
|
+
} else {
|
|
3342
|
+
break _L;
|
|
3343
|
+
}
|
|
3344
|
+
} else {
|
|
3345
|
+
break _L;
|
|
3346
|
+
}
|
|
3286
3347
|
break;
|
|
3287
3348
|
}
|
|
3288
|
-
case
|
|
3349
|
+
case 50: {
|
|
3289
3350
|
self.pos = self.pos + 1 | 0;
|
|
3290
3351
|
const right$2 = _M0MP28username4core6Parser17parse__comparison(self);
|
|
3291
3352
|
left.val = new $64$username$47$core$46$Expr$Instanceof(left.val, right$2);
|
|
@@ -3303,7 +3364,7 @@ function _M0MP28username4core6Parser15parse__equality(self) {
|
|
|
3303
3364
|
left.val = new $64$username$47$core$46$Expr$IsCheck(left.val, type_name);
|
|
3304
3365
|
} else {
|
|
3305
3366
|
const right = _M0MP28username4core6Parser17parse__comparison(self);
|
|
3306
|
-
left.val = new $64$username$47$core$46$Expr$BinOp(
|
|
3367
|
+
left.val = new $64$username$47$core$46$Expr$BinOp(6, left.val, right);
|
|
3307
3368
|
}
|
|
3308
3369
|
}
|
|
3309
3370
|
continue;
|
|
@@ -3319,28 +3380,46 @@ function _M0MP28username4core6Parser17parse__comparison(self) {
|
|
|
3319
3380
|
if (self.pos < self.tokens.length) {
|
|
3320
3381
|
const _bind = _M0MP28username4core6Parser4peek(self);
|
|
3321
3382
|
switch (_bind.$tag) {
|
|
3322
|
-
case
|
|
3383
|
+
case 20: {
|
|
3384
|
+
if ((self.pos + 1 | 0) < self.tokens.length) {
|
|
3385
|
+
const _bind$2 = _M0MP311moonbitlang4core5array5Array2atGRP28username4core5TokenE(self.tokens, self.pos + 1 | 0).kind;
|
|
3386
|
+
if (_bind$2.$tag === 18) {
|
|
3387
|
+
self.pos = self.pos + 2 | 0;
|
|
3388
|
+
const right = _M0MP28username4core6Parser15parse__addition(self);
|
|
3389
|
+
left.val = new $64$username$47$core$46$Expr$BinOp(10, left.val, right);
|
|
3390
|
+
continue _L;
|
|
3391
|
+
}
|
|
3392
|
+
}
|
|
3323
3393
|
self.pos = self.pos + 1 | 0;
|
|
3324
3394
|
const right = _M0MP28username4core6Parser15parse__addition(self);
|
|
3325
|
-
left.val = new $64$username$47$core$46$Expr$BinOp(
|
|
3395
|
+
left.val = new $64$username$47$core$46$Expr$BinOp(8, left.val, right);
|
|
3326
3396
|
break;
|
|
3327
3397
|
}
|
|
3328
|
-
case
|
|
3398
|
+
case 21: {
|
|
3399
|
+
if ((self.pos + 1 | 0) < self.tokens.length) {
|
|
3400
|
+
const _bind$2 = _M0MP311moonbitlang4core5array5Array2atGRP28username4core5TokenE(self.tokens, self.pos + 1 | 0).kind;
|
|
3401
|
+
if (_bind$2.$tag === 18) {
|
|
3402
|
+
self.pos = self.pos + 2 | 0;
|
|
3403
|
+
const right$2 = _M0MP28username4core6Parser15parse__addition(self);
|
|
3404
|
+
left.val = new $64$username$47$core$46$Expr$BinOp(11, left.val, right$2);
|
|
3405
|
+
continue _L;
|
|
3406
|
+
}
|
|
3407
|
+
}
|
|
3329
3408
|
self.pos = self.pos + 1 | 0;
|
|
3330
3409
|
const right$2 = _M0MP28username4core6Parser15parse__addition(self);
|
|
3331
|
-
left.val = new $64$username$47$core$46$Expr$BinOp(
|
|
3410
|
+
left.val = new $64$username$47$core$46$Expr$BinOp(9, left.val, right$2);
|
|
3332
3411
|
break;
|
|
3333
3412
|
}
|
|
3334
|
-
case
|
|
3413
|
+
case 22: {
|
|
3335
3414
|
self.pos = self.pos + 1 | 0;
|
|
3336
3415
|
const right$3 = _M0MP28username4core6Parser15parse__addition(self);
|
|
3337
|
-
left.val = new $64$username$47$core$46$Expr$BinOp(
|
|
3416
|
+
left.val = new $64$username$47$core$46$Expr$BinOp(10, left.val, right$3);
|
|
3338
3417
|
break;
|
|
3339
3418
|
}
|
|
3340
|
-
case
|
|
3419
|
+
case 23: {
|
|
3341
3420
|
self.pos = self.pos + 1 | 0;
|
|
3342
3421
|
const right$4 = _M0MP28username4core6Parser15parse__addition(self);
|
|
3343
|
-
left.val = new $64$username$47$core$46$Expr$BinOp(
|
|
3422
|
+
left.val = new $64$username$47$core$46$Expr$BinOp(11, left.val, right$4);
|
|
3344
3423
|
break;
|
|
3345
3424
|
}
|
|
3346
3425
|
default: {
|
|
@@ -3384,26 +3463,26 @@ function _M0MP28username4core6Parser15parse__addition(self) {
|
|
|
3384
3463
|
return left.val;
|
|
3385
3464
|
}
|
|
3386
3465
|
function _M0MP28username4core6Parser21parse__multiplication(self) {
|
|
3387
|
-
const left = { val:
|
|
3466
|
+
const left = { val: _M0MP28username4core6Parser12parse__power(self) };
|
|
3388
3467
|
_L: while (true) {
|
|
3389
3468
|
if (self.pos < self.tokens.length) {
|
|
3390
3469
|
const _bind = _M0MP28username4core6Parser4peek(self);
|
|
3391
3470
|
switch (_bind.$tag) {
|
|
3392
3471
|
case 13: {
|
|
3393
3472
|
self.pos = self.pos + 1 | 0;
|
|
3394
|
-
const right =
|
|
3473
|
+
const right = _M0MP28username4core6Parser12parse__power(self);
|
|
3395
3474
|
left.val = new $64$username$47$core$46$Expr$BinOp(2, left.val, right);
|
|
3396
3475
|
break;
|
|
3397
3476
|
}
|
|
3398
3477
|
case 14: {
|
|
3399
3478
|
self.pos = self.pos + 1 | 0;
|
|
3400
|
-
const right$2 =
|
|
3479
|
+
const right$2 = _M0MP28username4core6Parser12parse__power(self);
|
|
3401
3480
|
left.val = new $64$username$47$core$46$Expr$BinOp(3, left.val, right$2);
|
|
3402
3481
|
break;
|
|
3403
3482
|
}
|
|
3404
3483
|
case 15: {
|
|
3405
3484
|
self.pos = self.pos + 1 | 0;
|
|
3406
|
-
const right$3 =
|
|
3485
|
+
const right$3 = _M0MP28username4core6Parser12parse__power(self);
|
|
3407
3486
|
left.val = new $64$username$47$core$46$Expr$BinOp(4, left.val, right$3);
|
|
3408
3487
|
break;
|
|
3409
3488
|
}
|
|
@@ -3418,10 +3497,19 @@ function _M0MP28username4core6Parser21parse__multiplication(self) {
|
|
|
3418
3497
|
}
|
|
3419
3498
|
return left.val;
|
|
3420
3499
|
}
|
|
3500
|
+
function _M0MP28username4core6Parser12parse__power(self) {
|
|
3501
|
+
const left = _M0MP28username4core6Parser12parse__unary(self);
|
|
3502
|
+
if (self.pos < self.tokens.length && _M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_M0MP28username4core6Parser4peek(self), $64$username$47$core$46$TokenKind$Pow)) {
|
|
3503
|
+
self.pos = self.pos + 1 | 0;
|
|
3504
|
+
const right = _M0MP28username4core6Parser12parse__power(self);
|
|
3505
|
+
return new $64$username$47$core$46$Expr$BinOp(5, left, right);
|
|
3506
|
+
}
|
|
3507
|
+
return left;
|
|
3508
|
+
}
|
|
3421
3509
|
function _M0MP28username4core6Parser12parse__unary(self) {
|
|
3422
3510
|
const _bind = _M0MP28username4core6Parser4peek(self);
|
|
3423
3511
|
switch (_bind.$tag) {
|
|
3424
|
-
case
|
|
3512
|
+
case 26: {
|
|
3425
3513
|
self.pos = self.pos + 1 | 0;
|
|
3426
3514
|
return new $64$username$47$core$46$Expr$UnaryNot(_M0MP28username4core6Parser12parse__unary(self));
|
|
3427
3515
|
}
|
|
@@ -3429,15 +3517,15 @@ function _M0MP28username4core6Parser12parse__unary(self) {
|
|
|
3429
3517
|
self.pos = self.pos + 1 | 0;
|
|
3430
3518
|
return new $64$username$47$core$46$Expr$UnaryNeg(_M0MP28username4core6Parser12parse__unary(self));
|
|
3431
3519
|
}
|
|
3432
|
-
case
|
|
3520
|
+
case 49: {
|
|
3433
3521
|
self.pos = self.pos + 1 | 0;
|
|
3434
3522
|
return new $64$username$47$core$46$Expr$UnaryTypeof(_M0MP28username4core6Parser12parse__unary(self));
|
|
3435
3523
|
}
|
|
3436
|
-
case
|
|
3524
|
+
case 55: {
|
|
3437
3525
|
self.pos = self.pos + 1 | 0;
|
|
3438
3526
|
return new $64$username$47$core$46$Expr$AwaitExpr(_M0MP28username4core6Parser12parse__unary(self));
|
|
3439
3527
|
}
|
|
3440
|
-
case
|
|
3528
|
+
case 51: {
|
|
3441
3529
|
self.pos = self.pos + 1 | 0;
|
|
3442
3530
|
const callee = _M0MP28username4core6Parser14parse__primary(self);
|
|
3443
3531
|
if (_M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_M0MP28username4core6Parser4peek(self), $64$username$47$core$46$TokenKind$LBracket)) {
|
|
@@ -3491,37 +3579,64 @@ function _M0MP28username4core6Parser14parse__postfix(self) {
|
|
|
3491
3579
|
if (self.pos < self.tokens.length) {
|
|
3492
3580
|
const _bind = _M0MP28username4core6Parser4peek(self);
|
|
3493
3581
|
switch (_bind.$tag) {
|
|
3494
|
-
case
|
|
3582
|
+
case 79: {
|
|
3495
3583
|
self.pos = self.pos + 1 | 0;
|
|
3496
3584
|
const field = _M0MP28username4core6Parser18parse__ident__name(self);
|
|
3497
3585
|
if (_M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_M0MP28username4core6Parser4peek(self), $64$username$47$core$46$TokenKind$LBracket)) {
|
|
3498
|
-
const
|
|
3499
|
-
|
|
3586
|
+
const saved_dot = self.pos;
|
|
3587
|
+
self.pos = self.pos + 1 | 0;
|
|
3588
|
+
const start_expr = _M0MP28username4core6Parser11parse__expr(self);
|
|
3589
|
+
const _bind$2 = _M0MP28username4core6Parser4peek(self);
|
|
3590
|
+
switch (_bind$2.$tag) {
|
|
3591
|
+
case 80: {
|
|
3592
|
+
self.pos = self.pos + 1 | 0;
|
|
3593
|
+
const end_expr = _M0MP28username4core6Parser11parse__expr(self);
|
|
3594
|
+
if (_M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_M0MP28username4core6Parser4peek(self), $64$username$47$core$46$TokenKind$RBracket)) {
|
|
3595
|
+
self.pos = self.pos + 1 | 0;
|
|
3596
|
+
}
|
|
3597
|
+
expr.val = new $64$username$47$core$46$Expr$Slice(new $64$username$47$core$46$Expr$DotAccess(expr.val, field), start_expr, end_expr, true);
|
|
3598
|
+
break;
|
|
3599
|
+
}
|
|
3600
|
+
case 81: {
|
|
3601
|
+
self.pos = self.pos + 1 | 0;
|
|
3602
|
+
const end_expr$2 = _M0MP28username4core6Parser11parse__expr(self);
|
|
3603
|
+
if (_M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_M0MP28username4core6Parser4peek(self), $64$username$47$core$46$TokenKind$RBracket)) {
|
|
3604
|
+
self.pos = self.pos + 1 | 0;
|
|
3605
|
+
}
|
|
3606
|
+
expr.val = new $64$username$47$core$46$Expr$Slice(new $64$username$47$core$46$Expr$DotAccess(expr.val, field), start_expr, end_expr$2, false);
|
|
3607
|
+
break;
|
|
3608
|
+
}
|
|
3609
|
+
default: {
|
|
3610
|
+
self.pos = saved_dot;
|
|
3611
|
+
const args = _M0MP28username4core6Parser11parse__args(self);
|
|
3612
|
+
expr.val = new $64$username$47$core$46$Expr$MethodCall(expr.val, field, args);
|
|
3613
|
+
}
|
|
3614
|
+
}
|
|
3500
3615
|
} else {
|
|
3501
3616
|
expr.val = new $64$username$47$core$46$Expr$DotAccess(expr.val, field);
|
|
3502
3617
|
}
|
|
3503
3618
|
break;
|
|
3504
3619
|
}
|
|
3505
|
-
case
|
|
3620
|
+
case 75: {
|
|
3506
3621
|
const saved = self.pos;
|
|
3507
3622
|
self.pos = self.pos + 1 | 0;
|
|
3508
3623
|
_L$2: {
|
|
3509
3624
|
_L$3: {
|
|
3510
3625
|
const _bind$2 = expr.val;
|
|
3511
3626
|
switch (_bind$2.$tag) {
|
|
3512
|
-
case
|
|
3627
|
+
case 12: {
|
|
3513
3628
|
break _L$3;
|
|
3514
3629
|
}
|
|
3515
|
-
case
|
|
3630
|
+
case 13: {
|
|
3516
3631
|
break _L$3;
|
|
3517
3632
|
}
|
|
3518
|
-
case
|
|
3633
|
+
case 25: {
|
|
3519
3634
|
break _L$3;
|
|
3520
3635
|
}
|
|
3521
|
-
case
|
|
3636
|
+
case 24: {
|
|
3522
3637
|
break _L$3;
|
|
3523
3638
|
}
|
|
3524
|
-
case
|
|
3639
|
+
case 14: {
|
|
3525
3640
|
break _L$3;
|
|
3526
3641
|
}
|
|
3527
3642
|
default: {
|
|
@@ -3534,13 +3649,37 @@ function _M0MP28username4core6Parser14parse__postfix(self) {
|
|
|
3534
3649
|
}
|
|
3535
3650
|
break _L$2;
|
|
3536
3651
|
}
|
|
3537
|
-
|
|
3538
|
-
const
|
|
3539
|
-
|
|
3652
|
+
const start_expr = _M0MP28username4core6Parser11parse__expr(self);
|
|
3653
|
+
const _bind$2 = _M0MP28username4core6Parser4peek(self);
|
|
3654
|
+
switch (_bind$2.$tag) {
|
|
3655
|
+
case 80: {
|
|
3656
|
+
self.pos = self.pos + 1 | 0;
|
|
3657
|
+
const end_expr = _M0MP28username4core6Parser11parse__expr(self);
|
|
3658
|
+
if (_M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_M0MP28username4core6Parser4peek(self), $64$username$47$core$46$TokenKind$RBracket)) {
|
|
3659
|
+
self.pos = self.pos + 1 | 0;
|
|
3660
|
+
}
|
|
3661
|
+
expr.val = new $64$username$47$core$46$Expr$Slice(expr.val, start_expr, end_expr, true);
|
|
3662
|
+
break;
|
|
3663
|
+
}
|
|
3664
|
+
case 81: {
|
|
3665
|
+
self.pos = self.pos + 1 | 0;
|
|
3666
|
+
const end_expr$2 = _M0MP28username4core6Parser11parse__expr(self);
|
|
3667
|
+
if (_M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_M0MP28username4core6Parser4peek(self), $64$username$47$core$46$TokenKind$RBracket)) {
|
|
3668
|
+
self.pos = self.pos + 1 | 0;
|
|
3669
|
+
}
|
|
3670
|
+
expr.val = new $64$username$47$core$46$Expr$Slice(expr.val, start_expr, end_expr$2, false);
|
|
3671
|
+
break;
|
|
3672
|
+
}
|
|
3673
|
+
default: {
|
|
3674
|
+
self.pos = saved;
|
|
3675
|
+
const args = _M0MP28username4core6Parser11parse__args(self);
|
|
3676
|
+
expr.val = new $64$username$47$core$46$Expr$Call(expr.val, args);
|
|
3677
|
+
}
|
|
3678
|
+
}
|
|
3540
3679
|
}
|
|
3541
3680
|
break;
|
|
3542
3681
|
}
|
|
3543
|
-
case
|
|
3682
|
+
case 46: {
|
|
3544
3683
|
self.pos = self.pos + 1 | 0;
|
|
3545
3684
|
const type_name = _M0MP28username4core6Parser18parse__ident__name(self);
|
|
3546
3685
|
expr.val = new $64$username$47$core$46$Expr$AsCast(expr.val, type_name);
|
|
@@ -3606,17 +3745,17 @@ function _M0MP28username4core6Parser14parse__primary(self) {
|
|
|
3606
3745
|
self.pos = self.pos + 1 | 0;
|
|
3607
3746
|
return new $64$username$47$core$46$Expr$BoolLit(false);
|
|
3608
3747
|
}
|
|
3609
|
-
case 69: {
|
|
3610
|
-
break _L$2;
|
|
3611
|
-
}
|
|
3612
3748
|
case 70: {
|
|
3613
3749
|
break _L$2;
|
|
3614
3750
|
}
|
|
3615
3751
|
case 71: {
|
|
3752
|
+
break _L$2;
|
|
3753
|
+
}
|
|
3754
|
+
case 72: {
|
|
3616
3755
|
self.pos = self.pos + 1 | 0;
|
|
3617
3756
|
return $64$username$47$core$46$Expr$UndefinedLit;
|
|
3618
3757
|
}
|
|
3619
|
-
case
|
|
3758
|
+
case 53: {
|
|
3620
3759
|
self.pos = self.pos + 1 | 0;
|
|
3621
3760
|
return $64$username$47$core$46$Expr$ThisExpr;
|
|
3622
3761
|
}
|
|
@@ -3626,21 +3765,21 @@ function _M0MP28username4core6Parser14parse__primary(self) {
|
|
|
3626
3765
|
s = _s$2;
|
|
3627
3766
|
break _L;
|
|
3628
3767
|
}
|
|
3629
|
-
case
|
|
3768
|
+
case 73: {
|
|
3630
3769
|
self.pos = self.pos + 1 | 0;
|
|
3631
3770
|
return _M0MP28username4core6Parser20parse__list__literal(self);
|
|
3632
3771
|
}
|
|
3633
|
-
case
|
|
3772
|
+
case 74: {
|
|
3634
3773
|
self.pos = self.pos + 1 | 0;
|
|
3635
3774
|
return _M0MP28username4core6Parser22parse__object__literal(self);
|
|
3636
3775
|
}
|
|
3637
|
-
case
|
|
3776
|
+
case 75: {
|
|
3638
3777
|
return _M0MP28username4core6Parser20parse__bracket__expr(self);
|
|
3639
3778
|
}
|
|
3640
|
-
case
|
|
3779
|
+
case 27: {
|
|
3641
3780
|
return _M0MP28username4core6Parser15parse__fn__expr(self);
|
|
3642
3781
|
}
|
|
3643
|
-
case
|
|
3782
|
+
case 30: {
|
|
3644
3783
|
self.pos = self.pos + 1 | 0;
|
|
3645
3784
|
const cond = _M0MP28username4core6Parser11parse__expr(self);
|
|
3646
3785
|
_M0MP28username4core6Parser6expect(self, $64$username$47$core$46$TokenKind$Then_);
|
|
@@ -3649,14 +3788,14 @@ function _M0MP28username4core6Parser14parse__primary(self) {
|
|
|
3649
3788
|
const else_expr = _M0MP28username4core6Parser11parse__expr(self);
|
|
3650
3789
|
return new $64$username$47$core$46$Expr$IfExpr(cond, then_expr, else_expr);
|
|
3651
3790
|
}
|
|
3652
|
-
case
|
|
3791
|
+
case 42: {
|
|
3653
3792
|
self.pos = self.pos + 1 | 0;
|
|
3654
3793
|
const subject = _M0MP28username4core6Parser11parse__expr(self);
|
|
3655
3794
|
const indent = _M0MP28username4core6Parser27skip__newlines__and__indent(self);
|
|
3656
3795
|
const arms = _M0MP28username4core6Parser18parse__match__arms(self, indent);
|
|
3657
3796
|
return new $64$username$47$core$46$Expr$MatchExpr(subject, arms);
|
|
3658
3797
|
}
|
|
3659
|
-
case
|
|
3798
|
+
case 56: {
|
|
3660
3799
|
self.pos = self.pos + 1 | 0;
|
|
3661
3800
|
const tr_indent = _M0MP28username4core6Parser27skip__newlines__and__indent(self);
|
|
3662
3801
|
const try_body = _M0MP28username4core6Parser12parse__block(self, tr_indent);
|
|
@@ -3664,7 +3803,7 @@ function _M0MP28username4core6Parser14parse__primary(self) {
|
|
|
3664
3803
|
_M0MP28username4core6Parser27skip__newlines__and__indent(self);
|
|
3665
3804
|
const _bind$2 = _M0MP28username4core6Parser4peek(self);
|
|
3666
3805
|
let catch_name;
|
|
3667
|
-
if (_bind$2.$tag ===
|
|
3806
|
+
if (_bind$2.$tag === 57) {
|
|
3668
3807
|
self.pos = self.pos + 1 | 0;
|
|
3669
3808
|
let s$3;
|
|
3670
3809
|
_L$7: {
|
|
@@ -3768,13 +3907,13 @@ function _M0MP28username4core6Parser11parse__stmt(self) {
|
|
|
3768
3907
|
_L$2: {
|
|
3769
3908
|
const _bind = _M0MP28username4core6Parser4peek(self);
|
|
3770
3909
|
switch (_bind.$tag) {
|
|
3771
|
-
case
|
|
3910
|
+
case 85: {
|
|
3772
3911
|
break _L$2;
|
|
3773
3912
|
}
|
|
3774
|
-
case
|
|
3913
|
+
case 86: {
|
|
3775
3914
|
break _L$2;
|
|
3776
3915
|
}
|
|
3777
|
-
case
|
|
3916
|
+
case 83: {
|
|
3778
3917
|
self.pos = self.pos + 1 | 0;
|
|
3779
3918
|
break;
|
|
3780
3919
|
}
|
|
@@ -3795,43 +3934,43 @@ function _M0MP28username4core6Parser11parse__stmt(self) {
|
|
|
3795
3934
|
case 9: {
|
|
3796
3935
|
return _M0MP28username4core6Parser16parse__var__decl(self, 2);
|
|
3797
3936
|
}
|
|
3798
|
-
case
|
|
3937
|
+
case 27: {
|
|
3799
3938
|
return _M0MP28username4core6Parser15parse__fn__decl(self, false);
|
|
3800
3939
|
}
|
|
3801
|
-
case
|
|
3940
|
+
case 54: {
|
|
3802
3941
|
self.pos = self.pos + 1 | 0;
|
|
3803
3942
|
return _M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_M0MP28username4core6Parser4peek(self), $64$username$47$core$46$TokenKind$Fn) ? _M0MP28username4core6Parser15parse__fn__decl(self, true) : new $64$username$47$core$46$Stmt$ExprStmt(_M0MP28username4core6Parser11parse__expr(self));
|
|
3804
3943
|
}
|
|
3805
|
-
case
|
|
3944
|
+
case 30: {
|
|
3806
3945
|
return _M0MP28username4core6Parser15parse__if__stmt(self);
|
|
3807
3946
|
}
|
|
3808
|
-
case
|
|
3947
|
+
case 33: {
|
|
3809
3948
|
return _M0MP28username4core6Parser19parse__unless__stmt(self);
|
|
3810
3949
|
}
|
|
3811
|
-
case
|
|
3950
|
+
case 35: {
|
|
3812
3951
|
return _M0MP28username4core6Parser18parse__while__stmt(self);
|
|
3813
3952
|
}
|
|
3814
|
-
case
|
|
3953
|
+
case 36: {
|
|
3815
3954
|
return _M0MP28username4core6Parser18parse__until__stmt(self);
|
|
3816
3955
|
}
|
|
3817
|
-
case
|
|
3956
|
+
case 37: {
|
|
3818
3957
|
return _M0MP28username4core6Parser16parse__for__stmt(self);
|
|
3819
3958
|
}
|
|
3820
|
-
case
|
|
3959
|
+
case 42: {
|
|
3821
3960
|
return _M0MP28username4core6Parser18parse__match__stmt(self);
|
|
3822
3961
|
}
|
|
3823
|
-
case
|
|
3962
|
+
case 28: {
|
|
3824
3963
|
self.pos = self.pos + 1 | 0;
|
|
3825
3964
|
_L$2: {
|
|
3826
3965
|
const _bind$2 = _M0MP28username4core6Parser4peek(self);
|
|
3827
3966
|
switch (_bind$2.$tag) {
|
|
3828
|
-
case
|
|
3967
|
+
case 82: {
|
|
3829
3968
|
break _L$2;
|
|
3830
3969
|
}
|
|
3831
|
-
case
|
|
3970
|
+
case 87: {
|
|
3832
3971
|
break _L$2;
|
|
3833
3972
|
}
|
|
3834
|
-
case
|
|
3973
|
+
case 83: {
|
|
3835
3974
|
break _L$2;
|
|
3836
3975
|
}
|
|
3837
3976
|
default: {
|
|
@@ -3841,38 +3980,38 @@ function _M0MP28username4core6Parser11parse__stmt(self) {
|
|
|
3841
3980
|
}
|
|
3842
3981
|
return new $64$username$47$core$46$Stmt$Return(undefined);
|
|
3843
3982
|
}
|
|
3844
|
-
case
|
|
3983
|
+
case 40: {
|
|
3845
3984
|
self.pos = self.pos + 1 | 0;
|
|
3846
3985
|
return $64$username$47$core$46$Stmt$Break;
|
|
3847
3986
|
}
|
|
3848
|
-
case
|
|
3987
|
+
case 41: {
|
|
3849
3988
|
self.pos = self.pos + 1 | 0;
|
|
3850
3989
|
return $64$username$47$core$46$Stmt$Continue;
|
|
3851
3990
|
}
|
|
3852
|
-
case
|
|
3991
|
+
case 56: {
|
|
3853
3992
|
return _M0MP28username4core6Parser16parse__try__stmt(self);
|
|
3854
3993
|
}
|
|
3855
|
-
case
|
|
3994
|
+
case 59: {
|
|
3856
3995
|
self.pos = self.pos + 1 | 0;
|
|
3857
3996
|
const expr = _M0MP28username4core6Parser11parse__expr(self);
|
|
3858
3997
|
return _M0MP28username4core6Parser14maybe__postfix(self, new $64$username$47$core$46$Stmt$Throw(expr));
|
|
3859
3998
|
}
|
|
3860
|
-
case
|
|
3999
|
+
case 60: {
|
|
3861
4000
|
return _M0MP28username4core6Parser19parse__import__stmt(self);
|
|
3862
4001
|
}
|
|
3863
|
-
case
|
|
4002
|
+
case 65: {
|
|
3864
4003
|
return _M0MP28username4core6Parser16parse__use__stmt(self);
|
|
3865
4004
|
}
|
|
3866
|
-
case
|
|
4005
|
+
case 61: {
|
|
3867
4006
|
return _M0MP28username4core6Parser22parse__from__use__stmt(self);
|
|
3868
4007
|
}
|
|
3869
|
-
case
|
|
4008
|
+
case 66: {
|
|
3870
4009
|
return _M0MP28username4core6Parser16parse__mod__stmt(self);
|
|
3871
4010
|
}
|
|
3872
|
-
case
|
|
4011
|
+
case 62: {
|
|
3873
4012
|
return _M0MP28username4core6Parser19parse__export__stmt(self);
|
|
3874
4013
|
}
|
|
3875
|
-
case
|
|
4014
|
+
case 67: {
|
|
3876
4015
|
self.pos = self.pos + 1 | 0;
|
|
3877
4016
|
let s;
|
|
3878
4017
|
_L$3: {
|
|
@@ -3888,11 +4027,11 @@ function _M0MP28username4core6Parser11parse__stmt(self) {
|
|
|
3888
4027
|
}
|
|
3889
4028
|
return new $64$username$47$core$46$Stmt$PubDecl(s);
|
|
3890
4029
|
}
|
|
3891
|
-
case
|
|
4030
|
+
case 52: {
|
|
3892
4031
|
self.pos = self.pos + 1 | 0;
|
|
3893
4032
|
return new $64$username$47$core$46$Stmt$DeleteStmt(_M0MP28username4core6Parser11parse__expr(self));
|
|
3894
4033
|
}
|
|
3895
|
-
case
|
|
4034
|
+
case 69: {
|
|
3896
4035
|
return _M0MP28username4core6Parser17parse__type__decl(self);
|
|
3897
4036
|
}
|
|
3898
4037
|
default: {
|
|
@@ -3910,17 +4049,17 @@ function _M0MP28username4core6Parser11parse__stmt(self) {
|
|
|
3910
4049
|
function _M0MP28username4core6Parser14maybe__postfix(self, stmt) {
|
|
3911
4050
|
const _bind = _M0MP28username4core6Parser4peek(self);
|
|
3912
4051
|
switch (_bind.$tag) {
|
|
3913
|
-
case
|
|
4052
|
+
case 30: {
|
|
3914
4053
|
self.pos = self.pos + 1 | 0;
|
|
3915
4054
|
const cond = _M0MP28username4core6Parser11parse__expr(self);
|
|
3916
4055
|
return new $64$username$47$core$46$Stmt$PostfixIf(stmt, cond);
|
|
3917
4056
|
}
|
|
3918
|
-
case
|
|
4057
|
+
case 33: {
|
|
3919
4058
|
self.pos = self.pos + 1 | 0;
|
|
3920
4059
|
const cond$2 = _M0MP28username4core6Parser11parse__expr(self);
|
|
3921
4060
|
return new $64$username$47$core$46$Stmt$PostfixUnless(stmt, cond$2);
|
|
3922
4061
|
}
|
|
3923
|
-
case
|
|
4062
|
+
case 37: {
|
|
3924
4063
|
self.pos = self.pos + 1 | 0;
|
|
3925
4064
|
const name = _M0MP28username4core6Parser18parse__ident__name(self);
|
|
3926
4065
|
_M0MP28username4core6Parser6expect(self, $64$username$47$core$46$TokenKind$In_);
|
|
@@ -4041,7 +4180,7 @@ function _M0MP28username4core6Parser15parse__if__stmt(self) {
|
|
|
4041
4180
|
_M0MP28username4core6Parser27skip__newlines__and__indent(self);
|
|
4042
4181
|
const _bind = _M0MP28username4core6Parser4peek(self);
|
|
4043
4182
|
switch (_bind.$tag) {
|
|
4044
|
-
case
|
|
4183
|
+
case 31: {
|
|
4045
4184
|
self.pos = self.pos + 1 | 0;
|
|
4046
4185
|
const elif_cond = _M0MP28username4core6Parser11parse__expr(self);
|
|
4047
4186
|
const elif_indent = _M0MP28username4core6Parser27skip__newlines__and__indent(self);
|
|
@@ -4049,7 +4188,7 @@ function _M0MP28username4core6Parser15parse__if__stmt(self) {
|
|
|
4049
4188
|
_M0MP311moonbitlang4core5array5Array4pushGRP28username4core10ElIfBranchE(elifs, { cond: elif_cond, body: elif_body });
|
|
4050
4189
|
break;
|
|
4051
4190
|
}
|
|
4052
|
-
case
|
|
4191
|
+
case 32: {
|
|
4053
4192
|
self.pos = self.pos + 1 | 0;
|
|
4054
4193
|
if (_M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_M0MP28username4core6Parser4peek(self), $64$username$47$core$46$TokenKind$If_)) {
|
|
4055
4194
|
self.pos = self.pos + 1 | 0;
|
|
@@ -4109,7 +4248,7 @@ function _M0MP28username4core6Parser18parse__match__arms(self, min_indent) {
|
|
|
4109
4248
|
function _M0MP28username4core6Parser22parse__one__match__arm(self, arms) {
|
|
4110
4249
|
const _bind = _M0MP28username4core6Parser4peek(self);
|
|
4111
4250
|
switch (_bind.$tag) {
|
|
4112
|
-
case
|
|
4251
|
+
case 43: {
|
|
4113
4252
|
self.pos = self.pos + 1 | 0;
|
|
4114
4253
|
const pattern = _M0MP28username4core6Parser21parse__match__pattern(self);
|
|
4115
4254
|
let cond_val;
|
|
@@ -4130,7 +4269,7 @@ function _M0MP28username4core6Parser22parse__one__match__arm(self, arms) {
|
|
|
4130
4269
|
_M0MP311moonbitlang4core5array5Array4pushGRP28username4core8MatchArmE(arms, { pattern: pattern, cond: cond_val, body: body });
|
|
4131
4270
|
return true;
|
|
4132
4271
|
}
|
|
4133
|
-
case
|
|
4272
|
+
case 32: {
|
|
4134
4273
|
self.pos = self.pos + 1 | 0;
|
|
4135
4274
|
let body$2;
|
|
4136
4275
|
if (_M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_M0MP28username4core6Parser4peek(self), $64$username$47$core$46$TokenKind$Then_) || _M0IP016_24default__implP311moonbitlang4core7builtin2Eq10not__equalGRP28username4core9TokenKindE(_M0MP28username4core6Parser4peek(self), $64$username$47$core$46$TokenKind$Newline)) {
|
|
@@ -4223,6 +4362,28 @@ function _M0MP28username4core6Parser18parse__until__stmt(self) {
|
|
|
4223
4362
|
}
|
|
4224
4363
|
function _M0MP28username4core6Parser16parse__var__decl(self, kind) {
|
|
4225
4364
|
self.pos = self.pos + 1 | 0;
|
|
4365
|
+
if (_M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_M0MP28username4core6Parser4peek(self), $64$username$47$core$46$TokenKind$LBracket)) {
|
|
4366
|
+
self.pos = self.pos + 1 | 0;
|
|
4367
|
+
const names = [];
|
|
4368
|
+
while (true) {
|
|
4369
|
+
if (self.pos < self.tokens.length && _M0IP016_24default__implP311moonbitlang4core7builtin2Eq10not__equalGRP28username4core9TokenKindE(_M0MP28username4core6Parser4peek(self), $64$username$47$core$46$TokenKind$RBracket)) {
|
|
4370
|
+
const name = _M0MP28username4core6Parser18parse__ident__name(self);
|
|
4371
|
+
_M0MP311moonbitlang4core5array5Array4pushGsE(names, name);
|
|
4372
|
+
if (_M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_M0MP28username4core6Parser4peek(self), $64$username$47$core$46$TokenKind$Semicolon) || _M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_M0MP28username4core6Parser4peek(self), $64$username$47$core$46$TokenKind$Comma)) {
|
|
4373
|
+
self.pos = self.pos + 1 | 0;
|
|
4374
|
+
}
|
|
4375
|
+
continue;
|
|
4376
|
+
} else {
|
|
4377
|
+
break;
|
|
4378
|
+
}
|
|
4379
|
+
}
|
|
4380
|
+
if (_M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_M0MP28username4core6Parser4peek(self), $64$username$47$core$46$TokenKind$RBracket)) {
|
|
4381
|
+
self.pos = self.pos + 1 | 0;
|
|
4382
|
+
}
|
|
4383
|
+
_M0MP28username4core6Parser6expect(self, $64$username$47$core$46$TokenKind$Be);
|
|
4384
|
+
const value = _M0MP28username4core6Parser11parse__expr(self);
|
|
4385
|
+
return _M0MP28username4core6Parser14maybe__postfix(self, new $64$username$47$core$46$Stmt$DestructDecl(kind, names, value));
|
|
4386
|
+
}
|
|
4226
4387
|
const name = _M0MP28username4core6Parser18parse__ident__name(self);
|
|
4227
4388
|
if (_M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_M0MP28username4core6Parser4peek(self), $64$username$47$core$46$TokenKind$Of)) {
|
|
4228
4389
|
self.pos = self.pos + 1 | 0;
|
|
@@ -4256,10 +4417,26 @@ function _M0MP28username4core6Parser20parse__bracket__expr(self) {
|
|
|
4256
4417
|
const first = _M0MP28username4core6Parser11parse__expr(self);
|
|
4257
4418
|
const _bind = _M0MP28username4core6Parser4peek(self);
|
|
4258
4419
|
switch (_bind.$tag) {
|
|
4420
|
+
case 80: {
|
|
4421
|
+
self.pos = self.pos + 1 | 0;
|
|
4422
|
+
const end_expr = _M0MP28username4core6Parser11parse__expr(self);
|
|
4423
|
+
if (_M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_M0MP28username4core6Parser4peek(self), $64$username$47$core$46$TokenKind$RBracket)) {
|
|
4424
|
+
self.pos = self.pos + 1 | 0;
|
|
4425
|
+
}
|
|
4426
|
+
return new $64$username$47$core$46$Expr$RangeArray(first, end_expr, true);
|
|
4427
|
+
}
|
|
4428
|
+
case 81: {
|
|
4429
|
+
self.pos = self.pos + 1 | 0;
|
|
4430
|
+
const end_expr$2 = _M0MP28username4core6Parser11parse__expr(self);
|
|
4431
|
+
if (_M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_M0MP28username4core6Parser4peek(self), $64$username$47$core$46$TokenKind$RBracket)) {
|
|
4432
|
+
self.pos = self.pos + 1 | 0;
|
|
4433
|
+
}
|
|
4434
|
+
return new $64$username$47$core$46$Expr$RangeArray(first, end_expr$2, false);
|
|
4435
|
+
}
|
|
4259
4436
|
case 10: {
|
|
4260
4437
|
let key_name;
|
|
4261
4438
|
switch (first.$tag) {
|
|
4262
|
-
case
|
|
4439
|
+
case 12: {
|
|
4263
4440
|
const _Ident = first;
|
|
4264
4441
|
const _s = _Ident._0;
|
|
4265
4442
|
key_name = _s;
|
|
@@ -4298,7 +4475,7 @@ function _M0MP28username4core6Parser20parse__bracket__expr(self) {
|
|
|
4298
4475
|
}
|
|
4299
4476
|
return new $64$username$47$core$46$Expr$ObjectLit(pairs);
|
|
4300
4477
|
}
|
|
4301
|
-
case
|
|
4478
|
+
case 77: {
|
|
4302
4479
|
const elements = [first];
|
|
4303
4480
|
while (true) {
|
|
4304
4481
|
if (_M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_M0MP28username4core6Parser4peek(self), $64$username$47$core$46$TokenKind$Comma)) {
|
|
@@ -4317,7 +4494,7 @@ function _M0MP28username4core6Parser20parse__bracket__expr(self) {
|
|
|
4317
4494
|
}
|
|
4318
4495
|
return new $64$username$47$core$46$Expr$ArrayLit(elements);
|
|
4319
4496
|
}
|
|
4320
|
-
case
|
|
4497
|
+
case 78: {
|
|
4321
4498
|
const elements$2 = [first];
|
|
4322
4499
|
while (true) {
|
|
4323
4500
|
if (_M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_M0MP28username4core6Parser4peek(self), $64$username$47$core$46$TokenKind$Semicolon)) {
|
|
@@ -4336,7 +4513,7 @@ function _M0MP28username4core6Parser20parse__bracket__expr(self) {
|
|
|
4336
4513
|
}
|
|
4337
4514
|
return new $64$username$47$core$46$Expr$ArrayLit(elements$2);
|
|
4338
4515
|
}
|
|
4339
|
-
case
|
|
4516
|
+
case 76: {
|
|
4340
4517
|
self.pos = self.pos + 1 | 0;
|
|
4341
4518
|
return first;
|
|
4342
4519
|
}
|
|
@@ -4549,31 +4726,31 @@ function _M0MP28username4core5Lexer25is__neg__literal__context(self) {
|
|
|
4549
4726
|
const last = _M0MP311moonbitlang4core5array5Array2atGRP28username4core5TokenE(self.tokens, self.tokens.length - 1 | 0);
|
|
4550
4727
|
const _bind = last.kind;
|
|
4551
4728
|
switch (_bind.$tag) {
|
|
4552
|
-
case
|
|
4729
|
+
case 75: {
|
|
4553
4730
|
return true;
|
|
4554
4731
|
}
|
|
4555
|
-
case
|
|
4732
|
+
case 77: {
|
|
4556
4733
|
return true;
|
|
4557
4734
|
}
|
|
4558
|
-
case
|
|
4735
|
+
case 78: {
|
|
4559
4736
|
return true;
|
|
4560
4737
|
}
|
|
4561
4738
|
case 10: {
|
|
4562
4739
|
return true;
|
|
4563
4740
|
}
|
|
4564
|
-
case
|
|
4741
|
+
case 82: {
|
|
4565
4742
|
return true;
|
|
4566
4743
|
}
|
|
4567
|
-
case
|
|
4744
|
+
case 83: {
|
|
4568
4745
|
return true;
|
|
4569
4746
|
}
|
|
4570
|
-
case
|
|
4747
|
+
case 28: {
|
|
4571
4748
|
return true;
|
|
4572
4749
|
}
|
|
4573
|
-
case
|
|
4750
|
+
case 29: {
|
|
4574
4751
|
return true;
|
|
4575
4752
|
}
|
|
4576
|
-
case
|
|
4753
|
+
case 34: {
|
|
4577
4754
|
return true;
|
|
4578
4755
|
}
|
|
4579
4756
|
default: {
|
|
@@ -4660,12 +4837,16 @@ function _M0MP28username4core5Lexer11scan__ident(self) {
|
|
|
4660
4837
|
kind = $64$username$47$core$46$TokenKind$Neg;
|
|
4661
4838
|
break;
|
|
4662
4839
|
}
|
|
4840
|
+
case "pow": {
|
|
4841
|
+
kind = $64$username$47$core$46$TokenKind$Pow;
|
|
4842
|
+
break;
|
|
4843
|
+
}
|
|
4663
4844
|
case "eq": {
|
|
4664
4845
|
kind = $64$username$47$core$46$TokenKind$Eq;
|
|
4665
4846
|
break;
|
|
4666
4847
|
}
|
|
4667
|
-
case "
|
|
4668
|
-
kind = $64$username$47$core$46$TokenKind$
|
|
4848
|
+
case "neq": {
|
|
4849
|
+
kind = $64$username$47$core$46$TokenKind$Neq;
|
|
4669
4850
|
break;
|
|
4670
4851
|
}
|
|
4671
4852
|
case "lt": {
|
|
@@ -4852,6 +5033,10 @@ function _M0MP28username4core5Lexer11scan__ident(self) {
|
|
|
4852
5033
|
kind = $64$username$47$core$46$TokenKind$Use_;
|
|
4853
5034
|
break;
|
|
4854
5035
|
}
|
|
5036
|
+
case "namespace": {
|
|
5037
|
+
kind = $64$username$47$core$46$TokenKind$Mod_;
|
|
5038
|
+
break;
|
|
5039
|
+
}
|
|
4855
5040
|
case "pub": {
|
|
4856
5041
|
kind = $64$username$47$core$46$TokenKind$Pub_;
|
|
4857
5042
|
break;
|
|
@@ -5172,7 +5357,17 @@ function _M0MP28username4core5Lexer8tokenize(self) {
|
|
|
5172
5357
|
const line = self.line;
|
|
5173
5358
|
const col = self.col;
|
|
5174
5359
|
_M0MP28username4core5Lexer7advance(self);
|
|
5175
|
-
|
|
5360
|
+
if (_M0MP28username4core5Lexer4peek(self) === 46) {
|
|
5361
|
+
_M0MP28username4core5Lexer7advance(self);
|
|
5362
|
+
if (_M0MP28username4core5Lexer4peek(self) === 46) {
|
|
5363
|
+
_M0MP28username4core5Lexer7advance(self);
|
|
5364
|
+
_M0MP28username4core5Lexer4emit(self, $64$username$47$core$46$TokenKind$DotDotDot, line, col);
|
|
5365
|
+
} else {
|
|
5366
|
+
_M0MP28username4core5Lexer4emit(self, $64$username$47$core$46$TokenKind$DotDot, line, col);
|
|
5367
|
+
}
|
|
5368
|
+
} else {
|
|
5369
|
+
_M0MP28username4core5Lexer4emit(self, $64$username$47$core$46$TokenKind$Dot, line, col);
|
|
5370
|
+
}
|
|
5176
5371
|
continue;
|
|
5177
5372
|
}
|
|
5178
5373
|
if (_M0FP28username4core16is__ident__start(ch) && ch !== 45) {
|
|
@@ -5233,24 +5428,27 @@ function _M0FP28username4core9js__binop(op) {
|
|
|
5233
5428
|
return "%";
|
|
5234
5429
|
}
|
|
5235
5430
|
case 5: {
|
|
5236
|
-
return "
|
|
5431
|
+
return "**";
|
|
5237
5432
|
}
|
|
5238
5433
|
case 6: {
|
|
5239
|
-
return "
|
|
5434
|
+
return "===";
|
|
5240
5435
|
}
|
|
5241
5436
|
case 7: {
|
|
5242
|
-
return "
|
|
5437
|
+
return "!==";
|
|
5243
5438
|
}
|
|
5244
5439
|
case 8: {
|
|
5245
|
-
return "
|
|
5440
|
+
return "<";
|
|
5246
5441
|
}
|
|
5247
5442
|
case 9: {
|
|
5248
|
-
return "
|
|
5443
|
+
return ">";
|
|
5249
5444
|
}
|
|
5250
5445
|
case 10: {
|
|
5251
|
-
return "
|
|
5446
|
+
return "<=";
|
|
5252
5447
|
}
|
|
5253
5448
|
case 11: {
|
|
5449
|
+
return ">=";
|
|
5450
|
+
}
|
|
5451
|
+
case 12: {
|
|
5254
5452
|
return "&&";
|
|
5255
5453
|
}
|
|
5256
5454
|
default: {
|
|
@@ -5562,332 +5760,388 @@ function _M0MP28username4core9JsCodegen9gen__expr(self, expr) {
|
|
|
5562
5760
|
_L$22: {
|
|
5563
5761
|
let pairs;
|
|
5564
5762
|
_L$23: {
|
|
5565
|
-
let
|
|
5763
|
+
let end;
|
|
5764
|
+
let obj$4;
|
|
5765
|
+
let start;
|
|
5766
|
+
let inclusive;
|
|
5566
5767
|
_L$24: {
|
|
5567
|
-
let
|
|
5768
|
+
let end$2;
|
|
5769
|
+
let start$2;
|
|
5770
|
+
let inclusive$2;
|
|
5568
5771
|
_L$25: {
|
|
5569
|
-
let
|
|
5570
|
-
let flags;
|
|
5772
|
+
let elems;
|
|
5571
5773
|
_L$26: {
|
|
5572
|
-
let
|
|
5774
|
+
let b;
|
|
5573
5775
|
_L$27: {
|
|
5574
|
-
let
|
|
5776
|
+
let pattern;
|
|
5777
|
+
let flags;
|
|
5575
5778
|
_L$28: {
|
|
5576
|
-
let
|
|
5779
|
+
let parts;
|
|
5577
5780
|
_L$29: {
|
|
5578
|
-
let
|
|
5781
|
+
let s;
|
|
5579
5782
|
_L$30: {
|
|
5580
|
-
|
|
5581
|
-
|
|
5582
|
-
|
|
5583
|
-
|
|
5584
|
-
|
|
5585
|
-
|
|
5586
|
-
|
|
5587
|
-
|
|
5588
|
-
|
|
5589
|
-
|
|
5590
|
-
|
|
5591
|
-
|
|
5592
|
-
|
|
5593
|
-
|
|
5594
|
-
|
|
5595
|
-
|
|
5596
|
-
|
|
5597
|
-
|
|
5598
|
-
|
|
5599
|
-
|
|
5600
|
-
|
|
5601
|
-
|
|
5602
|
-
|
|
5603
|
-
|
|
5604
|
-
|
|
5605
|
-
|
|
5606
|
-
|
|
5607
|
-
|
|
5608
|
-
|
|
5609
|
-
|
|
5610
|
-
|
|
5611
|
-
|
|
5612
|
-
|
|
5613
|
-
|
|
5614
|
-
|
|
5615
|
-
|
|
5616
|
-
|
|
5617
|
-
|
|
5618
|
-
|
|
5619
|
-
|
|
5620
|
-
|
|
5621
|
-
|
|
5622
|
-
|
|
5623
|
-
|
|
5624
|
-
|
|
5625
|
-
|
|
5626
|
-
|
|
5627
|
-
|
|
5628
|
-
|
|
5629
|
-
|
|
5630
|
-
|
|
5631
|
-
|
|
5632
|
-
|
|
5633
|
-
|
|
5634
|
-
|
|
5635
|
-
|
|
5636
|
-
|
|
5637
|
-
|
|
5638
|
-
|
|
5639
|
-
|
|
5640
|
-
|
|
5641
|
-
|
|
5642
|
-
|
|
5643
|
-
|
|
5644
|
-
|
|
5645
|
-
|
|
5646
|
-
|
|
5647
|
-
|
|
5648
|
-
|
|
5649
|
-
|
|
5650
|
-
|
|
5651
|
-
|
|
5652
|
-
|
|
5653
|
-
|
|
5654
|
-
|
|
5655
|
-
|
|
5656
|
-
|
|
5657
|
-
|
|
5658
|
-
|
|
5659
|
-
|
|
5660
|
-
|
|
5661
|
-
|
|
5662
|
-
|
|
5663
|
-
|
|
5664
|
-
|
|
5665
|
-
|
|
5666
|
-
|
|
5667
|
-
|
|
5668
|
-
|
|
5669
|
-
|
|
5670
|
-
|
|
5671
|
-
|
|
5672
|
-
|
|
5673
|
-
|
|
5674
|
-
|
|
5675
|
-
|
|
5676
|
-
|
|
5677
|
-
|
|
5678
|
-
|
|
5679
|
-
|
|
5680
|
-
|
|
5681
|
-
|
|
5682
|
-
|
|
5683
|
-
|
|
5684
|
-
|
|
5685
|
-
|
|
5686
|
-
|
|
5687
|
-
|
|
5688
|
-
|
|
5689
|
-
|
|
5690
|
-
|
|
5691
|
-
|
|
5692
|
-
|
|
5693
|
-
|
|
5694
|
-
|
|
5695
|
-
|
|
5696
|
-
|
|
5697
|
-
|
|
5698
|
-
|
|
5699
|
-
|
|
5700
|
-
|
|
5701
|
-
|
|
5702
|
-
|
|
5703
|
-
|
|
5704
|
-
|
|
5705
|
-
|
|
5706
|
-
|
|
5707
|
-
|
|
5708
|
-
|
|
5709
|
-
|
|
5710
|
-
|
|
5711
|
-
|
|
5712
|
-
|
|
5713
|
-
|
|
5714
|
-
|
|
5715
|
-
|
|
5716
|
-
|
|
5717
|
-
|
|
5718
|
-
|
|
5719
|
-
|
|
5720
|
-
|
|
5721
|
-
|
|
5722
|
-
|
|
5723
|
-
|
|
5724
|
-
|
|
5725
|
-
|
|
5726
|
-
|
|
5727
|
-
|
|
5728
|
-
|
|
5729
|
-
|
|
5730
|
-
|
|
5731
|
-
|
|
5732
|
-
|
|
5733
|
-
|
|
5734
|
-
|
|
5735
|
-
|
|
5736
|
-
|
|
5737
|
-
|
|
5738
|
-
|
|
5739
|
-
|
|
5740
|
-
|
|
5741
|
-
|
|
5742
|
-
|
|
5743
|
-
|
|
5744
|
-
|
|
5745
|
-
|
|
5746
|
-
|
|
5747
|
-
|
|
5748
|
-
|
|
5749
|
-
|
|
5750
|
-
|
|
5751
|
-
|
|
5752
|
-
|
|
5753
|
-
|
|
5754
|
-
|
|
5755
|
-
|
|
5756
|
-
|
|
5757
|
-
|
|
5758
|
-
|
|
5759
|
-
|
|
5760
|
-
|
|
5761
|
-
|
|
5762
|
-
|
|
5763
|
-
|
|
5764
|
-
|
|
5765
|
-
|
|
5766
|
-
|
|
5767
|
-
|
|
5768
|
-
|
|
5769
|
-
|
|
5770
|
-
|
|
5771
|
-
|
|
5772
|
-
|
|
5773
|
-
|
|
5774
|
-
|
|
5775
|
-
|
|
5776
|
-
|
|
5777
|
-
|
|
5778
|
-
|
|
5779
|
-
|
|
5780
|
-
|
|
5781
|
-
|
|
5782
|
-
|
|
5783
|
-
|
|
5784
|
-
|
|
5785
|
-
|
|
5786
|
-
|
|
5787
|
-
|
|
5788
|
-
|
|
5789
|
-
|
|
5790
|
-
|
|
5791
|
-
|
|
5792
|
-
|
|
5793
|
-
|
|
5794
|
-
|
|
5795
|
-
|
|
5796
|
-
|
|
5797
|
-
|
|
5798
|
-
|
|
5799
|
-
|
|
5800
|
-
|
|
5801
|
-
|
|
5802
|
-
|
|
5803
|
-
|
|
5804
|
-
|
|
5805
|
-
|
|
5783
|
+
let f;
|
|
5784
|
+
_L$31: {
|
|
5785
|
+
let n;
|
|
5786
|
+
_L$32: {
|
|
5787
|
+
switch (expr$2.$tag) {
|
|
5788
|
+
case 0: {
|
|
5789
|
+
const _IntLit = expr$2;
|
|
5790
|
+
const _n = _IntLit._0;
|
|
5791
|
+
n = _n;
|
|
5792
|
+
break _L$32;
|
|
5793
|
+
}
|
|
5794
|
+
case 1: {
|
|
5795
|
+
const _FloatLit = expr$2;
|
|
5796
|
+
const _f = _FloatLit._0;
|
|
5797
|
+
f = _f;
|
|
5798
|
+
break _L$31;
|
|
5799
|
+
}
|
|
5800
|
+
case 2: {
|
|
5801
|
+
const _StrLit = expr$2;
|
|
5802
|
+
const _s = _StrLit._0;
|
|
5803
|
+
s = _s;
|
|
5804
|
+
break _L$30;
|
|
5805
|
+
}
|
|
5806
|
+
case 3: {
|
|
5807
|
+
const _StrInterp = expr$2;
|
|
5808
|
+
const _parts = _StrInterp._0;
|
|
5809
|
+
parts = _parts;
|
|
5810
|
+
break _L$29;
|
|
5811
|
+
}
|
|
5812
|
+
case 4: {
|
|
5813
|
+
const _RegexLit = expr$2;
|
|
5814
|
+
const _pattern = _RegexLit._0;
|
|
5815
|
+
const _flags = _RegexLit._1;
|
|
5816
|
+
pattern = _pattern;
|
|
5817
|
+
flags = _flags;
|
|
5818
|
+
break _L$28;
|
|
5819
|
+
}
|
|
5820
|
+
case 5: {
|
|
5821
|
+
const _BoolLit = expr$2;
|
|
5822
|
+
const _b = _BoolLit._0;
|
|
5823
|
+
b = _b;
|
|
5824
|
+
break _L$27;
|
|
5825
|
+
}
|
|
5826
|
+
case 6: {
|
|
5827
|
+
_M0MP28username4core9JsCodegen5write(self$2, "null");
|
|
5828
|
+
return;
|
|
5829
|
+
}
|
|
5830
|
+
case 7: {
|
|
5831
|
+
_M0MP28username4core9JsCodegen5write(self$2, "undefined");
|
|
5832
|
+
return;
|
|
5833
|
+
}
|
|
5834
|
+
case 8: {
|
|
5835
|
+
const _ArrayLit = expr$2;
|
|
5836
|
+
const _elems = _ArrayLit._0;
|
|
5837
|
+
elems = _elems;
|
|
5838
|
+
break _L$26;
|
|
5839
|
+
}
|
|
5840
|
+
case 9: {
|
|
5841
|
+
const _RangeArray = expr$2;
|
|
5842
|
+
const _start = _RangeArray._0;
|
|
5843
|
+
const _end = _RangeArray._1;
|
|
5844
|
+
const _inclusive = _RangeArray._2;
|
|
5845
|
+
end$2 = _end;
|
|
5846
|
+
start$2 = _start;
|
|
5847
|
+
inclusive$2 = _inclusive;
|
|
5848
|
+
break _L$25;
|
|
5849
|
+
}
|
|
5850
|
+
case 10: {
|
|
5851
|
+
const _Slice = expr$2;
|
|
5852
|
+
const _obj = _Slice._0;
|
|
5853
|
+
const _start$2 = _Slice._1;
|
|
5854
|
+
const _end$2 = _Slice._2;
|
|
5855
|
+
const _inclusive$2 = _Slice._3;
|
|
5856
|
+
end = _end$2;
|
|
5857
|
+
obj$4 = _obj;
|
|
5858
|
+
start = _start$2;
|
|
5859
|
+
inclusive = _inclusive$2;
|
|
5860
|
+
break _L$24;
|
|
5861
|
+
}
|
|
5862
|
+
case 11: {
|
|
5863
|
+
const _ObjectLit = expr$2;
|
|
5864
|
+
const _pairs = _ObjectLit._0;
|
|
5865
|
+
pairs = _pairs;
|
|
5866
|
+
break _L$23;
|
|
5867
|
+
}
|
|
5868
|
+
case 12: {
|
|
5869
|
+
const _Ident = expr$2;
|
|
5870
|
+
const _name = _Ident._0;
|
|
5871
|
+
name = _name;
|
|
5872
|
+
break _L$22;
|
|
5873
|
+
}
|
|
5874
|
+
case 13: {
|
|
5875
|
+
const _DotAccess = expr$2;
|
|
5876
|
+
const _obj$2 = _DotAccess._0;
|
|
5877
|
+
const _field = _DotAccess._1;
|
|
5878
|
+
obj$3 = _obj$2;
|
|
5879
|
+
field = _field;
|
|
5880
|
+
break _L$21;
|
|
5881
|
+
}
|
|
5882
|
+
case 14: {
|
|
5883
|
+
const _IndexAccess = expr$2;
|
|
5884
|
+
const _obj$3 = _IndexAccess._0;
|
|
5885
|
+
const _index = _IndexAccess._1;
|
|
5886
|
+
obj$2 = _obj$3;
|
|
5887
|
+
index = _index;
|
|
5888
|
+
break _L$20;
|
|
5889
|
+
}
|
|
5890
|
+
case 15: {
|
|
5891
|
+
const _BinOp = expr$2;
|
|
5892
|
+
const _op = _BinOp._0;
|
|
5893
|
+
const _left = _BinOp._1;
|
|
5894
|
+
const _right = _BinOp._2;
|
|
5895
|
+
left$2 = _left;
|
|
5896
|
+
op = _op;
|
|
5897
|
+
right$2 = _right;
|
|
5898
|
+
break _L$19;
|
|
5899
|
+
}
|
|
5900
|
+
case 16: {
|
|
5901
|
+
const _UnaryNeg = expr$2;
|
|
5902
|
+
const _inner = _UnaryNeg._0;
|
|
5903
|
+
inner$5 = _inner;
|
|
5904
|
+
break _L$18;
|
|
5905
|
+
}
|
|
5906
|
+
case 17: {
|
|
5907
|
+
const _UnaryNot = expr$2;
|
|
5908
|
+
const _inner$2 = _UnaryNot._0;
|
|
5909
|
+
inner$4 = _inner$2;
|
|
5910
|
+
break _L$17;
|
|
5911
|
+
}
|
|
5912
|
+
case 18: {
|
|
5913
|
+
const _UnaryTypeof = expr$2;
|
|
5914
|
+
const _inner$3 = _UnaryTypeof._0;
|
|
5915
|
+
inner$3 = _inner$3;
|
|
5916
|
+
break _L$16;
|
|
5917
|
+
}
|
|
5918
|
+
case 19: {
|
|
5919
|
+
const _IsCheck = expr$2;
|
|
5920
|
+
const _expr = _IsCheck._0;
|
|
5921
|
+
const _type_name$2 = _IsCheck._1;
|
|
5922
|
+
expr$5 = _expr;
|
|
5923
|
+
type_name = _type_name$2;
|
|
5924
|
+
break _L$15;
|
|
5925
|
+
}
|
|
5926
|
+
case 20: {
|
|
5927
|
+
const _AsCast = expr$2;
|
|
5928
|
+
const _expr$2 = _AsCast._0;
|
|
5929
|
+
const __type_name = _AsCast._1;
|
|
5930
|
+
expr$4 = _expr$2;
|
|
5931
|
+
_type_name = __type_name;
|
|
5932
|
+
break _L$14;
|
|
5933
|
+
}
|
|
5934
|
+
case 21: {
|
|
5935
|
+
const _Instanceof = expr$2;
|
|
5936
|
+
const _expr$3 = _Instanceof._0;
|
|
5937
|
+
const _type_expr = _Instanceof._1;
|
|
5938
|
+
expr$3 = _expr$3;
|
|
5939
|
+
type_expr = _type_expr;
|
|
5940
|
+
break _L$13;
|
|
5941
|
+
}
|
|
5942
|
+
case 22: {
|
|
5943
|
+
const _FnExpr = expr$2;
|
|
5944
|
+
const _params = _FnExpr._0;
|
|
5945
|
+
const _body = _FnExpr._1;
|
|
5946
|
+
params$2 = _params;
|
|
5947
|
+
body = _body;
|
|
5948
|
+
break _L$12;
|
|
5949
|
+
}
|
|
5950
|
+
case 23: {
|
|
5951
|
+
const _FnExprTo = expr$2;
|
|
5952
|
+
const _params$2 = _FnExprTo._0;
|
|
5953
|
+
const _body_expr = _FnExprTo._1;
|
|
5954
|
+
params = _params$2;
|
|
5955
|
+
body_expr = _body_expr;
|
|
5956
|
+
break _L$11;
|
|
5957
|
+
}
|
|
5958
|
+
case 24: {
|
|
5959
|
+
const _Call = expr$2;
|
|
5960
|
+
const _callee = _Call._0;
|
|
5961
|
+
const _args = _Call._1;
|
|
5962
|
+
callee$2 = _callee;
|
|
5963
|
+
args$3 = _args;
|
|
5964
|
+
break _L$10;
|
|
5965
|
+
}
|
|
5966
|
+
case 25: {
|
|
5967
|
+
const _MethodCall = expr$2;
|
|
5968
|
+
const _obj$4 = _MethodCall._0;
|
|
5969
|
+
const _meth_name = _MethodCall._1;
|
|
5970
|
+
const _args$2 = _MethodCall._2;
|
|
5971
|
+
meth_name = _meth_name;
|
|
5972
|
+
obj = _obj$4;
|
|
5973
|
+
args$2 = _args$2;
|
|
5974
|
+
break _L$9;
|
|
5975
|
+
}
|
|
5976
|
+
case 26: {
|
|
5977
|
+
const _NewExpr = expr$2;
|
|
5978
|
+
const _callee$2 = _NewExpr._0;
|
|
5979
|
+
const _args$3 = _NewExpr._1;
|
|
5980
|
+
callee = _callee$2;
|
|
5981
|
+
args = _args$3;
|
|
5982
|
+
break _L$8;
|
|
5983
|
+
}
|
|
5984
|
+
case 27: {
|
|
5985
|
+
const _Pipe = expr$2;
|
|
5986
|
+
const _left$2 = _Pipe._0;
|
|
5987
|
+
const _right$2 = _Pipe._1;
|
|
5988
|
+
left = _left$2;
|
|
5989
|
+
right = _right$2;
|
|
5990
|
+
break _L$7;
|
|
5991
|
+
}
|
|
5992
|
+
case 28: {
|
|
5993
|
+
const _IfExpr = expr$2;
|
|
5994
|
+
const _cond = _IfExpr._0;
|
|
5995
|
+
const _then_expr = _IfExpr._1;
|
|
5996
|
+
const _else_expr = _IfExpr._2;
|
|
5997
|
+
then_expr = _then_expr;
|
|
5998
|
+
cond = _cond;
|
|
5999
|
+
else_expr = _else_expr;
|
|
6000
|
+
break _L$6;
|
|
6001
|
+
}
|
|
6002
|
+
case 29: {
|
|
6003
|
+
const _TryExpr = expr$2;
|
|
6004
|
+
const _try_body = _TryExpr._0;
|
|
6005
|
+
const _catch_name = _TryExpr._1;
|
|
6006
|
+
const _catch_body = _TryExpr._2;
|
|
6007
|
+
catch_name = _catch_name;
|
|
6008
|
+
try_body = _try_body;
|
|
6009
|
+
catch_body = _catch_body;
|
|
6010
|
+
break _L$5;
|
|
6011
|
+
}
|
|
6012
|
+
case 30: {
|
|
6013
|
+
const _MatchExpr = expr$2;
|
|
6014
|
+
const _subject = _MatchExpr._0;
|
|
6015
|
+
const _arms = _MatchExpr._1;
|
|
6016
|
+
subject = _subject;
|
|
6017
|
+
arms = _arms;
|
|
6018
|
+
break _L$4;
|
|
6019
|
+
}
|
|
6020
|
+
case 31: {
|
|
6021
|
+
const _AwaitExpr = expr$2;
|
|
6022
|
+
const _inner$4 = _AwaitExpr._0;
|
|
6023
|
+
inner$2 = _inner$4;
|
|
6024
|
+
break _L$3;
|
|
6025
|
+
}
|
|
6026
|
+
case 32: {
|
|
6027
|
+
const _DeleteExpr = expr$2;
|
|
6028
|
+
const _inner$5 = _DeleteExpr._0;
|
|
6029
|
+
inner = _inner$5;
|
|
6030
|
+
break _L$2;
|
|
6031
|
+
}
|
|
6032
|
+
default: {
|
|
6033
|
+
_M0MP28username4core9JsCodegen5write(self$2, "this");
|
|
6034
|
+
return;
|
|
6035
|
+
}
|
|
6036
|
+
}
|
|
5806
6037
|
}
|
|
6038
|
+
_M0MP28username4core9JsCodegen5write(self$2, _M0MP311moonbitlang4core3int3Int18to__string_2einner(n, 10));
|
|
6039
|
+
return;
|
|
5807
6040
|
}
|
|
6041
|
+
_M0MP28username4core9JsCodegen5write(self$2, _M0MP311moonbitlang4core6double6Double10to__string(f));
|
|
6042
|
+
return;
|
|
5808
6043
|
}
|
|
5809
|
-
_M0MP28username4core9JsCodegen5write(self$2,
|
|
6044
|
+
_M0MP28username4core9JsCodegen5write(self$2, "\"");
|
|
6045
|
+
_M0MP28username4core9JsCodegen5write(self$2, _M0FP28username4core15js__escape__str(s));
|
|
6046
|
+
_M0MP28username4core9JsCodegen5write(self$2, "\"");
|
|
5810
6047
|
return;
|
|
5811
6048
|
}
|
|
5812
|
-
_M0MP28username4core9JsCodegen5write(self$2,
|
|
5813
|
-
|
|
5814
|
-
|
|
5815
|
-
|
|
5816
|
-
|
|
5817
|
-
|
|
5818
|
-
|
|
5819
|
-
|
|
5820
|
-
|
|
5821
|
-
const _arr = parts;
|
|
5822
|
-
const _len = _arr.length;
|
|
5823
|
-
let _tmp$3 = 0;
|
|
5824
|
-
while (true) {
|
|
5825
|
-
const _i = _tmp$3;
|
|
5826
|
-
if (_i < _len) {
|
|
5827
|
-
const part = _arr[_i];
|
|
5828
|
-
let expr$6;
|
|
5829
|
-
_L$28: {
|
|
5830
|
-
_L$29: {
|
|
5831
|
-
let s;
|
|
6049
|
+
_M0MP28username4core9JsCodegen5write(self$2, "`");
|
|
6050
|
+
const _arr = parts;
|
|
6051
|
+
const _len = _arr.length;
|
|
6052
|
+
let _tmp$3 = 0;
|
|
6053
|
+
while (true) {
|
|
6054
|
+
const _i = _tmp$3;
|
|
6055
|
+
if (_i < _len) {
|
|
6056
|
+
const part = _arr[_i];
|
|
6057
|
+
let expr$6;
|
|
5832
6058
|
_L$30: {
|
|
5833
|
-
|
|
5834
|
-
|
|
5835
|
-
|
|
5836
|
-
|
|
6059
|
+
_L$31: {
|
|
6060
|
+
let s;
|
|
6061
|
+
_L$32: {
|
|
6062
|
+
if (part.$tag === 0) {
|
|
6063
|
+
const _Lit = part;
|
|
6064
|
+
const _s = _Lit._0;
|
|
6065
|
+
s = _s;
|
|
6066
|
+
break _L$32;
|
|
6067
|
+
} else {
|
|
6068
|
+
const _Interp = part;
|
|
6069
|
+
const _expr = _Interp._0;
|
|
6070
|
+
expr$6 = _expr;
|
|
6071
|
+
break _L$31;
|
|
6072
|
+
}
|
|
6073
|
+
}
|
|
6074
|
+
_M0MP28username4core9JsCodegen5write(self$2, _M0FP28username4core20js__escape__template(s));
|
|
5837
6075
|
break _L$30;
|
|
5838
|
-
} else {
|
|
5839
|
-
const _Interp = part;
|
|
5840
|
-
const _expr = _Interp._0;
|
|
5841
|
-
expr$6 = _expr;
|
|
5842
|
-
break _L$29;
|
|
5843
6076
|
}
|
|
6077
|
+
_M0MP28username4core9JsCodegen5write(self$2, "${");
|
|
6078
|
+
_M0MP28username4core9JsCodegen9gen__expr(self$2, expr$6);
|
|
6079
|
+
_M0MP28username4core9JsCodegen5write(self$2, "}");
|
|
5844
6080
|
}
|
|
5845
|
-
|
|
5846
|
-
|
|
6081
|
+
_tmp$3 = _i + 1 | 0;
|
|
6082
|
+
continue;
|
|
6083
|
+
} else {
|
|
6084
|
+
break;
|
|
5847
6085
|
}
|
|
5848
|
-
_M0MP28username4core9JsCodegen5write(self$2, "${");
|
|
5849
|
-
_M0MP28username4core9JsCodegen9gen__expr(self$2, expr$6);
|
|
5850
|
-
_M0MP28username4core9JsCodegen5write(self$2, "}");
|
|
5851
6086
|
}
|
|
5852
|
-
|
|
5853
|
-
|
|
5854
|
-
} else {
|
|
5855
|
-
break;
|
|
6087
|
+
_M0MP28username4core9JsCodegen5write(self$2, "`");
|
|
6088
|
+
return;
|
|
5856
6089
|
}
|
|
6090
|
+
_M0MP28username4core9JsCodegen5write(self$2, "/");
|
|
6091
|
+
_M0MP28username4core9JsCodegen5write(self$2, pattern);
|
|
6092
|
+
_M0MP28username4core9JsCodegen5write(self$2, "/");
|
|
6093
|
+
_M0MP28username4core9JsCodegen5write(self$2, flags);
|
|
6094
|
+
return;
|
|
5857
6095
|
}
|
|
5858
|
-
_M0MP28username4core9JsCodegen5write(self$2, "
|
|
6096
|
+
_M0MP28username4core9JsCodegen5write(self$2, b ? "true" : "false");
|
|
5859
6097
|
return;
|
|
5860
6098
|
}
|
|
5861
|
-
_M0MP28username4core9JsCodegen5write(self$2, "
|
|
5862
|
-
|
|
5863
|
-
|
|
5864
|
-
|
|
6099
|
+
_M0MP28username4core9JsCodegen5write(self$2, "[");
|
|
6100
|
+
const first = { val: true };
|
|
6101
|
+
const _arr = elems;
|
|
6102
|
+
const _len = _arr.length;
|
|
6103
|
+
let _tmp$3 = 0;
|
|
6104
|
+
while (true) {
|
|
6105
|
+
const _i = _tmp$3;
|
|
6106
|
+
if (_i < _len) {
|
|
6107
|
+
const e = _arr[_i];
|
|
6108
|
+
if (!first.val) {
|
|
6109
|
+
_M0MP28username4core9JsCodegen5write(self$2, ", ");
|
|
6110
|
+
}
|
|
6111
|
+
_M0MP28username4core9JsCodegen9gen__expr(self$2, e);
|
|
6112
|
+
first.val = false;
|
|
6113
|
+
_tmp$3 = _i + 1 | 0;
|
|
6114
|
+
continue;
|
|
6115
|
+
} else {
|
|
6116
|
+
break;
|
|
6117
|
+
}
|
|
6118
|
+
}
|
|
6119
|
+
_M0MP28username4core9JsCodegen5write(self$2, "]");
|
|
5865
6120
|
return;
|
|
5866
6121
|
}
|
|
5867
|
-
_M0MP28username4core9JsCodegen5write(self$2,
|
|
6122
|
+
_M0MP28username4core9JsCodegen5write(self$2, "Array.from({ length: ");
|
|
6123
|
+
_M0MP28username4core9JsCodegen15gen__expr__wrap(self$2, end$2);
|
|
6124
|
+
_M0MP28username4core9JsCodegen5write(self$2, " - ");
|
|
6125
|
+
_M0MP28username4core9JsCodegen15gen__expr__wrap(self$2, start$2);
|
|
6126
|
+
if (inclusive$2) {
|
|
6127
|
+
_M0MP28username4core9JsCodegen5write(self$2, " + 1");
|
|
6128
|
+
}
|
|
6129
|
+
_M0MP28username4core9JsCodegen5write(self$2, " }, (_, i) => i + ");
|
|
6130
|
+
_M0MP28username4core9JsCodegen15gen__expr__wrap(self$2, start$2);
|
|
6131
|
+
_M0MP28username4core9JsCodegen5write(self$2, ")");
|
|
5868
6132
|
return;
|
|
5869
6133
|
}
|
|
5870
|
-
|
|
5871
|
-
|
|
5872
|
-
|
|
5873
|
-
|
|
5874
|
-
|
|
5875
|
-
|
|
5876
|
-
|
|
5877
|
-
|
|
5878
|
-
|
|
5879
|
-
if (!first.val) {
|
|
5880
|
-
_M0MP28username4core9JsCodegen5write(self$2, ", ");
|
|
5881
|
-
}
|
|
5882
|
-
_M0MP28username4core9JsCodegen9gen__expr(self$2, e);
|
|
5883
|
-
first.val = false;
|
|
5884
|
-
_tmp$3 = _i + 1 | 0;
|
|
5885
|
-
continue;
|
|
5886
|
-
} else {
|
|
5887
|
-
break;
|
|
5888
|
-
}
|
|
6134
|
+
_M0MP28username4core9JsCodegen15gen__expr__wrap(self$2, obj$4);
|
|
6135
|
+
_M0MP28username4core9JsCodegen5write(self$2, ".slice(");
|
|
6136
|
+
_M0MP28username4core9JsCodegen9gen__expr(self$2, start);
|
|
6137
|
+
_M0MP28username4core9JsCodegen5write(self$2, ", ");
|
|
6138
|
+
if (inclusive) {
|
|
6139
|
+
_M0MP28username4core9JsCodegen15gen__expr__wrap(self$2, end);
|
|
6140
|
+
_M0MP28username4core9JsCodegen5write(self$2, " + 1");
|
|
6141
|
+
} else {
|
|
6142
|
+
_M0MP28username4core9JsCodegen9gen__expr(self$2, end);
|
|
5889
6143
|
}
|
|
5890
|
-
_M0MP28username4core9JsCodegen5write(self$2, "
|
|
6144
|
+
_M0MP28username4core9JsCodegen5write(self$2, ")");
|
|
5891
6145
|
return;
|
|
5892
6146
|
}
|
|
5893
6147
|
if (_M0MP311moonbitlang4core5array5Array9is__emptyGUsRP28username4core4ExprEE(pairs)) {
|
|
@@ -6158,7 +6412,7 @@ function _M0MP28username4core9JsCodegen9gen__expr(self, expr) {
|
|
|
6158
6412
|
let args$2;
|
|
6159
6413
|
_L$9: {
|
|
6160
6414
|
switch (right.$tag) {
|
|
6161
|
-
case
|
|
6415
|
+
case 24: {
|
|
6162
6416
|
const _Call = right;
|
|
6163
6417
|
const _callee = _Call._0;
|
|
6164
6418
|
const _args = _Call._1;
|
|
@@ -6166,7 +6420,7 @@ function _M0MP28username4core9JsCodegen9gen__expr(self, expr) {
|
|
|
6166
6420
|
args$2 = _args;
|
|
6167
6421
|
break _L$9;
|
|
6168
6422
|
}
|
|
6169
|
-
case
|
|
6423
|
+
case 25: {
|
|
6170
6424
|
const _MethodCall = right;
|
|
6171
6425
|
const _meth_name = _MethodCall._1;
|
|
6172
6426
|
const _args$2 = _MethodCall._2;
|
|
@@ -6174,7 +6428,7 @@ function _M0MP28username4core9JsCodegen9gen__expr(self, expr) {
|
|
|
6174
6428
|
args = _args$2;
|
|
6175
6429
|
break _L$8;
|
|
6176
6430
|
}
|
|
6177
|
-
case
|
|
6431
|
+
case 12: {
|
|
6178
6432
|
_M0MP28username4core9JsCodegen9gen__expr(self$2, right);
|
|
6179
6433
|
_M0MP28username4core9JsCodegen5write(self$2, "(");
|
|
6180
6434
|
_M0MP28username4core9JsCodegen9gen__expr(self$2, left);
|
|
@@ -6423,19 +6677,19 @@ function _M0MP28username4core9JsCodegen9gen__expr(self, expr) {
|
|
|
6423
6677
|
function _M0MP28username4core9JsCodegen15gen__expr__wrap(self, expr) {
|
|
6424
6678
|
_L: {
|
|
6425
6679
|
switch (expr.$tag) {
|
|
6426
|
-
case
|
|
6680
|
+
case 15: {
|
|
6427
6681
|
break _L;
|
|
6428
6682
|
}
|
|
6429
|
-
case
|
|
6683
|
+
case 16: {
|
|
6430
6684
|
break _L;
|
|
6431
6685
|
}
|
|
6432
|
-
case
|
|
6686
|
+
case 17: {
|
|
6433
6687
|
break _L;
|
|
6434
6688
|
}
|
|
6435
|
-
case
|
|
6689
|
+
case 28: {
|
|
6436
6690
|
break _L;
|
|
6437
6691
|
}
|
|
6438
|
-
case
|
|
6692
|
+
case 27: {
|
|
6439
6693
|
break _L;
|
|
6440
6694
|
}
|
|
6441
6695
|
default: {
|
|
@@ -6516,211 +6770,248 @@ function _M0MP28username4core9JsCodegen9gen__stmt(self, stmt) {
|
|
|
6516
6770
|
let target;
|
|
6517
6771
|
let value$2;
|
|
6518
6772
|
_L$22: {
|
|
6519
|
-
let
|
|
6773
|
+
let names$2;
|
|
6520
6774
|
let kind;
|
|
6521
6775
|
let value$3;
|
|
6522
6776
|
_L$23: {
|
|
6523
|
-
|
|
6777
|
+
let name$5;
|
|
6778
|
+
let kind$2;
|
|
6779
|
+
let value$4;
|
|
6780
|
+
_L$24: {
|
|
6781
|
+
switch (stmt.$tag) {
|
|
6782
|
+
case 0: {
|
|
6783
|
+
const _VarDecl = stmt;
|
|
6784
|
+
const _kind = _VarDecl._0;
|
|
6785
|
+
const _name = _VarDecl._1;
|
|
6786
|
+
const _value = _VarDecl._2;
|
|
6787
|
+
name$5 = _name;
|
|
6788
|
+
kind$2 = _kind;
|
|
6789
|
+
value$4 = _value;
|
|
6790
|
+
break _L$24;
|
|
6791
|
+
}
|
|
6792
|
+
case 1: {
|
|
6793
|
+
const _DestructDecl = stmt;
|
|
6794
|
+
const _kind$2 = _DestructDecl._0;
|
|
6795
|
+
const _names = _DestructDecl._1;
|
|
6796
|
+
const _value$2 = _DestructDecl._2;
|
|
6797
|
+
names$2 = _names;
|
|
6798
|
+
kind = _kind$2;
|
|
6799
|
+
value$3 = _value$2;
|
|
6800
|
+
break _L$23;
|
|
6801
|
+
}
|
|
6802
|
+
case 2: {
|
|
6803
|
+
const _Assign = stmt;
|
|
6804
|
+
const _target = _Assign._0;
|
|
6805
|
+
const _value$3 = _Assign._1;
|
|
6806
|
+
target = _target;
|
|
6807
|
+
value$2 = _value$3;
|
|
6808
|
+
break _L$22;
|
|
6809
|
+
}
|
|
6810
|
+
case 3: {
|
|
6811
|
+
const _FnDecl = stmt;
|
|
6812
|
+
const _decl = _FnDecl._0;
|
|
6813
|
+
decl$2 = _decl;
|
|
6814
|
+
break _L$21;
|
|
6815
|
+
}
|
|
6816
|
+
case 4: {
|
|
6817
|
+
const _If = stmt;
|
|
6818
|
+
const _cond = _If._0;
|
|
6819
|
+
const _body = _If._1;
|
|
6820
|
+
const _elifs = _If._2;
|
|
6821
|
+
const _else_body = _If._3;
|
|
6822
|
+
elifs = _elifs;
|
|
6823
|
+
cond$6 = _cond;
|
|
6824
|
+
body$7 = _body;
|
|
6825
|
+
else_body = _else_body;
|
|
6826
|
+
break _L$20;
|
|
6827
|
+
}
|
|
6828
|
+
case 5: {
|
|
6829
|
+
const _Unless = stmt;
|
|
6830
|
+
const _cond$2 = _Unless._0;
|
|
6831
|
+
const _body$2 = _Unless._1;
|
|
6832
|
+
cond$5 = _cond$2;
|
|
6833
|
+
body$6 = _body$2;
|
|
6834
|
+
break _L$19;
|
|
6835
|
+
}
|
|
6836
|
+
case 6: {
|
|
6837
|
+
const _While = stmt;
|
|
6838
|
+
const _cond$3 = _While._0;
|
|
6839
|
+
const _body$3 = _While._1;
|
|
6840
|
+
cond$4 = _cond$3;
|
|
6841
|
+
body$5 = _body$3;
|
|
6842
|
+
break _L$18;
|
|
6843
|
+
}
|
|
6844
|
+
case 7: {
|
|
6845
|
+
const _Until = stmt;
|
|
6846
|
+
const _cond$4 = _Until._0;
|
|
6847
|
+
const _body$4 = _Until._1;
|
|
6848
|
+
cond$3 = _cond$4;
|
|
6849
|
+
body$4 = _body$4;
|
|
6850
|
+
break _L$17;
|
|
6851
|
+
}
|
|
6852
|
+
case 8: {
|
|
6853
|
+
const _ForIn = stmt;
|
|
6854
|
+
const _name$2 = _ForIn._0;
|
|
6855
|
+
const _index = _ForIn._1;
|
|
6856
|
+
const _iter = _ForIn._2;
|
|
6857
|
+
const _body$5 = _ForIn._3;
|
|
6858
|
+
iter$2 = _iter;
|
|
6859
|
+
name$4 = _name$2;
|
|
6860
|
+
index = _index;
|
|
6861
|
+
body$3 = _body$5;
|
|
6862
|
+
break _L$16;
|
|
6863
|
+
}
|
|
6864
|
+
case 9: {
|
|
6865
|
+
const _ForRange = stmt;
|
|
6866
|
+
const _name$3 = _ForRange._0;
|
|
6867
|
+
const _start = _ForRange._1;
|
|
6868
|
+
const _end = _ForRange._2;
|
|
6869
|
+
const _body$6 = _ForRange._3;
|
|
6870
|
+
end = _end;
|
|
6871
|
+
name$3 = _name$3;
|
|
6872
|
+
start = _start;
|
|
6873
|
+
body$2 = _body$6;
|
|
6874
|
+
break _L$15;
|
|
6875
|
+
}
|
|
6876
|
+
case 10: {
|
|
6877
|
+
const _MatchStmt = stmt;
|
|
6878
|
+
const _subject = _MatchStmt._0;
|
|
6879
|
+
const _arms = _MatchStmt._1;
|
|
6880
|
+
subject = _subject;
|
|
6881
|
+
arms = _arms;
|
|
6882
|
+
break _L$14;
|
|
6883
|
+
}
|
|
6884
|
+
case 11: {
|
|
6885
|
+
const _PostfixIf = stmt;
|
|
6886
|
+
const _inner = _PostfixIf._0;
|
|
6887
|
+
const _cond$5 = _PostfixIf._1;
|
|
6888
|
+
inner$5 = _inner;
|
|
6889
|
+
cond$2 = _cond$5;
|
|
6890
|
+
break _L$13;
|
|
6891
|
+
}
|
|
6892
|
+
case 12: {
|
|
6893
|
+
const _PostfixUnless = stmt;
|
|
6894
|
+
const _inner$2 = _PostfixUnless._0;
|
|
6895
|
+
const _cond$6 = _PostfixUnless._1;
|
|
6896
|
+
inner$4 = _inner$2;
|
|
6897
|
+
cond = _cond$6;
|
|
6898
|
+
break _L$12;
|
|
6899
|
+
}
|
|
6900
|
+
case 13: {
|
|
6901
|
+
const _PostfixFor = stmt;
|
|
6902
|
+
const _inner$3 = _PostfixFor._0;
|
|
6903
|
+
const _name$4 = _PostfixFor._1;
|
|
6904
|
+
const _iter$2 = _PostfixFor._2;
|
|
6905
|
+
name$2 = _name$4;
|
|
6906
|
+
inner$3 = _inner$3;
|
|
6907
|
+
iter = _iter$2;
|
|
6908
|
+
break _L$11;
|
|
6909
|
+
}
|
|
6910
|
+
case 14: {
|
|
6911
|
+
const _TryCatch = stmt;
|
|
6912
|
+
const _try_body = _TryCatch._0;
|
|
6913
|
+
const _catch_name = _TryCatch._1;
|
|
6914
|
+
const _catch_body = _TryCatch._2;
|
|
6915
|
+
const _finally_body = _TryCatch._3;
|
|
6916
|
+
catch_body = _catch_body;
|
|
6917
|
+
try_body = _try_body;
|
|
6918
|
+
catch_name = _catch_name;
|
|
6919
|
+
finally_body = _finally_body;
|
|
6920
|
+
break _L$10;
|
|
6921
|
+
}
|
|
6922
|
+
case 15: {
|
|
6923
|
+
const _Throw = stmt;
|
|
6924
|
+
const _expr = _Throw._0;
|
|
6925
|
+
expr$3 = _expr;
|
|
6926
|
+
break _L$9;
|
|
6927
|
+
}
|
|
6928
|
+
case 16: {
|
|
6929
|
+
const _Return = stmt;
|
|
6930
|
+
const _value$4 = _Return._0;
|
|
6931
|
+
value = _value$4;
|
|
6932
|
+
break _L$8;
|
|
6933
|
+
}
|
|
6934
|
+
case 17: {
|
|
6935
|
+
_M0MP28username4core9JsCodegen7writeln(self, "break;");
|
|
6936
|
+
return;
|
|
6937
|
+
}
|
|
6938
|
+
case 18: {
|
|
6939
|
+
_M0MP28username4core9JsCodegen7writeln(self, "continue;");
|
|
6940
|
+
return;
|
|
6941
|
+
}
|
|
6942
|
+
case 19: {
|
|
6943
|
+
const _ExprStmt = stmt;
|
|
6944
|
+
const _expr$2 = _ExprStmt._0;
|
|
6945
|
+
expr$2 = _expr$2;
|
|
6946
|
+
break _L$7;
|
|
6947
|
+
}
|
|
6948
|
+
case 20: {
|
|
6949
|
+
const _ImportDecl = stmt;
|
|
6950
|
+
const _decl$2 = _ImportDecl._0;
|
|
6951
|
+
decl = _decl$2;
|
|
6952
|
+
break _L$6;
|
|
6953
|
+
}
|
|
6954
|
+
case 21: {
|
|
6955
|
+
const _UseDecl = stmt;
|
|
6956
|
+
const _path = _UseDecl._0;
|
|
6957
|
+
const _names$2 = _UseDecl._1;
|
|
6958
|
+
path = _path;
|
|
6959
|
+
names = _names$2;
|
|
6960
|
+
break _L$5;
|
|
6961
|
+
}
|
|
6962
|
+
case 22: {
|
|
6963
|
+
const _ModDecl = stmt;
|
|
6964
|
+
const _name$5 = _ModDecl._0;
|
|
6965
|
+
const _body$7 = _ModDecl._1;
|
|
6966
|
+
name = _name$5;
|
|
6967
|
+
body = _body$7;
|
|
6968
|
+
break _L$4;
|
|
6969
|
+
}
|
|
6970
|
+
case 23: {
|
|
6971
|
+
const _ExportDefault = stmt;
|
|
6972
|
+
const _inner$4 = _ExportDefault._0;
|
|
6973
|
+
inner$2 = _inner$4;
|
|
6974
|
+
break _L$3;
|
|
6975
|
+
}
|
|
6976
|
+
case 24: {
|
|
6977
|
+
const _PubDecl = stmt;
|
|
6978
|
+
const _inner$5 = _PubDecl._0;
|
|
6979
|
+
inner = _inner$5;
|
|
6980
|
+
break _L$2;
|
|
6981
|
+
}
|
|
6982
|
+
case 25: {
|
|
6983
|
+
return;
|
|
6984
|
+
}
|
|
6985
|
+
default: {
|
|
6986
|
+
const _DeleteStmt = stmt;
|
|
6987
|
+
const _expr$3 = _DeleteStmt._0;
|
|
6988
|
+
expr = _expr$3;
|
|
6989
|
+
break _L;
|
|
6990
|
+
}
|
|
6991
|
+
}
|
|
6992
|
+
}
|
|
6993
|
+
let kw;
|
|
6994
|
+
switch (kind$2) {
|
|
6524
6995
|
case 0: {
|
|
6525
|
-
|
|
6526
|
-
|
|
6527
|
-
const _name = _VarDecl._1;
|
|
6528
|
-
const _value = _VarDecl._2;
|
|
6529
|
-
name$5 = _name;
|
|
6530
|
-
kind = _kind;
|
|
6531
|
-
value$3 = _value;
|
|
6532
|
-
break _L$23;
|
|
6996
|
+
kw = "const";
|
|
6997
|
+
break;
|
|
6533
6998
|
}
|
|
6534
6999
|
case 1: {
|
|
6535
|
-
|
|
6536
|
-
|
|
6537
|
-
const _value$2 = _Assign._1;
|
|
6538
|
-
target = _target;
|
|
6539
|
-
value$2 = _value$2;
|
|
6540
|
-
break _L$22;
|
|
6541
|
-
}
|
|
6542
|
-
case 2: {
|
|
6543
|
-
const _FnDecl = stmt;
|
|
6544
|
-
const _decl = _FnDecl._0;
|
|
6545
|
-
decl$2 = _decl;
|
|
6546
|
-
break _L$21;
|
|
6547
|
-
}
|
|
6548
|
-
case 3: {
|
|
6549
|
-
const _If = stmt;
|
|
6550
|
-
const _cond = _If._0;
|
|
6551
|
-
const _body = _If._1;
|
|
6552
|
-
const _elifs = _If._2;
|
|
6553
|
-
const _else_body = _If._3;
|
|
6554
|
-
elifs = _elifs;
|
|
6555
|
-
cond$6 = _cond;
|
|
6556
|
-
body$7 = _body;
|
|
6557
|
-
else_body = _else_body;
|
|
6558
|
-
break _L$20;
|
|
6559
|
-
}
|
|
6560
|
-
case 4: {
|
|
6561
|
-
const _Unless = stmt;
|
|
6562
|
-
const _cond$2 = _Unless._0;
|
|
6563
|
-
const _body$2 = _Unless._1;
|
|
6564
|
-
cond$5 = _cond$2;
|
|
6565
|
-
body$6 = _body$2;
|
|
6566
|
-
break _L$19;
|
|
6567
|
-
}
|
|
6568
|
-
case 5: {
|
|
6569
|
-
const _While = stmt;
|
|
6570
|
-
const _cond$3 = _While._0;
|
|
6571
|
-
const _body$3 = _While._1;
|
|
6572
|
-
cond$4 = _cond$3;
|
|
6573
|
-
body$5 = _body$3;
|
|
6574
|
-
break _L$18;
|
|
6575
|
-
}
|
|
6576
|
-
case 6: {
|
|
6577
|
-
const _Until = stmt;
|
|
6578
|
-
const _cond$4 = _Until._0;
|
|
6579
|
-
const _body$4 = _Until._1;
|
|
6580
|
-
cond$3 = _cond$4;
|
|
6581
|
-
body$4 = _body$4;
|
|
6582
|
-
break _L$17;
|
|
6583
|
-
}
|
|
6584
|
-
case 7: {
|
|
6585
|
-
const _ForIn = stmt;
|
|
6586
|
-
const _name$2 = _ForIn._0;
|
|
6587
|
-
const _index = _ForIn._1;
|
|
6588
|
-
const _iter = _ForIn._2;
|
|
6589
|
-
const _body$5 = _ForIn._3;
|
|
6590
|
-
iter$2 = _iter;
|
|
6591
|
-
name$4 = _name$2;
|
|
6592
|
-
index = _index;
|
|
6593
|
-
body$3 = _body$5;
|
|
6594
|
-
break _L$16;
|
|
6595
|
-
}
|
|
6596
|
-
case 8: {
|
|
6597
|
-
const _ForRange = stmt;
|
|
6598
|
-
const _name$3 = _ForRange._0;
|
|
6599
|
-
const _start = _ForRange._1;
|
|
6600
|
-
const _end = _ForRange._2;
|
|
6601
|
-
const _body$6 = _ForRange._3;
|
|
6602
|
-
end = _end;
|
|
6603
|
-
name$3 = _name$3;
|
|
6604
|
-
start = _start;
|
|
6605
|
-
body$2 = _body$6;
|
|
6606
|
-
break _L$15;
|
|
6607
|
-
}
|
|
6608
|
-
case 9: {
|
|
6609
|
-
const _MatchStmt = stmt;
|
|
6610
|
-
const _subject = _MatchStmt._0;
|
|
6611
|
-
const _arms = _MatchStmt._1;
|
|
6612
|
-
subject = _subject;
|
|
6613
|
-
arms = _arms;
|
|
6614
|
-
break _L$14;
|
|
6615
|
-
}
|
|
6616
|
-
case 10: {
|
|
6617
|
-
const _PostfixIf = stmt;
|
|
6618
|
-
const _inner = _PostfixIf._0;
|
|
6619
|
-
const _cond$5 = _PostfixIf._1;
|
|
6620
|
-
inner$5 = _inner;
|
|
6621
|
-
cond$2 = _cond$5;
|
|
6622
|
-
break _L$13;
|
|
6623
|
-
}
|
|
6624
|
-
case 11: {
|
|
6625
|
-
const _PostfixUnless = stmt;
|
|
6626
|
-
const _inner$2 = _PostfixUnless._0;
|
|
6627
|
-
const _cond$6 = _PostfixUnless._1;
|
|
6628
|
-
inner$4 = _inner$2;
|
|
6629
|
-
cond = _cond$6;
|
|
6630
|
-
break _L$12;
|
|
6631
|
-
}
|
|
6632
|
-
case 12: {
|
|
6633
|
-
const _PostfixFor = stmt;
|
|
6634
|
-
const _inner$3 = _PostfixFor._0;
|
|
6635
|
-
const _name$4 = _PostfixFor._1;
|
|
6636
|
-
const _iter$2 = _PostfixFor._2;
|
|
6637
|
-
name$2 = _name$4;
|
|
6638
|
-
inner$3 = _inner$3;
|
|
6639
|
-
iter = _iter$2;
|
|
6640
|
-
break _L$11;
|
|
6641
|
-
}
|
|
6642
|
-
case 13: {
|
|
6643
|
-
const _TryCatch = stmt;
|
|
6644
|
-
const _try_body = _TryCatch._0;
|
|
6645
|
-
const _catch_name = _TryCatch._1;
|
|
6646
|
-
const _catch_body = _TryCatch._2;
|
|
6647
|
-
const _finally_body = _TryCatch._3;
|
|
6648
|
-
catch_body = _catch_body;
|
|
6649
|
-
try_body = _try_body;
|
|
6650
|
-
catch_name = _catch_name;
|
|
6651
|
-
finally_body = _finally_body;
|
|
6652
|
-
break _L$10;
|
|
6653
|
-
}
|
|
6654
|
-
case 14: {
|
|
6655
|
-
const _Throw = stmt;
|
|
6656
|
-
const _expr = _Throw._0;
|
|
6657
|
-
expr$3 = _expr;
|
|
6658
|
-
break _L$9;
|
|
6659
|
-
}
|
|
6660
|
-
case 15: {
|
|
6661
|
-
const _Return = stmt;
|
|
6662
|
-
const _value$3 = _Return._0;
|
|
6663
|
-
value = _value$3;
|
|
6664
|
-
break _L$8;
|
|
6665
|
-
}
|
|
6666
|
-
case 16: {
|
|
6667
|
-
_M0MP28username4core9JsCodegen7writeln(self, "break;");
|
|
6668
|
-
return;
|
|
6669
|
-
}
|
|
6670
|
-
case 17: {
|
|
6671
|
-
_M0MP28username4core9JsCodegen7writeln(self, "continue;");
|
|
6672
|
-
return;
|
|
6673
|
-
}
|
|
6674
|
-
case 18: {
|
|
6675
|
-
const _ExprStmt = stmt;
|
|
6676
|
-
const _expr$2 = _ExprStmt._0;
|
|
6677
|
-
expr$2 = _expr$2;
|
|
6678
|
-
break _L$7;
|
|
6679
|
-
}
|
|
6680
|
-
case 19: {
|
|
6681
|
-
const _ImportDecl = stmt;
|
|
6682
|
-
const _decl$2 = _ImportDecl._0;
|
|
6683
|
-
decl = _decl$2;
|
|
6684
|
-
break _L$6;
|
|
6685
|
-
}
|
|
6686
|
-
case 20: {
|
|
6687
|
-
const _UseDecl = stmt;
|
|
6688
|
-
const _path = _UseDecl._0;
|
|
6689
|
-
const _names = _UseDecl._1;
|
|
6690
|
-
path = _path;
|
|
6691
|
-
names = _names;
|
|
6692
|
-
break _L$5;
|
|
6693
|
-
}
|
|
6694
|
-
case 21: {
|
|
6695
|
-
const _ModDecl = stmt;
|
|
6696
|
-
const _name$5 = _ModDecl._0;
|
|
6697
|
-
const _body$7 = _ModDecl._1;
|
|
6698
|
-
name = _name$5;
|
|
6699
|
-
body = _body$7;
|
|
6700
|
-
break _L$4;
|
|
6701
|
-
}
|
|
6702
|
-
case 22: {
|
|
6703
|
-
const _ExportDefault = stmt;
|
|
6704
|
-
const _inner$4 = _ExportDefault._0;
|
|
6705
|
-
inner$2 = _inner$4;
|
|
6706
|
-
break _L$3;
|
|
6707
|
-
}
|
|
6708
|
-
case 23: {
|
|
6709
|
-
const _PubDecl = stmt;
|
|
6710
|
-
const _inner$5 = _PubDecl._0;
|
|
6711
|
-
inner = _inner$5;
|
|
6712
|
-
break _L$2;
|
|
6713
|
-
}
|
|
6714
|
-
case 24: {
|
|
6715
|
-
return;
|
|
7000
|
+
kw = "let";
|
|
7001
|
+
break;
|
|
6716
7002
|
}
|
|
6717
7003
|
default: {
|
|
6718
|
-
|
|
6719
|
-
const _expr$3 = _DeleteStmt._0;
|
|
6720
|
-
expr = _expr$3;
|
|
6721
|
-
break _L;
|
|
7004
|
+
kw = "var";
|
|
6722
7005
|
}
|
|
6723
7006
|
}
|
|
7007
|
+
_M0MP28username4core9JsCodegen13write__indent(self);
|
|
7008
|
+
_M0MP28username4core9JsCodegen5write(self, kw);
|
|
7009
|
+
_M0MP28username4core9JsCodegen5write(self, " ");
|
|
7010
|
+
_M0MP28username4core9JsCodegen5write(self, _M0FP28username4core9js__ident(name$5));
|
|
7011
|
+
_M0MP28username4core9JsCodegen5write(self, " = ");
|
|
7012
|
+
_M0MP28username4core9JsCodegen9gen__expr(self, value$4);
|
|
7013
|
+
_M0MP28username4core9JsCodegen5write(self, ";\n");
|
|
7014
|
+
return;
|
|
6724
7015
|
}
|
|
6725
7016
|
let kw;
|
|
6726
7017
|
switch (kind) {
|
|
@@ -6738,18 +7029,98 @@ function _M0MP28username4core9JsCodegen9gen__stmt(self, stmt) {
|
|
|
6738
7029
|
}
|
|
6739
7030
|
_M0MP28username4core9JsCodegen13write__indent(self);
|
|
6740
7031
|
_M0MP28username4core9JsCodegen5write(self, kw);
|
|
6741
|
-
_M0MP28username4core9JsCodegen5write(self, " ");
|
|
6742
|
-
|
|
6743
|
-
|
|
7032
|
+
_M0MP28username4core9JsCodegen5write(self, " [");
|
|
7033
|
+
const first = { val: true };
|
|
7034
|
+
const _arr = names$2;
|
|
7035
|
+
const _len = _arr.length;
|
|
7036
|
+
let _tmp = 0;
|
|
7037
|
+
while (true) {
|
|
7038
|
+
const _i = _tmp;
|
|
7039
|
+
if (_i < _len) {
|
|
7040
|
+
const n = _arr[_i];
|
|
7041
|
+
if (!first.val) {
|
|
7042
|
+
_M0MP28username4core9JsCodegen5write(self, ", ");
|
|
7043
|
+
}
|
|
7044
|
+
_M0MP28username4core9JsCodegen5write(self, _M0FP28username4core9js__ident(n));
|
|
7045
|
+
first.val = false;
|
|
7046
|
+
_tmp = _i + 1 | 0;
|
|
7047
|
+
continue;
|
|
7048
|
+
} else {
|
|
7049
|
+
break;
|
|
7050
|
+
}
|
|
7051
|
+
}
|
|
7052
|
+
_M0MP28username4core9JsCodegen5write(self, "] = ");
|
|
6744
7053
|
_M0MP28username4core9JsCodegen9gen__expr(self, value$3);
|
|
6745
7054
|
_M0MP28username4core9JsCodegen5write(self, ";\n");
|
|
6746
7055
|
return;
|
|
6747
7056
|
}
|
|
7057
|
+
let end$2;
|
|
7058
|
+
let obj;
|
|
7059
|
+
let start$2;
|
|
7060
|
+
let inclusive;
|
|
7061
|
+
_L$23: {
|
|
7062
|
+
if (target.$tag === 10) {
|
|
7063
|
+
const _Slice = target;
|
|
7064
|
+
const _obj = _Slice._0;
|
|
7065
|
+
const _start = _Slice._1;
|
|
7066
|
+
const _end = _Slice._2;
|
|
7067
|
+
const _inclusive = _Slice._3;
|
|
7068
|
+
end$2 = _end;
|
|
7069
|
+
obj = _obj;
|
|
7070
|
+
start$2 = _start;
|
|
7071
|
+
inclusive = _inclusive;
|
|
7072
|
+
break _L$23;
|
|
7073
|
+
} else {
|
|
7074
|
+
_M0MP28username4core9JsCodegen13write__indent(self);
|
|
7075
|
+
_M0MP28username4core9JsCodegen9gen__expr(self, target);
|
|
7076
|
+
_M0MP28username4core9JsCodegen5write(self, " = ");
|
|
7077
|
+
_M0MP28username4core9JsCodegen9gen__expr(self, value$2);
|
|
7078
|
+
_M0MP28username4core9JsCodegen5write(self, ";\n");
|
|
7079
|
+
return;
|
|
7080
|
+
}
|
|
7081
|
+
}
|
|
6748
7082
|
_M0MP28username4core9JsCodegen13write__indent(self);
|
|
6749
|
-
_M0MP28username4core9JsCodegen9gen__expr(self,
|
|
6750
|
-
_M0MP28username4core9JsCodegen5write(self, "
|
|
6751
|
-
_M0MP28username4core9JsCodegen9gen__expr(self,
|
|
6752
|
-
_M0MP28username4core9JsCodegen5write(self, "
|
|
7083
|
+
_M0MP28username4core9JsCodegen9gen__expr(self, obj);
|
|
7084
|
+
_M0MP28username4core9JsCodegen5write(self, ".splice(");
|
|
7085
|
+
_M0MP28username4core9JsCodegen9gen__expr(self, start$2);
|
|
7086
|
+
_M0MP28username4core9JsCodegen5write(self, ", ");
|
|
7087
|
+
_M0MP28username4core9JsCodegen15gen__expr__wrap(self, end$2);
|
|
7088
|
+
_M0MP28username4core9JsCodegen5write(self, " - ");
|
|
7089
|
+
_M0MP28username4core9JsCodegen15gen__expr__wrap(self, start$2);
|
|
7090
|
+
if (inclusive) {
|
|
7091
|
+
_M0MP28username4core9JsCodegen5write(self, " + 1");
|
|
7092
|
+
}
|
|
7093
|
+
let elems;
|
|
7094
|
+
_L$24: {
|
|
7095
|
+
_L$25: {
|
|
7096
|
+
if (value$2.$tag === 8) {
|
|
7097
|
+
const _ArrayLit = value$2;
|
|
7098
|
+
const _elems = _ArrayLit._0;
|
|
7099
|
+
elems = _elems;
|
|
7100
|
+
break _L$25;
|
|
7101
|
+
} else {
|
|
7102
|
+
_M0MP28username4core9JsCodegen5write(self, ", ...");
|
|
7103
|
+
_M0MP28username4core9JsCodegen9gen__expr(self, value$2);
|
|
7104
|
+
}
|
|
7105
|
+
break _L$24;
|
|
7106
|
+
}
|
|
7107
|
+
const _arr = elems;
|
|
7108
|
+
const _len = _arr.length;
|
|
7109
|
+
let _tmp = 0;
|
|
7110
|
+
while (true) {
|
|
7111
|
+
const _i = _tmp;
|
|
7112
|
+
if (_i < _len) {
|
|
7113
|
+
const e = _arr[_i];
|
|
7114
|
+
_M0MP28username4core9JsCodegen5write(self, ", ");
|
|
7115
|
+
_M0MP28username4core9JsCodegen9gen__expr(self, e);
|
|
7116
|
+
_tmp = _i + 1 | 0;
|
|
7117
|
+
continue;
|
|
7118
|
+
} else {
|
|
7119
|
+
break;
|
|
7120
|
+
}
|
|
7121
|
+
}
|
|
7122
|
+
}
|
|
7123
|
+
_M0MP28username4core9JsCodegen5write(self, ");\n");
|
|
6753
7124
|
return;
|
|
6754
7125
|
}
|
|
6755
7126
|
_M0MP28username4core9JsCodegen13gen__fn__decl(self, decl$2);
|
|
@@ -7467,13 +7838,13 @@ function _M0MP28username4core9JsCodegen17gen__stmt__inline(self, stmt) {
|
|
|
7467
7838
|
value$2 = _value;
|
|
7468
7839
|
break _L$5;
|
|
7469
7840
|
}
|
|
7470
|
-
case
|
|
7841
|
+
case 19: {
|
|
7471
7842
|
const _ExprStmt = stmt;
|
|
7472
7843
|
const _expr = _ExprStmt._0;
|
|
7473
7844
|
expr$2 = _expr;
|
|
7474
7845
|
break _L$4;
|
|
7475
7846
|
}
|
|
7476
|
-
case
|
|
7847
|
+
case 16: {
|
|
7477
7848
|
const _Return = stmt;
|
|
7478
7849
|
const _x = _Return._0;
|
|
7479
7850
|
if (_x === undefined) {
|
|
@@ -7486,13 +7857,13 @@ function _M0MP28username4core9JsCodegen17gen__stmt__inline(self, stmt) {
|
|
|
7486
7857
|
break _L$3;
|
|
7487
7858
|
}
|
|
7488
7859
|
}
|
|
7489
|
-
case
|
|
7860
|
+
case 15: {
|
|
7490
7861
|
const _Throw = stmt;
|
|
7491
7862
|
const _expr$2 = _Throw._0;
|
|
7492
7863
|
expr = _expr$2;
|
|
7493
7864
|
break _L$2;
|
|
7494
7865
|
}
|
|
7495
|
-
case
|
|
7866
|
+
case 2: {
|
|
7496
7867
|
const _Assign = stmt;
|
|
7497
7868
|
const _target = _Assign._0;
|
|
7498
7869
|
const _value$2 = _Assign._1;
|
|
@@ -7542,10 +7913,71 @@ function _M0MP28username4core9JsCodegen17gen__stmt__inline(self, stmt) {
|
|
|
7542
7913
|
_M0MP28username4core9JsCodegen5write(self, ";");
|
|
7543
7914
|
return;
|
|
7544
7915
|
}
|
|
7545
|
-
|
|
7546
|
-
|
|
7547
|
-
|
|
7548
|
-
|
|
7916
|
+
let end;
|
|
7917
|
+
let obj;
|
|
7918
|
+
let start;
|
|
7919
|
+
let inclusive;
|
|
7920
|
+
_L$2: {
|
|
7921
|
+
if (target.$tag === 10) {
|
|
7922
|
+
const _Slice = target;
|
|
7923
|
+
const _obj = _Slice._0;
|
|
7924
|
+
const _start = _Slice._1;
|
|
7925
|
+
const _end = _Slice._2;
|
|
7926
|
+
const _inclusive = _Slice._3;
|
|
7927
|
+
end = _end;
|
|
7928
|
+
obj = _obj;
|
|
7929
|
+
start = _start;
|
|
7930
|
+
inclusive = _inclusive;
|
|
7931
|
+
break _L$2;
|
|
7932
|
+
} else {
|
|
7933
|
+
_M0MP28username4core9JsCodegen9gen__expr(self, target);
|
|
7934
|
+
_M0MP28username4core9JsCodegen5write(self, " = ");
|
|
7935
|
+
_M0MP28username4core9JsCodegen9gen__expr(self, value);
|
|
7936
|
+
_M0MP28username4core9JsCodegen5write(self, ";");
|
|
7937
|
+
return;
|
|
7938
|
+
}
|
|
7939
|
+
}
|
|
7940
|
+
_M0MP28username4core9JsCodegen9gen__expr(self, obj);
|
|
7941
|
+
_M0MP28username4core9JsCodegen5write(self, ".splice(");
|
|
7942
|
+
_M0MP28username4core9JsCodegen9gen__expr(self, start);
|
|
7943
|
+
_M0MP28username4core9JsCodegen5write(self, ", ");
|
|
7944
|
+
_M0MP28username4core9JsCodegen15gen__expr__wrap(self, end);
|
|
7945
|
+
_M0MP28username4core9JsCodegen5write(self, " - ");
|
|
7946
|
+
_M0MP28username4core9JsCodegen15gen__expr__wrap(self, start);
|
|
7947
|
+
if (inclusive) {
|
|
7948
|
+
_M0MP28username4core9JsCodegen5write(self, " + 1");
|
|
7949
|
+
}
|
|
7950
|
+
let elems;
|
|
7951
|
+
_L$3: {
|
|
7952
|
+
_L$4: {
|
|
7953
|
+
if (value.$tag === 8) {
|
|
7954
|
+
const _ArrayLit = value;
|
|
7955
|
+
const _elems = _ArrayLit._0;
|
|
7956
|
+
elems = _elems;
|
|
7957
|
+
break _L$4;
|
|
7958
|
+
} else {
|
|
7959
|
+
_M0MP28username4core9JsCodegen5write(self, ", ...");
|
|
7960
|
+
_M0MP28username4core9JsCodegen9gen__expr(self, value);
|
|
7961
|
+
}
|
|
7962
|
+
break _L$3;
|
|
7963
|
+
}
|
|
7964
|
+
const _arr = elems;
|
|
7965
|
+
const _len = _arr.length;
|
|
7966
|
+
let _tmp = 0;
|
|
7967
|
+
while (true) {
|
|
7968
|
+
const _i = _tmp;
|
|
7969
|
+
if (_i < _len) {
|
|
7970
|
+
const e = _arr[_i];
|
|
7971
|
+
_M0MP28username4core9JsCodegen5write(self, ", ");
|
|
7972
|
+
_M0MP28username4core9JsCodegen9gen__expr(self, e);
|
|
7973
|
+
_tmp = _i + 1 | 0;
|
|
7974
|
+
continue;
|
|
7975
|
+
} else {
|
|
7976
|
+
break;
|
|
7977
|
+
}
|
|
7978
|
+
}
|
|
7979
|
+
}
|
|
7980
|
+
_M0MP28username4core9JsCodegen5write(self, ");");
|
|
7549
7981
|
}
|
|
7550
7982
|
function _M0MP28username4core9JsCodegen3new() {
|
|
7551
7983
|
return { buf: _M0MP311moonbitlang4core7builtin13StringBuilder11new_2einner(0), indent_level: 0 };
|
|
@@ -7575,26 +8007,6 @@ function _M0MP28username4core9JsCodegen16generate_2einner(self, stmts, header, s
|
|
|
7575
8007
|
}
|
|
7576
8008
|
return _M0MP311moonbitlang4core7builtin13StringBuilder10to__string(self.buf);
|
|
7577
8009
|
}
|
|
7578
|
-
function _M0FP48username4core3cmd4main11print__help() {
|
|
7579
|
-
_M0FP311moonbitlang4core7builtin7printlnGsE(`purus v${_M0FP48username4core3cmd4main7version} - A language that compiles to JavaScript`);
|
|
7580
|
-
_M0FP311moonbitlang4core7builtin7printlnGsE("");
|
|
7581
|
-
_M0FP311moonbitlang4core7builtin7printlnGsE("Usage:");
|
|
7582
|
-
_M0FP311moonbitlang4core7builtin7printlnGsE(" purus build <file> Compile to JavaScript");
|
|
7583
|
-
_M0FP311moonbitlang4core7builtin7printlnGsE(" .purus -> .js");
|
|
7584
|
-
_M0FP311moonbitlang4core7builtin7printlnGsE(" .cpurus -> .cjs (CommonJS)");
|
|
7585
|
-
_M0FP311moonbitlang4core7builtin7printlnGsE(" .mpurus -> .mjs (ES Module)");
|
|
7586
|
-
_M0FP311moonbitlang4core7builtin7printlnGsE(" purus build --no-header <file> Compile without header comment");
|
|
7587
|
-
_M0FP311moonbitlang4core7builtin7printlnGsE(" purus check <file.purus> Syntax check only");
|
|
7588
|
-
_M0FP311moonbitlang4core7builtin7printlnGsE(" purus new <name> Create a new project");
|
|
7589
|
-
_M0FP311moonbitlang4core7builtin7printlnGsE(" purus init Initialize project in current directory");
|
|
7590
|
-
_M0FP311moonbitlang4core7builtin7printlnGsE(" purus version Show version");
|
|
7591
|
-
_M0FP311moonbitlang4core7builtin7printlnGsE(" purus help Show this help");
|
|
7592
|
-
_M0FP311moonbitlang4core7builtin7printlnGsE("");
|
|
7593
|
-
_M0FP311moonbitlang4core7builtin7printlnGsE("Aliases: compile = build, create = new");
|
|
7594
|
-
}
|
|
7595
|
-
function _M0FP48username4core3cmd4main14print__version() {
|
|
7596
|
-
_M0FP311moonbitlang4core7builtin7printlnGsE(`purus v${_M0FP48username4core3cmd4main7version}`);
|
|
7597
|
-
}
|
|
7598
8010
|
function _M0FP48username4core3cmd4main10cmd__build(args) {
|
|
7599
8011
|
const file = { val: "" };
|
|
7600
8012
|
const no_header = { val: false };
|
|
@@ -7655,7 +8067,7 @@ function _M0FP48username4core3cmd4main10cmd__build(args) {
|
|
|
7655
8067
|
_L$2: {
|
|
7656
8068
|
_L$3: {
|
|
7657
8069
|
const _bind = _M0MP311moonbitlang4core5array5Array2atGRP28username4core5TokenE(tokens, 0).kind;
|
|
7658
|
-
if (_bind.$tag ===
|
|
8070
|
+
if (_bind.$tag === 84) {
|
|
7659
8071
|
const _Shebang = _bind;
|
|
7660
8072
|
const _s = _Shebang._0;
|
|
7661
8073
|
s = _s;
|
|
@@ -7667,7 +8079,7 @@ function _M0FP48username4core3cmd4main10cmd__build(args) {
|
|
|
7667
8079
|
tok_start.val = 1;
|
|
7668
8080
|
if (tok_start.val < tokens.length) {
|
|
7669
8081
|
const _bind = _M0MP311moonbitlang4core5array5Array2atGRP28username4core5TokenE(tokens, tok_start.val).kind;
|
|
7670
|
-
if (_bind.$tag ===
|
|
8082
|
+
if (_bind.$tag === 82) {
|
|
7671
8083
|
tok_start.val = tok_start.val + 1 | 0;
|
|
7672
8084
|
}
|
|
7673
8085
|
}
|
|
@@ -7685,7 +8097,7 @@ function _M0FP48username4core3cmd4main10cmd__build(args) {
|
|
|
7685
8097
|
}
|
|
7686
8098
|
}
|
|
7687
8099
|
const stmts = _M0MP28username4core6Parser5parse(_M0MP28username4core6Parser3new(filtered));
|
|
7688
|
-
const header = no_header.val ? "" :
|
|
8100
|
+
const header = no_header.val ? "" : "// Generated by Purus 0.4.0";
|
|
7689
8101
|
const js = _M0MP28username4core9JsCodegen16generate_2einner(_M0MP28username4core9JsCodegen3new(), stmts, header, shebang.val);
|
|
7690
8102
|
if (to_stdout.val) {
|
|
7691
8103
|
_M0FP311moonbitlang4core7builtin7printlnGsE(js);
|
|
@@ -7809,118 +8221,6 @@ function _M0FP48username4core3cmd4main10cmd__check(file) {
|
|
|
7809
8221
|
_M0MP28username4core6Parser5parse(_M0MP28username4core6Parser3new(tokens));
|
|
7810
8222
|
_M0FP311moonbitlang4core7builtin7printlnGsE(`OK: ${file}`);
|
|
7811
8223
|
}
|
|
7812
|
-
function _M0FP48username4core3cmd4main8cmd__new(name) {
|
|
7813
|
-
if (name === "") {
|
|
7814
|
-
_M0FP311moonbitlang4core7builtin7printlnGsE("Error: project name required");
|
|
7815
|
-
_M0FP311moonbitlang4core7builtin7printlnGsE("Usage: purus new <name>");
|
|
7816
|
-
return undefined;
|
|
7817
|
-
}
|
|
7818
|
-
if (_M0FP311moonbitlang1x2fs12path__exists(name)) {
|
|
7819
|
-
_M0FP311moonbitlang4core7builtin7printlnGsE(`Error: directory '${name}' already exists`);
|
|
7820
|
-
return undefined;
|
|
7821
|
-
}
|
|
7822
|
-
let _try_err;
|
|
7823
|
-
_L: {
|
|
7824
|
-
_L$2: {
|
|
7825
|
-
const _bind = _M0FP311moonbitlang1x2fs11create__dir(name);
|
|
7826
|
-
if (_bind.$tag === 1) {
|
|
7827
|
-
const _ok = _bind;
|
|
7828
|
-
_ok._0;
|
|
7829
|
-
} else {
|
|
7830
|
-
const _err = _bind;
|
|
7831
|
-
_try_err = _err._0;
|
|
7832
|
-
break _L$2;
|
|
7833
|
-
}
|
|
7834
|
-
break _L;
|
|
7835
|
-
}
|
|
7836
|
-
let msg;
|
|
7837
|
-
_L$3: {
|
|
7838
|
-
const _IOError = _try_err;
|
|
7839
|
-
const _msg = _IOError._0;
|
|
7840
|
-
msg = _msg;
|
|
7841
|
-
break _L$3;
|
|
7842
|
-
}
|
|
7843
|
-
_M0FP311moonbitlang4core7builtin7printlnGsE(`Error: cannot create directory: ${msg}`);
|
|
7844
|
-
return undefined;
|
|
7845
|
-
}
|
|
7846
|
-
let _try_err$2;
|
|
7847
|
-
_L$2: {
|
|
7848
|
-
_L$3: {
|
|
7849
|
-
const _bind = _M0FP311moonbitlang1x2fs11create__dir(`${name}/src`);
|
|
7850
|
-
if (_bind.$tag === 1) {
|
|
7851
|
-
const _ok = _bind;
|
|
7852
|
-
_ok._0;
|
|
7853
|
-
} else {
|
|
7854
|
-
const _err = _bind;
|
|
7855
|
-
_try_err$2 = _err._0;
|
|
7856
|
-
break _L$3;
|
|
7857
|
-
}
|
|
7858
|
-
break _L$2;
|
|
7859
|
-
}
|
|
7860
|
-
let msg;
|
|
7861
|
-
_L$4: {
|
|
7862
|
-
const _IOError = _try_err$2;
|
|
7863
|
-
const _msg = _IOError._0;
|
|
7864
|
-
msg = _msg;
|
|
7865
|
-
break _L$4;
|
|
7866
|
-
}
|
|
7867
|
-
_M0FP311moonbitlang4core7builtin7printlnGsE(`Error: cannot create src directory: ${msg}`);
|
|
7868
|
-
return undefined;
|
|
7869
|
-
}
|
|
7870
|
-
const main_purus = "-- main.purus\n\nconst message be ///Hello, World///\nconsole.log[message]\n";
|
|
7871
|
-
let _try_err$3;
|
|
7872
|
-
_L$3: {
|
|
7873
|
-
_L$4: {
|
|
7874
|
-
const _bind = _M0FP311moonbitlang1x2fs31write__string__to__file_2einner(`${name}/src/main.purus`, main_purus, "utf8");
|
|
7875
|
-
if (_bind.$tag === 1) {
|
|
7876
|
-
const _ok = _bind;
|
|
7877
|
-
_ok._0;
|
|
7878
|
-
} else {
|
|
7879
|
-
const _err = _bind;
|
|
7880
|
-
_try_err$3 = _err._0;
|
|
7881
|
-
break _L$4;
|
|
7882
|
-
}
|
|
7883
|
-
break _L$3;
|
|
7884
|
-
}
|
|
7885
|
-
let msg;
|
|
7886
|
-
_L$5: {
|
|
7887
|
-
const _IOError = _try_err$3;
|
|
7888
|
-
const _msg = _IOError._0;
|
|
7889
|
-
msg = _msg;
|
|
7890
|
-
break _L$5;
|
|
7891
|
-
}
|
|
7892
|
-
_M0FP311moonbitlang4core7builtin7printlnGsE(`Error: ${msg}`);
|
|
7893
|
-
return undefined;
|
|
7894
|
-
}
|
|
7895
|
-
const gitignore = "*.js\nnode_modules/\n";
|
|
7896
|
-
let _try_err$4;
|
|
7897
|
-
_L$4: {
|
|
7898
|
-
_L$5: {
|
|
7899
|
-
const _bind = _M0FP311moonbitlang1x2fs31write__string__to__file_2einner(`${name}/.gitignore`, gitignore, "utf8");
|
|
7900
|
-
if (_bind.$tag === 1) {
|
|
7901
|
-
const _ok = _bind;
|
|
7902
|
-
_ok._0;
|
|
7903
|
-
} else {
|
|
7904
|
-
const _err = _bind;
|
|
7905
|
-
_try_err$4 = _err._0;
|
|
7906
|
-
break _L$5;
|
|
7907
|
-
}
|
|
7908
|
-
break _L$4;
|
|
7909
|
-
}
|
|
7910
|
-
let msg;
|
|
7911
|
-
_L$6: {
|
|
7912
|
-
const _IOError = _try_err$4;
|
|
7913
|
-
const _msg = _IOError._0;
|
|
7914
|
-
msg = _msg;
|
|
7915
|
-
break _L$6;
|
|
7916
|
-
}
|
|
7917
|
-
_M0FP311moonbitlang4core7builtin7printlnGsE(`Error: ${msg}`);
|
|
7918
|
-
return undefined;
|
|
7919
|
-
}
|
|
7920
|
-
_M0FP311moonbitlang4core7builtin7printlnGsE(`Created project '${name}'`);
|
|
7921
|
-
_M0FP311moonbitlang4core7builtin7printlnGsE(` ${name}/src/main.purus`);
|
|
7922
|
-
_M0FP311moonbitlang4core7builtin7printlnGsE(` ${name}/.gitignore`);
|
|
7923
|
-
}
|
|
7924
8224
|
function _M0FP48username4core3cmd4main9cmd__init() {
|
|
7925
8225
|
if (!_M0FP311moonbitlang1x2fs12path__exists("src")) {
|
|
7926
8226
|
let _try_err;
|
|
@@ -7980,71 +8280,32 @@ function _M0FP48username4core3cmd4main9cmd__init() {
|
|
|
7980
8280
|
(() => {
|
|
7981
8281
|
const args = _M0FP311moonbitlang1x3sys14get__cli__args();
|
|
7982
8282
|
if (args.length < 2) {
|
|
7983
|
-
_M0FP48username4core3cmd4main11print__help();
|
|
7984
8283
|
return;
|
|
7985
8284
|
}
|
|
7986
8285
|
const cmd = _M0MP311moonbitlang4core5array5Array2atGsE(args, 1);
|
|
7987
8286
|
_L: {
|
|
7988
|
-
|
|
7989
|
-
|
|
7990
|
-
_L
|
|
7991
|
-
|
|
7992
|
-
|
|
7993
|
-
|
|
7994
|
-
|
|
7995
|
-
|
|
7996
|
-
|
|
7997
|
-
|
|
7998
|
-
|
|
7999
|
-
|
|
8000
|
-
|
|
8001
|
-
|
|
8002
|
-
|
|
8003
|
-
|
|
8004
|
-
|
|
8005
|
-
|
|
8006
|
-
case "create": {
|
|
8007
|
-
break _L$3;
|
|
8008
|
-
}
|
|
8009
|
-
case "init": {
|
|
8010
|
-
_M0FP48username4core3cmd4main9cmd__init();
|
|
8011
|
-
return;
|
|
8012
|
-
}
|
|
8013
|
-
case "version": {
|
|
8014
|
-
break _L$2;
|
|
8015
|
-
}
|
|
8016
|
-
case "--version": {
|
|
8017
|
-
break _L$2;
|
|
8018
|
-
}
|
|
8019
|
-
case "-v": {
|
|
8020
|
-
break _L$2;
|
|
8021
|
-
}
|
|
8022
|
-
case "help": {
|
|
8023
|
-
break _L;
|
|
8024
|
-
}
|
|
8025
|
-
case "--help": {
|
|
8026
|
-
break _L;
|
|
8027
|
-
}
|
|
8028
|
-
case "-h": {
|
|
8029
|
-
break _L;
|
|
8030
|
-
}
|
|
8031
|
-
default: {
|
|
8032
|
-
_M0FP311moonbitlang4core7builtin7printlnGsE(`Unknown command: ${cmd}`);
|
|
8033
|
-
_M0FP48username4core3cmd4main11print__help();
|
|
8034
|
-
return;
|
|
8035
|
-
}
|
|
8036
|
-
}
|
|
8037
|
-
}
|
|
8038
|
-
_M0FP48username4core3cmd4main10cmd__build(_M0MP311moonbitlang4core5array9ArrayView9to__arrayGsE(_M0MP311moonbitlang4core5array5Array12view_2einnerGsE(args, 2, undefined)));
|
|
8287
|
+
switch (cmd) {
|
|
8288
|
+
case "build": {
|
|
8289
|
+
break _L;
|
|
8290
|
+
}
|
|
8291
|
+
case "compile": {
|
|
8292
|
+
break _L;
|
|
8293
|
+
}
|
|
8294
|
+
case "check": {
|
|
8295
|
+
const file = args.length > 2 ? _M0MP311moonbitlang4core5array5Array2atGsE(args, 2) : "";
|
|
8296
|
+
_M0FP48username4core3cmd4main10cmd__check(file);
|
|
8297
|
+
return;
|
|
8298
|
+
}
|
|
8299
|
+
case "init": {
|
|
8300
|
+
_M0FP48username4core3cmd4main9cmd__init();
|
|
8301
|
+
return;
|
|
8302
|
+
}
|
|
8303
|
+
default: {
|
|
8304
|
+
_M0FP311moonbitlang4core7builtin7printlnGsE(`Unknown command: ${cmd}`);
|
|
8039
8305
|
return;
|
|
8040
8306
|
}
|
|
8041
|
-
const name = args.length > 2 ? _M0MP311moonbitlang4core5array5Array2atGsE(args, 2) : "";
|
|
8042
|
-
_M0FP48username4core3cmd4main8cmd__new(name);
|
|
8043
|
-
return;
|
|
8044
8307
|
}
|
|
8045
|
-
_M0FP48username4core3cmd4main14print__version();
|
|
8046
|
-
return;
|
|
8047
8308
|
}
|
|
8048
|
-
|
|
8309
|
+
_M0FP48username4core3cmd4main10cmd__build(_M0MP311moonbitlang4core5array9ArrayView9to__arrayGsE(_M0MP311moonbitlang4core5array5Array12view_2einnerGsE(args, 2, undefined)));
|
|
8049
8310
|
})();
|
|
8050
8311
|
//# sourceMappingURL=main.js.map
|