purus 0.5.0 → 0.6.1
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 +2 -2
- package/lib/build-wrapper.js +16 -2
- package/lib/purus-compiler.js +1610 -923
- package/lib/purus-core.js +4 -1
- package/lib/run-wrapper.js +11 -2
- package/package.json +3 -3
package/lib/purus-compiler.js
CHANGED
|
@@ -209,47 +209,54 @@ const $64$username$47$core$46$TokenKind$Mod_ = { $tag: 67, $name: "Mod_" };
|
|
|
209
209
|
const $64$username$47$core$46$TokenKind$Pub_ = { $tag: 68, $name: "Pub_" };
|
|
210
210
|
const $64$username$47$core$46$TokenKind$All_ = { $tag: 69, $name: "All_" };
|
|
211
211
|
const $64$username$47$core$46$TokenKind$Type_ = { $tag: 70, $name: "Type_" };
|
|
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$
|
|
220
|
-
const $64$username$47$core$46$TokenKind$
|
|
221
|
-
const $64$username$47$core$46$TokenKind$
|
|
222
|
-
const $64$username$47$core$46$TokenKind$
|
|
223
|
-
const $64$username$47$core$46$TokenKind$
|
|
224
|
-
const $64$username$47$core$46$TokenKind$
|
|
225
|
-
const $64$username$47$core$46$TokenKind$
|
|
226
|
-
const $64$username$47$core$46$TokenKind$
|
|
212
|
+
const $64$username$47$core$46$TokenKind$Class_ = { $tag: 71, $name: "Class_" };
|
|
213
|
+
const $64$username$47$core$46$TokenKind$Extends_ = { $tag: 72, $name: "Extends_" };
|
|
214
|
+
const $64$username$47$core$46$TokenKind$Super_ = { $tag: 73, $name: "Super_" };
|
|
215
|
+
const $64$username$47$core$46$TokenKind$Static_ = { $tag: 74, $name: "Static_" };
|
|
216
|
+
const $64$username$47$core$46$TokenKind$Private_ = { $tag: 75, $name: "Private_" };
|
|
217
|
+
const $64$username$47$core$46$TokenKind$Get_ = { $tag: 76, $name: "Get_" };
|
|
218
|
+
const $64$username$47$core$46$TokenKind$Set_ = { $tag: 77, $name: "Set_" };
|
|
219
|
+
const $64$username$47$core$46$TokenKind$Null_ = { $tag: 78, $name: "Null_" };
|
|
220
|
+
const $64$username$47$core$46$TokenKind$Nil_ = { $tag: 79, $name: "Nil_" };
|
|
221
|
+
const $64$username$47$core$46$TokenKind$Undefined_ = { $tag: 80, $name: "Undefined_" };
|
|
222
|
+
const $64$username$47$core$46$TokenKind$List_ = { $tag: 81, $name: "List_" };
|
|
223
|
+
const $64$username$47$core$46$TokenKind$Object_ = { $tag: 82, $name: "Object_" };
|
|
224
|
+
const $64$username$47$core$46$TokenKind$LBracket = { $tag: 83, $name: "LBracket" };
|
|
225
|
+
const $64$username$47$core$46$TokenKind$RBracket = { $tag: 84, $name: "RBracket" };
|
|
226
|
+
const $64$username$47$core$46$TokenKind$Comma = { $tag: 85, $name: "Comma" };
|
|
227
|
+
const $64$username$47$core$46$TokenKind$Semicolon = { $tag: 86, $name: "Semicolon" };
|
|
228
|
+
const $64$username$47$core$46$TokenKind$Dot = { $tag: 87, $name: "Dot" };
|
|
229
|
+
const $64$username$47$core$46$TokenKind$DotDot = { $tag: 88, $name: "DotDot" };
|
|
230
|
+
const $64$username$47$core$46$TokenKind$DotDotDot = { $tag: 89, $name: "DotDotDot" };
|
|
231
|
+
const $64$username$47$core$46$TokenKind$Backslash = { $tag: 90, $name: "Backslash" };
|
|
232
|
+
const $64$username$47$core$46$TokenKind$OptDot = { $tag: 91, $name: "OptDot" };
|
|
233
|
+
const $64$username$47$core$46$TokenKind$Newline = { $tag: 92, $name: "Newline" };
|
|
227
234
|
function $64$username$47$core$46$TokenKind$Indent(param0) {
|
|
228
235
|
this._0 = param0;
|
|
229
236
|
}
|
|
230
|
-
$64$username$47$core$46$TokenKind$Indent.prototype.$tag =
|
|
237
|
+
$64$username$47$core$46$TokenKind$Indent.prototype.$tag = 93;
|
|
231
238
|
$64$username$47$core$46$TokenKind$Indent.prototype.$name = "Indent";
|
|
232
239
|
function $64$username$47$core$46$TokenKind$InterpStr(param0) {
|
|
233
240
|
this._0 = param0;
|
|
234
241
|
}
|
|
235
|
-
$64$username$47$core$46$TokenKind$InterpStr.prototype.$tag =
|
|
242
|
+
$64$username$47$core$46$TokenKind$InterpStr.prototype.$tag = 94;
|
|
236
243
|
$64$username$47$core$46$TokenKind$InterpStr.prototype.$name = "InterpStr";
|
|
237
244
|
function $64$username$47$core$46$TokenKind$Shebang(param0) {
|
|
238
245
|
this._0 = param0;
|
|
239
246
|
}
|
|
240
|
-
$64$username$47$core$46$TokenKind$Shebang.prototype.$tag =
|
|
247
|
+
$64$username$47$core$46$TokenKind$Shebang.prototype.$tag = 95;
|
|
241
248
|
$64$username$47$core$46$TokenKind$Shebang.prototype.$name = "Shebang";
|
|
242
249
|
function $64$username$47$core$46$TokenKind$Comment(param0) {
|
|
243
250
|
this._0 = param0;
|
|
244
251
|
}
|
|
245
|
-
$64$username$47$core$46$TokenKind$Comment.prototype.$tag =
|
|
252
|
+
$64$username$47$core$46$TokenKind$Comment.prototype.$tag = 96;
|
|
246
253
|
$64$username$47$core$46$TokenKind$Comment.prototype.$name = "Comment";
|
|
247
254
|
function $64$username$47$core$46$TokenKind$BlockComment(param0) {
|
|
248
255
|
this._0 = param0;
|
|
249
256
|
}
|
|
250
|
-
$64$username$47$core$46$TokenKind$BlockComment.prototype.$tag =
|
|
257
|
+
$64$username$47$core$46$TokenKind$BlockComment.prototype.$tag = 97;
|
|
251
258
|
$64$username$47$core$46$TokenKind$BlockComment.prototype.$name = "BlockComment";
|
|
252
|
-
const $64$username$47$core$46$TokenKind$Eof = { $tag:
|
|
259
|
+
const $64$username$47$core$46$TokenKind$Eof = { $tag: 98, $name: "Eof" };
|
|
253
260
|
function $64$username$47$core$46$Stmt$VarDecl(param0, param1, param2) {
|
|
254
261
|
this._0 = param0;
|
|
255
262
|
this._1 = param1;
|
|
@@ -407,10 +414,15 @@ function $64$username$47$core$46$Stmt$TypeDecl(param0, param1) {
|
|
|
407
414
|
}
|
|
408
415
|
$64$username$47$core$46$Stmt$TypeDecl.prototype.$tag = 26;
|
|
409
416
|
$64$username$47$core$46$Stmt$TypeDecl.prototype.$name = "TypeDecl";
|
|
417
|
+
function $64$username$47$core$46$Stmt$ClassDecl(param0) {
|
|
418
|
+
this._0 = param0;
|
|
419
|
+
}
|
|
420
|
+
$64$username$47$core$46$Stmt$ClassDecl.prototype.$tag = 27;
|
|
421
|
+
$64$username$47$core$46$Stmt$ClassDecl.prototype.$name = "ClassDecl";
|
|
410
422
|
function $64$username$47$core$46$Stmt$DeleteStmt(param0) {
|
|
411
423
|
this._0 = param0;
|
|
412
424
|
}
|
|
413
|
-
$64$username$47$core$46$Stmt$DeleteStmt.prototype.$tag =
|
|
425
|
+
$64$username$47$core$46$Stmt$DeleteStmt.prototype.$tag = 28;
|
|
414
426
|
$64$username$47$core$46$Stmt$DeleteStmt.prototype.$name = "DeleteStmt";
|
|
415
427
|
const Option$None$4$ = { $tag: 0, $name: "None" };
|
|
416
428
|
function Option$Some$4$(param0) {
|
|
@@ -635,36 +647,37 @@ function $64$username$47$core$46$Expr$DeleteExpr(param0) {
|
|
|
635
647
|
$64$username$47$core$46$Expr$DeleteExpr.prototype.$tag = 32;
|
|
636
648
|
$64$username$47$core$46$Expr$DeleteExpr.prototype.$name = "DeleteExpr";
|
|
637
649
|
const $64$username$47$core$46$Expr$ThisExpr = { $tag: 33, $name: "ThisExpr" };
|
|
650
|
+
const $64$username$47$core$46$Expr$SuperExpr = { $tag: 34, $name: "SuperExpr" };
|
|
638
651
|
function $64$username$47$core$46$Expr$OptDotAccess(param0, param1) {
|
|
639
652
|
this._0 = param0;
|
|
640
653
|
this._1 = param1;
|
|
641
654
|
}
|
|
642
|
-
$64$username$47$core$46$Expr$OptDotAccess.prototype.$tag =
|
|
655
|
+
$64$username$47$core$46$Expr$OptDotAccess.prototype.$tag = 35;
|
|
643
656
|
$64$username$47$core$46$Expr$OptDotAccess.prototype.$name = "OptDotAccess";
|
|
644
657
|
function $64$username$47$core$46$Expr$OptMethodCall(param0, param1, param2) {
|
|
645
658
|
this._0 = param0;
|
|
646
659
|
this._1 = param1;
|
|
647
660
|
this._2 = param2;
|
|
648
661
|
}
|
|
649
|
-
$64$username$47$core$46$Expr$OptMethodCall.prototype.$tag =
|
|
662
|
+
$64$username$47$core$46$Expr$OptMethodCall.prototype.$tag = 36;
|
|
650
663
|
$64$username$47$core$46$Expr$OptMethodCall.prototype.$name = "OptMethodCall";
|
|
651
664
|
function $64$username$47$core$46$Expr$ComputedAccess(param0, param1) {
|
|
652
665
|
this._0 = param0;
|
|
653
666
|
this._1 = param1;
|
|
654
667
|
}
|
|
655
|
-
$64$username$47$core$46$Expr$ComputedAccess.prototype.$tag =
|
|
668
|
+
$64$username$47$core$46$Expr$ComputedAccess.prototype.$tag = 37;
|
|
656
669
|
$64$username$47$core$46$Expr$ComputedAccess.prototype.$name = "ComputedAccess";
|
|
657
670
|
function $64$username$47$core$46$Expr$AsyncFnExpr(param0, param1) {
|
|
658
671
|
this._0 = param0;
|
|
659
672
|
this._1 = param1;
|
|
660
673
|
}
|
|
661
|
-
$64$username$47$core$46$Expr$AsyncFnExpr.prototype.$tag =
|
|
674
|
+
$64$username$47$core$46$Expr$AsyncFnExpr.prototype.$tag = 38;
|
|
662
675
|
$64$username$47$core$46$Expr$AsyncFnExpr.prototype.$name = "AsyncFnExpr";
|
|
663
676
|
function $64$username$47$core$46$Expr$AsyncFnExprTo(param0, param1) {
|
|
664
677
|
this._0 = param0;
|
|
665
678
|
this._1 = param1;
|
|
666
679
|
}
|
|
667
|
-
$64$username$47$core$46$Expr$AsyncFnExprTo.prototype.$tag =
|
|
680
|
+
$64$username$47$core$46$Expr$AsyncFnExprTo.prototype.$tag = 39;
|
|
668
681
|
$64$username$47$core$46$Expr$AsyncFnExprTo.prototype.$name = "AsyncFnExprTo";
|
|
669
682
|
function $64$username$47$core$46$StrPart$Lit(param0) {
|
|
670
683
|
this._0 = param0;
|
|
@@ -676,6 +689,41 @@ function $64$username$47$core$46$StrPart$Interp(param0) {
|
|
|
676
689
|
}
|
|
677
690
|
$64$username$47$core$46$StrPart$Interp.prototype.$tag = 1;
|
|
678
691
|
$64$username$47$core$46$StrPart$Interp.prototype.$name = "Interp";
|
|
692
|
+
function $64$username$47$core$46$ClassMember$Field(param0, param1, param2) {
|
|
693
|
+
this._0 = param0;
|
|
694
|
+
this._1 = param1;
|
|
695
|
+
this._2 = param2;
|
|
696
|
+
}
|
|
697
|
+
$64$username$47$core$46$ClassMember$Field.prototype.$tag = 0;
|
|
698
|
+
$64$username$47$core$46$ClassMember$Field.prototype.$name = "Field";
|
|
699
|
+
function $64$username$47$core$46$ClassMember$Constructor(param0, param1) {
|
|
700
|
+
this._0 = param0;
|
|
701
|
+
this._1 = param1;
|
|
702
|
+
}
|
|
703
|
+
$64$username$47$core$46$ClassMember$Constructor.prototype.$tag = 1;
|
|
704
|
+
$64$username$47$core$46$ClassMember$Constructor.prototype.$name = "Constructor";
|
|
705
|
+
function $64$username$47$core$46$ClassMember$Method(param0, param1, param2, param3, param4) {
|
|
706
|
+
this._0 = param0;
|
|
707
|
+
this._1 = param1;
|
|
708
|
+
this._2 = param2;
|
|
709
|
+
this._3 = param3;
|
|
710
|
+
this._4 = param4;
|
|
711
|
+
}
|
|
712
|
+
$64$username$47$core$46$ClassMember$Method.prototype.$tag = 2;
|
|
713
|
+
$64$username$47$core$46$ClassMember$Method.prototype.$name = "Method";
|
|
714
|
+
function $64$username$47$core$46$ClassMember$Getter(param0, param1) {
|
|
715
|
+
this._0 = param0;
|
|
716
|
+
this._1 = param1;
|
|
717
|
+
}
|
|
718
|
+
$64$username$47$core$46$ClassMember$Getter.prototype.$tag = 3;
|
|
719
|
+
$64$username$47$core$46$ClassMember$Getter.prototype.$name = "Getter";
|
|
720
|
+
function $64$username$47$core$46$ClassMember$Setter(param0, param1, param2) {
|
|
721
|
+
this._0 = param0;
|
|
722
|
+
this._1 = param1;
|
|
723
|
+
this._2 = param2;
|
|
724
|
+
}
|
|
725
|
+
$64$username$47$core$46$ClassMember$Setter.prototype.$tag = 4;
|
|
726
|
+
$64$username$47$core$46$ClassMember$Setter.prototype.$name = "Setter";
|
|
679
727
|
function $64$username$47$core$46$FnBody$Block(param0) {
|
|
680
728
|
this._0 = param0;
|
|
681
729
|
}
|
|
@@ -1596,6 +1644,9 @@ function _M0MP311moonbitlang4core5array5Array4pushGsE(self, value) {
|
|
|
1596
1644
|
function _M0MP311moonbitlang4core5array5Array4pushGRP28username4core10ElIfBranchE(self, value) {
|
|
1597
1645
|
_M0MP311moonbitlang4core7builtin7JSArray4push(self, value);
|
|
1598
1646
|
}
|
|
1647
|
+
function _M0MP311moonbitlang4core5array5Array4pushGRP28username4core11ClassMemberE(self, value) {
|
|
1648
|
+
_M0MP311moonbitlang4core7builtin7JSArray4push(self, value);
|
|
1649
|
+
}
|
|
1599
1650
|
function _M0MP311moonbitlang4core5array5Array4pushGyE(self, value) {
|
|
1600
1651
|
_M0MP311moonbitlang4core7builtin7JSArray4push(self, value);
|
|
1601
1652
|
}
|
|
@@ -2172,743 +2223,792 @@ function _M0FP511moonbitlang1x3sys8internal3ffi14get__cli__args() {
|
|
|
2172
2223
|
function _M0FP311moonbitlang1x3sys14get__cli__args() {
|
|
2173
2224
|
return _M0FP511moonbitlang1x3sys8internal3ffi14get__cli__args();
|
|
2174
2225
|
}
|
|
2175
|
-
function _M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(
|
|
2176
|
-
let
|
|
2177
|
-
let
|
|
2226
|
+
function _M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_x_932, _x_933) {
|
|
2227
|
+
let _x0_954;
|
|
2228
|
+
let _y0_955;
|
|
2178
2229
|
_L: {
|
|
2179
|
-
let
|
|
2180
|
-
let
|
|
2230
|
+
let _x0_952;
|
|
2231
|
+
let _y0_953;
|
|
2181
2232
|
_L$2: {
|
|
2182
|
-
let
|
|
2183
|
-
let
|
|
2233
|
+
let _x0_950;
|
|
2234
|
+
let _y0_951;
|
|
2184
2235
|
_L$3: {
|
|
2185
|
-
let
|
|
2186
|
-
let
|
|
2236
|
+
let _x0_948;
|
|
2237
|
+
let _y0_949;
|
|
2187
2238
|
_L$4: {
|
|
2188
|
-
let
|
|
2189
|
-
let
|
|
2239
|
+
let _x0_946;
|
|
2240
|
+
let _y0_947;
|
|
2190
2241
|
_L$5: {
|
|
2191
|
-
let
|
|
2192
|
-
let
|
|
2242
|
+
let _x0_944;
|
|
2243
|
+
let _y0_945;
|
|
2193
2244
|
_L$6: {
|
|
2194
|
-
let
|
|
2195
|
-
let
|
|
2196
|
-
let
|
|
2197
|
-
let
|
|
2245
|
+
let _x1_941;
|
|
2246
|
+
let _x0_940;
|
|
2247
|
+
let _y0_942;
|
|
2248
|
+
let _y1_943;
|
|
2198
2249
|
_L$7: {
|
|
2199
|
-
let
|
|
2200
|
-
let
|
|
2250
|
+
let _x0_938;
|
|
2251
|
+
let _y0_939;
|
|
2201
2252
|
_L$8: {
|
|
2202
|
-
let
|
|
2203
|
-
let
|
|
2253
|
+
let _x0_936;
|
|
2254
|
+
let _y0_937;
|
|
2204
2255
|
_L$9: {
|
|
2205
|
-
let
|
|
2206
|
-
let
|
|
2256
|
+
let _x0_934;
|
|
2257
|
+
let _y0_935;
|
|
2207
2258
|
_L$10: {
|
|
2208
|
-
switch (
|
|
2259
|
+
switch (_x_932.$tag) {
|
|
2209
2260
|
case 0: {
|
|
2210
|
-
const _Int =
|
|
2211
|
-
const _$42$
|
|
2212
|
-
if (
|
|
2213
|
-
const _Int$2 =
|
|
2214
|
-
const _$42$
|
|
2215
|
-
|
|
2216
|
-
|
|
2261
|
+
const _Int = _x_932;
|
|
2262
|
+
const _$42$x0_934 = _Int._0;
|
|
2263
|
+
if (_x_933.$tag === 0) {
|
|
2264
|
+
const _Int$2 = _x_933;
|
|
2265
|
+
const _$42$y0_935 = _Int$2._0;
|
|
2266
|
+
_x0_934 = _$42$x0_934;
|
|
2267
|
+
_y0_935 = _$42$y0_935;
|
|
2217
2268
|
break _L$10;
|
|
2218
2269
|
} else {
|
|
2219
2270
|
return false;
|
|
2220
2271
|
}
|
|
2221
2272
|
}
|
|
2222
2273
|
case 1: {
|
|
2223
|
-
const _Float =
|
|
2224
|
-
const _$42$
|
|
2225
|
-
if (
|
|
2226
|
-
const _Float$2 =
|
|
2227
|
-
const _$42$
|
|
2228
|
-
|
|
2229
|
-
|
|
2274
|
+
const _Float = _x_932;
|
|
2275
|
+
const _$42$x0_936 = _Float._0;
|
|
2276
|
+
if (_x_933.$tag === 1) {
|
|
2277
|
+
const _Float$2 = _x_933;
|
|
2278
|
+
const _$42$y0_937 = _Float$2._0;
|
|
2279
|
+
_x0_936 = _$42$x0_936;
|
|
2280
|
+
_y0_937 = _$42$y0_937;
|
|
2230
2281
|
break _L$9;
|
|
2231
2282
|
} else {
|
|
2232
2283
|
return false;
|
|
2233
2284
|
}
|
|
2234
2285
|
}
|
|
2235
2286
|
case 2: {
|
|
2236
|
-
const _Str =
|
|
2237
|
-
const _$42$
|
|
2238
|
-
if (
|
|
2239
|
-
const _Str$2 =
|
|
2240
|
-
const _$42$
|
|
2241
|
-
|
|
2242
|
-
|
|
2287
|
+
const _Str = _x_932;
|
|
2288
|
+
const _$42$x0_938 = _Str._0;
|
|
2289
|
+
if (_x_933.$tag === 2) {
|
|
2290
|
+
const _Str$2 = _x_933;
|
|
2291
|
+
const _$42$y0_939 = _Str$2._0;
|
|
2292
|
+
_x0_938 = _$42$x0_938;
|
|
2293
|
+
_y0_939 = _$42$y0_939;
|
|
2243
2294
|
break _L$8;
|
|
2244
2295
|
} else {
|
|
2245
2296
|
return false;
|
|
2246
2297
|
}
|
|
2247
2298
|
}
|
|
2248
2299
|
case 3: {
|
|
2249
|
-
const _Regex =
|
|
2250
|
-
const _$42$
|
|
2251
|
-
const _$42$
|
|
2252
|
-
if (
|
|
2253
|
-
const _Regex$2 =
|
|
2254
|
-
const _$42$
|
|
2255
|
-
const _$42$
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2300
|
+
const _Regex = _x_932;
|
|
2301
|
+
const _$42$x0_940 = _Regex._0;
|
|
2302
|
+
const _$42$x1_941 = _Regex._1;
|
|
2303
|
+
if (_x_933.$tag === 3) {
|
|
2304
|
+
const _Regex$2 = _x_933;
|
|
2305
|
+
const _$42$y0_942 = _Regex$2._0;
|
|
2306
|
+
const _$42$y1_943 = _Regex$2._1;
|
|
2307
|
+
_x1_941 = _$42$x1_941;
|
|
2308
|
+
_x0_940 = _$42$x0_940;
|
|
2309
|
+
_y0_942 = _$42$y0_942;
|
|
2310
|
+
_y1_943 = _$42$y1_943;
|
|
2260
2311
|
break _L$7;
|
|
2261
2312
|
} else {
|
|
2262
2313
|
return false;
|
|
2263
2314
|
}
|
|
2264
2315
|
}
|
|
2265
2316
|
case 4: {
|
|
2266
|
-
if (
|
|
2317
|
+
if (_x_933.$tag === 4) {
|
|
2267
2318
|
return true;
|
|
2268
2319
|
} else {
|
|
2269
2320
|
return false;
|
|
2270
2321
|
}
|
|
2271
2322
|
}
|
|
2272
2323
|
case 5: {
|
|
2273
|
-
if (
|
|
2324
|
+
if (_x_933.$tag === 5) {
|
|
2274
2325
|
return true;
|
|
2275
2326
|
} else {
|
|
2276
2327
|
return false;
|
|
2277
2328
|
}
|
|
2278
2329
|
}
|
|
2279
2330
|
case 6: {
|
|
2280
|
-
const _Ident =
|
|
2281
|
-
const _$42$
|
|
2282
|
-
if (
|
|
2283
|
-
const _Ident$2 =
|
|
2284
|
-
const _$42$
|
|
2285
|
-
|
|
2286
|
-
|
|
2331
|
+
const _Ident = _x_932;
|
|
2332
|
+
const _$42$x0_944 = _Ident._0;
|
|
2333
|
+
if (_x_933.$tag === 6) {
|
|
2334
|
+
const _Ident$2 = _x_933;
|
|
2335
|
+
const _$42$y0_945 = _Ident$2._0;
|
|
2336
|
+
_x0_944 = _$42$x0_944;
|
|
2337
|
+
_y0_945 = _$42$y0_945;
|
|
2287
2338
|
break _L$6;
|
|
2288
2339
|
} else {
|
|
2289
2340
|
return false;
|
|
2290
2341
|
}
|
|
2291
2342
|
}
|
|
2292
2343
|
case 7: {
|
|
2293
|
-
if (
|
|
2344
|
+
if (_x_933.$tag === 7) {
|
|
2294
2345
|
return true;
|
|
2295
2346
|
} else {
|
|
2296
2347
|
return false;
|
|
2297
2348
|
}
|
|
2298
2349
|
}
|
|
2299
2350
|
case 8: {
|
|
2300
|
-
if (
|
|
2351
|
+
if (_x_933.$tag === 8) {
|
|
2301
2352
|
return true;
|
|
2302
2353
|
} else {
|
|
2303
2354
|
return false;
|
|
2304
2355
|
}
|
|
2305
2356
|
}
|
|
2306
2357
|
case 9: {
|
|
2307
|
-
if (
|
|
2358
|
+
if (_x_933.$tag === 9) {
|
|
2308
2359
|
return true;
|
|
2309
2360
|
} else {
|
|
2310
2361
|
return false;
|
|
2311
2362
|
}
|
|
2312
2363
|
}
|
|
2313
2364
|
case 10: {
|
|
2314
|
-
if (
|
|
2365
|
+
if (_x_933.$tag === 10) {
|
|
2315
2366
|
return true;
|
|
2316
2367
|
} else {
|
|
2317
2368
|
return false;
|
|
2318
2369
|
}
|
|
2319
2370
|
}
|
|
2320
2371
|
case 11: {
|
|
2321
|
-
if (
|
|
2372
|
+
if (_x_933.$tag === 11) {
|
|
2322
2373
|
return true;
|
|
2323
2374
|
} else {
|
|
2324
2375
|
return false;
|
|
2325
2376
|
}
|
|
2326
2377
|
}
|
|
2327
2378
|
case 12: {
|
|
2328
|
-
if (
|
|
2379
|
+
if (_x_933.$tag === 12) {
|
|
2329
2380
|
return true;
|
|
2330
2381
|
} else {
|
|
2331
2382
|
return false;
|
|
2332
2383
|
}
|
|
2333
2384
|
}
|
|
2334
2385
|
case 13: {
|
|
2335
|
-
if (
|
|
2386
|
+
if (_x_933.$tag === 13) {
|
|
2336
2387
|
return true;
|
|
2337
2388
|
} else {
|
|
2338
2389
|
return false;
|
|
2339
2390
|
}
|
|
2340
2391
|
}
|
|
2341
2392
|
case 14: {
|
|
2342
|
-
if (
|
|
2393
|
+
if (_x_933.$tag === 14) {
|
|
2343
2394
|
return true;
|
|
2344
2395
|
} else {
|
|
2345
2396
|
return false;
|
|
2346
2397
|
}
|
|
2347
2398
|
}
|
|
2348
2399
|
case 15: {
|
|
2349
|
-
if (
|
|
2400
|
+
if (_x_933.$tag === 15) {
|
|
2350
2401
|
return true;
|
|
2351
2402
|
} else {
|
|
2352
2403
|
return false;
|
|
2353
2404
|
}
|
|
2354
2405
|
}
|
|
2355
2406
|
case 16: {
|
|
2356
|
-
if (
|
|
2407
|
+
if (_x_933.$tag === 16) {
|
|
2357
2408
|
return true;
|
|
2358
2409
|
} else {
|
|
2359
2410
|
return false;
|
|
2360
2411
|
}
|
|
2361
2412
|
}
|
|
2362
2413
|
case 17: {
|
|
2363
|
-
if (
|
|
2414
|
+
if (_x_933.$tag === 17) {
|
|
2364
2415
|
return true;
|
|
2365
2416
|
} else {
|
|
2366
2417
|
return false;
|
|
2367
2418
|
}
|
|
2368
2419
|
}
|
|
2369
2420
|
case 18: {
|
|
2370
|
-
if (
|
|
2421
|
+
if (_x_933.$tag === 18) {
|
|
2371
2422
|
return true;
|
|
2372
2423
|
} else {
|
|
2373
2424
|
return false;
|
|
2374
2425
|
}
|
|
2375
2426
|
}
|
|
2376
2427
|
case 19: {
|
|
2377
|
-
if (
|
|
2428
|
+
if (_x_933.$tag === 19) {
|
|
2378
2429
|
return true;
|
|
2379
2430
|
} else {
|
|
2380
2431
|
return false;
|
|
2381
2432
|
}
|
|
2382
2433
|
}
|
|
2383
2434
|
case 20: {
|
|
2384
|
-
if (
|
|
2435
|
+
if (_x_933.$tag === 20) {
|
|
2385
2436
|
return true;
|
|
2386
2437
|
} else {
|
|
2387
2438
|
return false;
|
|
2388
2439
|
}
|
|
2389
2440
|
}
|
|
2390
2441
|
case 21: {
|
|
2391
|
-
if (
|
|
2442
|
+
if (_x_933.$tag === 21) {
|
|
2392
2443
|
return true;
|
|
2393
2444
|
} else {
|
|
2394
2445
|
return false;
|
|
2395
2446
|
}
|
|
2396
2447
|
}
|
|
2397
2448
|
case 22: {
|
|
2398
|
-
if (
|
|
2449
|
+
if (_x_933.$tag === 22) {
|
|
2399
2450
|
return true;
|
|
2400
2451
|
} else {
|
|
2401
2452
|
return false;
|
|
2402
2453
|
}
|
|
2403
2454
|
}
|
|
2404
2455
|
case 23: {
|
|
2405
|
-
if (
|
|
2456
|
+
if (_x_933.$tag === 23) {
|
|
2406
2457
|
return true;
|
|
2407
2458
|
} else {
|
|
2408
2459
|
return false;
|
|
2409
2460
|
}
|
|
2410
2461
|
}
|
|
2411
2462
|
case 24: {
|
|
2412
|
-
if (
|
|
2463
|
+
if (_x_933.$tag === 24) {
|
|
2413
2464
|
return true;
|
|
2414
2465
|
} else {
|
|
2415
2466
|
return false;
|
|
2416
2467
|
}
|
|
2417
2468
|
}
|
|
2418
2469
|
case 25: {
|
|
2419
|
-
if (
|
|
2470
|
+
if (_x_933.$tag === 25) {
|
|
2420
2471
|
return true;
|
|
2421
2472
|
} else {
|
|
2422
2473
|
return false;
|
|
2423
2474
|
}
|
|
2424
2475
|
}
|
|
2425
2476
|
case 26: {
|
|
2426
|
-
if (
|
|
2477
|
+
if (_x_933.$tag === 26) {
|
|
2427
2478
|
return true;
|
|
2428
2479
|
} else {
|
|
2429
2480
|
return false;
|
|
2430
2481
|
}
|
|
2431
2482
|
}
|
|
2432
2483
|
case 27: {
|
|
2433
|
-
if (
|
|
2484
|
+
if (_x_933.$tag === 27) {
|
|
2434
2485
|
return true;
|
|
2435
2486
|
} else {
|
|
2436
2487
|
return false;
|
|
2437
2488
|
}
|
|
2438
2489
|
}
|
|
2439
2490
|
case 28: {
|
|
2440
|
-
if (
|
|
2491
|
+
if (_x_933.$tag === 28) {
|
|
2441
2492
|
return true;
|
|
2442
2493
|
} else {
|
|
2443
2494
|
return false;
|
|
2444
2495
|
}
|
|
2445
2496
|
}
|
|
2446
2497
|
case 29: {
|
|
2447
|
-
if (
|
|
2498
|
+
if (_x_933.$tag === 29) {
|
|
2448
2499
|
return true;
|
|
2449
2500
|
} else {
|
|
2450
2501
|
return false;
|
|
2451
2502
|
}
|
|
2452
2503
|
}
|
|
2453
2504
|
case 30: {
|
|
2454
|
-
if (
|
|
2505
|
+
if (_x_933.$tag === 30) {
|
|
2455
2506
|
return true;
|
|
2456
2507
|
} else {
|
|
2457
2508
|
return false;
|
|
2458
2509
|
}
|
|
2459
2510
|
}
|
|
2460
2511
|
case 31: {
|
|
2461
|
-
if (
|
|
2512
|
+
if (_x_933.$tag === 31) {
|
|
2462
2513
|
return true;
|
|
2463
2514
|
} else {
|
|
2464
2515
|
return false;
|
|
2465
2516
|
}
|
|
2466
2517
|
}
|
|
2467
2518
|
case 32: {
|
|
2468
|
-
if (
|
|
2519
|
+
if (_x_933.$tag === 32) {
|
|
2469
2520
|
return true;
|
|
2470
2521
|
} else {
|
|
2471
2522
|
return false;
|
|
2472
2523
|
}
|
|
2473
2524
|
}
|
|
2474
2525
|
case 33: {
|
|
2475
|
-
if (
|
|
2526
|
+
if (_x_933.$tag === 33) {
|
|
2476
2527
|
return true;
|
|
2477
2528
|
} else {
|
|
2478
2529
|
return false;
|
|
2479
2530
|
}
|
|
2480
2531
|
}
|
|
2481
2532
|
case 34: {
|
|
2482
|
-
if (
|
|
2533
|
+
if (_x_933.$tag === 34) {
|
|
2483
2534
|
return true;
|
|
2484
2535
|
} else {
|
|
2485
2536
|
return false;
|
|
2486
2537
|
}
|
|
2487
2538
|
}
|
|
2488
2539
|
case 35: {
|
|
2489
|
-
if (
|
|
2540
|
+
if (_x_933.$tag === 35) {
|
|
2490
2541
|
return true;
|
|
2491
2542
|
} else {
|
|
2492
2543
|
return false;
|
|
2493
2544
|
}
|
|
2494
2545
|
}
|
|
2495
2546
|
case 36: {
|
|
2496
|
-
if (
|
|
2547
|
+
if (_x_933.$tag === 36) {
|
|
2497
2548
|
return true;
|
|
2498
2549
|
} else {
|
|
2499
2550
|
return false;
|
|
2500
2551
|
}
|
|
2501
2552
|
}
|
|
2502
2553
|
case 37: {
|
|
2503
|
-
if (
|
|
2554
|
+
if (_x_933.$tag === 37) {
|
|
2504
2555
|
return true;
|
|
2505
2556
|
} else {
|
|
2506
2557
|
return false;
|
|
2507
2558
|
}
|
|
2508
2559
|
}
|
|
2509
2560
|
case 38: {
|
|
2510
|
-
if (
|
|
2561
|
+
if (_x_933.$tag === 38) {
|
|
2511
2562
|
return true;
|
|
2512
2563
|
} else {
|
|
2513
2564
|
return false;
|
|
2514
2565
|
}
|
|
2515
2566
|
}
|
|
2516
2567
|
case 39: {
|
|
2517
|
-
if (
|
|
2568
|
+
if (_x_933.$tag === 39) {
|
|
2518
2569
|
return true;
|
|
2519
2570
|
} else {
|
|
2520
2571
|
return false;
|
|
2521
2572
|
}
|
|
2522
2573
|
}
|
|
2523
2574
|
case 40: {
|
|
2524
|
-
if (
|
|
2575
|
+
if (_x_933.$tag === 40) {
|
|
2525
2576
|
return true;
|
|
2526
2577
|
} else {
|
|
2527
2578
|
return false;
|
|
2528
2579
|
}
|
|
2529
2580
|
}
|
|
2530
2581
|
case 41: {
|
|
2531
|
-
if (
|
|
2582
|
+
if (_x_933.$tag === 41) {
|
|
2532
2583
|
return true;
|
|
2533
2584
|
} else {
|
|
2534
2585
|
return false;
|
|
2535
2586
|
}
|
|
2536
2587
|
}
|
|
2537
2588
|
case 42: {
|
|
2538
|
-
if (
|
|
2589
|
+
if (_x_933.$tag === 42) {
|
|
2539
2590
|
return true;
|
|
2540
2591
|
} else {
|
|
2541
2592
|
return false;
|
|
2542
2593
|
}
|
|
2543
2594
|
}
|
|
2544
2595
|
case 43: {
|
|
2545
|
-
if (
|
|
2596
|
+
if (_x_933.$tag === 43) {
|
|
2546
2597
|
return true;
|
|
2547
2598
|
} else {
|
|
2548
2599
|
return false;
|
|
2549
2600
|
}
|
|
2550
2601
|
}
|
|
2551
2602
|
case 44: {
|
|
2552
|
-
if (
|
|
2603
|
+
if (_x_933.$tag === 44) {
|
|
2553
2604
|
return true;
|
|
2554
2605
|
} else {
|
|
2555
2606
|
return false;
|
|
2556
2607
|
}
|
|
2557
2608
|
}
|
|
2558
2609
|
case 45: {
|
|
2559
|
-
if (
|
|
2610
|
+
if (_x_933.$tag === 45) {
|
|
2560
2611
|
return true;
|
|
2561
2612
|
} else {
|
|
2562
2613
|
return false;
|
|
2563
2614
|
}
|
|
2564
2615
|
}
|
|
2565
2616
|
case 46: {
|
|
2566
|
-
if (
|
|
2617
|
+
if (_x_933.$tag === 46) {
|
|
2567
2618
|
return true;
|
|
2568
2619
|
} else {
|
|
2569
2620
|
return false;
|
|
2570
2621
|
}
|
|
2571
2622
|
}
|
|
2572
2623
|
case 47: {
|
|
2573
|
-
if (
|
|
2624
|
+
if (_x_933.$tag === 47) {
|
|
2574
2625
|
return true;
|
|
2575
2626
|
} else {
|
|
2576
2627
|
return false;
|
|
2577
2628
|
}
|
|
2578
2629
|
}
|
|
2579
2630
|
case 48: {
|
|
2580
|
-
if (
|
|
2631
|
+
if (_x_933.$tag === 48) {
|
|
2581
2632
|
return true;
|
|
2582
2633
|
} else {
|
|
2583
2634
|
return false;
|
|
2584
2635
|
}
|
|
2585
2636
|
}
|
|
2586
2637
|
case 49: {
|
|
2587
|
-
if (
|
|
2638
|
+
if (_x_933.$tag === 49) {
|
|
2588
2639
|
return true;
|
|
2589
2640
|
} else {
|
|
2590
2641
|
return false;
|
|
2591
2642
|
}
|
|
2592
2643
|
}
|
|
2593
2644
|
case 50: {
|
|
2594
|
-
if (
|
|
2645
|
+
if (_x_933.$tag === 50) {
|
|
2595
2646
|
return true;
|
|
2596
2647
|
} else {
|
|
2597
2648
|
return false;
|
|
2598
2649
|
}
|
|
2599
2650
|
}
|
|
2600
2651
|
case 51: {
|
|
2601
|
-
if (
|
|
2652
|
+
if (_x_933.$tag === 51) {
|
|
2602
2653
|
return true;
|
|
2603
2654
|
} else {
|
|
2604
2655
|
return false;
|
|
2605
2656
|
}
|
|
2606
2657
|
}
|
|
2607
2658
|
case 52: {
|
|
2608
|
-
if (
|
|
2659
|
+
if (_x_933.$tag === 52) {
|
|
2609
2660
|
return true;
|
|
2610
2661
|
} else {
|
|
2611
2662
|
return false;
|
|
2612
2663
|
}
|
|
2613
2664
|
}
|
|
2614
2665
|
case 53: {
|
|
2615
|
-
if (
|
|
2666
|
+
if (_x_933.$tag === 53) {
|
|
2616
2667
|
return true;
|
|
2617
2668
|
} else {
|
|
2618
2669
|
return false;
|
|
2619
2670
|
}
|
|
2620
2671
|
}
|
|
2621
2672
|
case 54: {
|
|
2622
|
-
if (
|
|
2673
|
+
if (_x_933.$tag === 54) {
|
|
2623
2674
|
return true;
|
|
2624
2675
|
} else {
|
|
2625
2676
|
return false;
|
|
2626
2677
|
}
|
|
2627
2678
|
}
|
|
2628
2679
|
case 55: {
|
|
2629
|
-
if (
|
|
2680
|
+
if (_x_933.$tag === 55) {
|
|
2630
2681
|
return true;
|
|
2631
2682
|
} else {
|
|
2632
2683
|
return false;
|
|
2633
2684
|
}
|
|
2634
2685
|
}
|
|
2635
2686
|
case 56: {
|
|
2636
|
-
if (
|
|
2687
|
+
if (_x_933.$tag === 56) {
|
|
2637
2688
|
return true;
|
|
2638
2689
|
} else {
|
|
2639
2690
|
return false;
|
|
2640
2691
|
}
|
|
2641
2692
|
}
|
|
2642
2693
|
case 57: {
|
|
2643
|
-
if (
|
|
2694
|
+
if (_x_933.$tag === 57) {
|
|
2644
2695
|
return true;
|
|
2645
2696
|
} else {
|
|
2646
2697
|
return false;
|
|
2647
2698
|
}
|
|
2648
2699
|
}
|
|
2649
2700
|
case 58: {
|
|
2650
|
-
if (
|
|
2701
|
+
if (_x_933.$tag === 58) {
|
|
2651
2702
|
return true;
|
|
2652
2703
|
} else {
|
|
2653
2704
|
return false;
|
|
2654
2705
|
}
|
|
2655
2706
|
}
|
|
2656
2707
|
case 59: {
|
|
2657
|
-
if (
|
|
2708
|
+
if (_x_933.$tag === 59) {
|
|
2658
2709
|
return true;
|
|
2659
2710
|
} else {
|
|
2660
2711
|
return false;
|
|
2661
2712
|
}
|
|
2662
2713
|
}
|
|
2663
2714
|
case 60: {
|
|
2664
|
-
if (
|
|
2715
|
+
if (_x_933.$tag === 60) {
|
|
2665
2716
|
return true;
|
|
2666
2717
|
} else {
|
|
2667
2718
|
return false;
|
|
2668
2719
|
}
|
|
2669
2720
|
}
|
|
2670
2721
|
case 61: {
|
|
2671
|
-
if (
|
|
2722
|
+
if (_x_933.$tag === 61) {
|
|
2672
2723
|
return true;
|
|
2673
2724
|
} else {
|
|
2674
2725
|
return false;
|
|
2675
2726
|
}
|
|
2676
2727
|
}
|
|
2677
2728
|
case 62: {
|
|
2678
|
-
if (
|
|
2729
|
+
if (_x_933.$tag === 62) {
|
|
2679
2730
|
return true;
|
|
2680
2731
|
} else {
|
|
2681
2732
|
return false;
|
|
2682
2733
|
}
|
|
2683
2734
|
}
|
|
2684
2735
|
case 63: {
|
|
2685
|
-
if (
|
|
2736
|
+
if (_x_933.$tag === 63) {
|
|
2686
2737
|
return true;
|
|
2687
2738
|
} else {
|
|
2688
2739
|
return false;
|
|
2689
2740
|
}
|
|
2690
2741
|
}
|
|
2691
2742
|
case 64: {
|
|
2692
|
-
if (
|
|
2743
|
+
if (_x_933.$tag === 64) {
|
|
2693
2744
|
return true;
|
|
2694
2745
|
} else {
|
|
2695
2746
|
return false;
|
|
2696
2747
|
}
|
|
2697
2748
|
}
|
|
2698
2749
|
case 65: {
|
|
2699
|
-
if (
|
|
2750
|
+
if (_x_933.$tag === 65) {
|
|
2700
2751
|
return true;
|
|
2701
2752
|
} else {
|
|
2702
2753
|
return false;
|
|
2703
2754
|
}
|
|
2704
2755
|
}
|
|
2705
2756
|
case 66: {
|
|
2706
|
-
if (
|
|
2757
|
+
if (_x_933.$tag === 66) {
|
|
2707
2758
|
return true;
|
|
2708
2759
|
} else {
|
|
2709
2760
|
return false;
|
|
2710
2761
|
}
|
|
2711
2762
|
}
|
|
2712
2763
|
case 67: {
|
|
2713
|
-
if (
|
|
2764
|
+
if (_x_933.$tag === 67) {
|
|
2714
2765
|
return true;
|
|
2715
2766
|
} else {
|
|
2716
2767
|
return false;
|
|
2717
2768
|
}
|
|
2718
2769
|
}
|
|
2719
2770
|
case 68: {
|
|
2720
|
-
if (
|
|
2771
|
+
if (_x_933.$tag === 68) {
|
|
2721
2772
|
return true;
|
|
2722
2773
|
} else {
|
|
2723
2774
|
return false;
|
|
2724
2775
|
}
|
|
2725
2776
|
}
|
|
2726
2777
|
case 69: {
|
|
2727
|
-
if (
|
|
2778
|
+
if (_x_933.$tag === 69) {
|
|
2728
2779
|
return true;
|
|
2729
2780
|
} else {
|
|
2730
2781
|
return false;
|
|
2731
2782
|
}
|
|
2732
2783
|
}
|
|
2733
2784
|
case 70: {
|
|
2734
|
-
if (
|
|
2785
|
+
if (_x_933.$tag === 70) {
|
|
2735
2786
|
return true;
|
|
2736
2787
|
} else {
|
|
2737
2788
|
return false;
|
|
2738
2789
|
}
|
|
2739
2790
|
}
|
|
2740
2791
|
case 71: {
|
|
2741
|
-
if (
|
|
2792
|
+
if (_x_933.$tag === 71) {
|
|
2742
2793
|
return true;
|
|
2743
2794
|
} else {
|
|
2744
2795
|
return false;
|
|
2745
2796
|
}
|
|
2746
2797
|
}
|
|
2747
2798
|
case 72: {
|
|
2748
|
-
if (
|
|
2799
|
+
if (_x_933.$tag === 72) {
|
|
2749
2800
|
return true;
|
|
2750
2801
|
} else {
|
|
2751
2802
|
return false;
|
|
2752
2803
|
}
|
|
2753
2804
|
}
|
|
2754
2805
|
case 73: {
|
|
2755
|
-
if (
|
|
2806
|
+
if (_x_933.$tag === 73) {
|
|
2756
2807
|
return true;
|
|
2757
2808
|
} else {
|
|
2758
2809
|
return false;
|
|
2759
2810
|
}
|
|
2760
2811
|
}
|
|
2761
2812
|
case 74: {
|
|
2762
|
-
if (
|
|
2813
|
+
if (_x_933.$tag === 74) {
|
|
2763
2814
|
return true;
|
|
2764
2815
|
} else {
|
|
2765
2816
|
return false;
|
|
2766
2817
|
}
|
|
2767
2818
|
}
|
|
2768
2819
|
case 75: {
|
|
2769
|
-
if (
|
|
2820
|
+
if (_x_933.$tag === 75) {
|
|
2770
2821
|
return true;
|
|
2771
2822
|
} else {
|
|
2772
2823
|
return false;
|
|
2773
2824
|
}
|
|
2774
2825
|
}
|
|
2775
2826
|
case 76: {
|
|
2776
|
-
if (
|
|
2827
|
+
if (_x_933.$tag === 76) {
|
|
2777
2828
|
return true;
|
|
2778
2829
|
} else {
|
|
2779
2830
|
return false;
|
|
2780
2831
|
}
|
|
2781
2832
|
}
|
|
2782
2833
|
case 77: {
|
|
2783
|
-
if (
|
|
2834
|
+
if (_x_933.$tag === 77) {
|
|
2784
2835
|
return true;
|
|
2785
2836
|
} else {
|
|
2786
2837
|
return false;
|
|
2787
2838
|
}
|
|
2788
2839
|
}
|
|
2789
2840
|
case 78: {
|
|
2790
|
-
if (
|
|
2841
|
+
if (_x_933.$tag === 78) {
|
|
2791
2842
|
return true;
|
|
2792
2843
|
} else {
|
|
2793
2844
|
return false;
|
|
2794
2845
|
}
|
|
2795
2846
|
}
|
|
2796
2847
|
case 79: {
|
|
2797
|
-
if (
|
|
2848
|
+
if (_x_933.$tag === 79) {
|
|
2798
2849
|
return true;
|
|
2799
2850
|
} else {
|
|
2800
2851
|
return false;
|
|
2801
2852
|
}
|
|
2802
2853
|
}
|
|
2803
2854
|
case 80: {
|
|
2804
|
-
if (
|
|
2855
|
+
if (_x_933.$tag === 80) {
|
|
2805
2856
|
return true;
|
|
2806
2857
|
} else {
|
|
2807
2858
|
return false;
|
|
2808
2859
|
}
|
|
2809
2860
|
}
|
|
2810
2861
|
case 81: {
|
|
2811
|
-
if (
|
|
2862
|
+
if (_x_933.$tag === 81) {
|
|
2812
2863
|
return true;
|
|
2813
2864
|
} else {
|
|
2814
2865
|
return false;
|
|
2815
2866
|
}
|
|
2816
2867
|
}
|
|
2817
2868
|
case 82: {
|
|
2818
|
-
if (
|
|
2869
|
+
if (_x_933.$tag === 82) {
|
|
2819
2870
|
return true;
|
|
2820
2871
|
} else {
|
|
2821
2872
|
return false;
|
|
2822
2873
|
}
|
|
2823
2874
|
}
|
|
2824
2875
|
case 83: {
|
|
2825
|
-
if (
|
|
2876
|
+
if (_x_933.$tag === 83) {
|
|
2826
2877
|
return true;
|
|
2827
2878
|
} else {
|
|
2828
2879
|
return false;
|
|
2829
2880
|
}
|
|
2830
2881
|
}
|
|
2831
2882
|
case 84: {
|
|
2832
|
-
if (
|
|
2883
|
+
if (_x_933.$tag === 84) {
|
|
2833
2884
|
return true;
|
|
2834
2885
|
} else {
|
|
2835
2886
|
return false;
|
|
2836
2887
|
}
|
|
2837
2888
|
}
|
|
2838
2889
|
case 85: {
|
|
2839
|
-
if (
|
|
2890
|
+
if (_x_933.$tag === 85) {
|
|
2840
2891
|
return true;
|
|
2841
2892
|
} else {
|
|
2842
2893
|
return false;
|
|
2843
2894
|
}
|
|
2844
2895
|
}
|
|
2845
2896
|
case 86: {
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
if (_x_833.$tag === 86) {
|
|
2849
|
-
const _Indent$2 = _x_833;
|
|
2850
|
-
const _$42$y0_847 = _Indent$2._0;
|
|
2851
|
-
_x0_846 = _$42$x0_846;
|
|
2852
|
-
_y0_847 = _$42$y0_847;
|
|
2853
|
-
break _L$5;
|
|
2897
|
+
if (_x_933.$tag === 86) {
|
|
2898
|
+
return true;
|
|
2854
2899
|
} else {
|
|
2855
2900
|
return false;
|
|
2856
2901
|
}
|
|
2857
2902
|
}
|
|
2858
2903
|
case 87: {
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
if (_x_833.$tag === 87) {
|
|
2862
|
-
const _InterpStr$2 = _x_833;
|
|
2863
|
-
const _$42$y0_849 = _InterpStr$2._0;
|
|
2864
|
-
_x0_848 = _$42$x0_848;
|
|
2865
|
-
_y0_849 = _$42$y0_849;
|
|
2866
|
-
break _L$4;
|
|
2904
|
+
if (_x_933.$tag === 87) {
|
|
2905
|
+
return true;
|
|
2867
2906
|
} else {
|
|
2868
2907
|
return false;
|
|
2869
2908
|
}
|
|
2870
2909
|
}
|
|
2871
2910
|
case 88: {
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
if (_x_833.$tag === 88) {
|
|
2875
|
-
const _Shebang$2 = _x_833;
|
|
2876
|
-
const _$42$y0_851 = _Shebang$2._0;
|
|
2877
|
-
_x0_850 = _$42$x0_850;
|
|
2878
|
-
_y0_851 = _$42$y0_851;
|
|
2879
|
-
break _L$3;
|
|
2911
|
+
if (_x_933.$tag === 88) {
|
|
2912
|
+
return true;
|
|
2880
2913
|
} else {
|
|
2881
2914
|
return false;
|
|
2882
2915
|
}
|
|
2883
2916
|
}
|
|
2884
2917
|
case 89: {
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
if (_x_833.$tag === 89) {
|
|
2888
|
-
const _Comment$2 = _x_833;
|
|
2889
|
-
const _$42$y0_853 = _Comment$2._0;
|
|
2890
|
-
_x0_852 = _$42$x0_852;
|
|
2891
|
-
_y0_853 = _$42$y0_853;
|
|
2892
|
-
break _L$2;
|
|
2918
|
+
if (_x_933.$tag === 89) {
|
|
2919
|
+
return true;
|
|
2893
2920
|
} else {
|
|
2894
2921
|
return false;
|
|
2895
2922
|
}
|
|
2896
2923
|
}
|
|
2897
2924
|
case 90: {
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2925
|
+
if (_x_933.$tag === 90) {
|
|
2926
|
+
return true;
|
|
2927
|
+
} else {
|
|
2928
|
+
return false;
|
|
2929
|
+
}
|
|
2930
|
+
}
|
|
2931
|
+
case 91: {
|
|
2932
|
+
if (_x_933.$tag === 91) {
|
|
2933
|
+
return true;
|
|
2934
|
+
} else {
|
|
2935
|
+
return false;
|
|
2936
|
+
}
|
|
2937
|
+
}
|
|
2938
|
+
case 92: {
|
|
2939
|
+
if (_x_933.$tag === 92) {
|
|
2940
|
+
return true;
|
|
2941
|
+
} else {
|
|
2942
|
+
return false;
|
|
2943
|
+
}
|
|
2944
|
+
}
|
|
2945
|
+
case 93: {
|
|
2946
|
+
const _Indent = _x_932;
|
|
2947
|
+
const _$42$x0_946 = _Indent._0;
|
|
2948
|
+
if (_x_933.$tag === 93) {
|
|
2949
|
+
const _Indent$2 = _x_933;
|
|
2950
|
+
const _$42$y0_947 = _Indent$2._0;
|
|
2951
|
+
_x0_946 = _$42$x0_946;
|
|
2952
|
+
_y0_947 = _$42$y0_947;
|
|
2953
|
+
break _L$5;
|
|
2954
|
+
} else {
|
|
2955
|
+
return false;
|
|
2956
|
+
}
|
|
2957
|
+
}
|
|
2958
|
+
case 94: {
|
|
2959
|
+
const _InterpStr = _x_932;
|
|
2960
|
+
const _$42$x0_948 = _InterpStr._0;
|
|
2961
|
+
if (_x_933.$tag === 94) {
|
|
2962
|
+
const _InterpStr$2 = _x_933;
|
|
2963
|
+
const _$42$y0_949 = _InterpStr$2._0;
|
|
2964
|
+
_x0_948 = _$42$x0_948;
|
|
2965
|
+
_y0_949 = _$42$y0_949;
|
|
2966
|
+
break _L$4;
|
|
2967
|
+
} else {
|
|
2968
|
+
return false;
|
|
2969
|
+
}
|
|
2970
|
+
}
|
|
2971
|
+
case 95: {
|
|
2972
|
+
const _Shebang = _x_932;
|
|
2973
|
+
const _$42$x0_950 = _Shebang._0;
|
|
2974
|
+
if (_x_933.$tag === 95) {
|
|
2975
|
+
const _Shebang$2 = _x_933;
|
|
2976
|
+
const _$42$y0_951 = _Shebang$2._0;
|
|
2977
|
+
_x0_950 = _$42$x0_950;
|
|
2978
|
+
_y0_951 = _$42$y0_951;
|
|
2979
|
+
break _L$3;
|
|
2980
|
+
} else {
|
|
2981
|
+
return false;
|
|
2982
|
+
}
|
|
2983
|
+
}
|
|
2984
|
+
case 96: {
|
|
2985
|
+
const _Comment = _x_932;
|
|
2986
|
+
const _$42$x0_952 = _Comment._0;
|
|
2987
|
+
if (_x_933.$tag === 96) {
|
|
2988
|
+
const _Comment$2 = _x_933;
|
|
2989
|
+
const _$42$y0_953 = _Comment$2._0;
|
|
2990
|
+
_x0_952 = _$42$x0_952;
|
|
2991
|
+
_y0_953 = _$42$y0_953;
|
|
2992
|
+
break _L$2;
|
|
2993
|
+
} else {
|
|
2994
|
+
return false;
|
|
2995
|
+
}
|
|
2996
|
+
}
|
|
2997
|
+
case 97: {
|
|
2998
|
+
const _BlockComment = _x_932;
|
|
2999
|
+
const _$42$x0_954 = _BlockComment._0;
|
|
3000
|
+
if (_x_933.$tag === 97) {
|
|
3001
|
+
const _BlockComment$2 = _x_933;
|
|
3002
|
+
const _$42$y0_955 = _BlockComment$2._0;
|
|
3003
|
+
_x0_954 = _$42$x0_954;
|
|
3004
|
+
_y0_955 = _$42$y0_955;
|
|
2905
3005
|
break _L;
|
|
2906
3006
|
} else {
|
|
2907
3007
|
return false;
|
|
2908
3008
|
}
|
|
2909
3009
|
}
|
|
2910
3010
|
default: {
|
|
2911
|
-
if (
|
|
3011
|
+
if (_x_933.$tag === 98) {
|
|
2912
3012
|
return true;
|
|
2913
3013
|
} else {
|
|
2914
3014
|
return false;
|
|
@@ -2916,25 +3016,25 @@ function _M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_x_
|
|
|
2916
3016
|
}
|
|
2917
3017
|
}
|
|
2918
3018
|
}
|
|
2919
|
-
return
|
|
3019
|
+
return _x0_934 === _y0_935;
|
|
2920
3020
|
}
|
|
2921
|
-
return
|
|
3021
|
+
return _x0_936 === _y0_937;
|
|
2922
3022
|
}
|
|
2923
|
-
return
|
|
3023
|
+
return _x0_938 === _y0_939;
|
|
2924
3024
|
}
|
|
2925
|
-
return
|
|
3025
|
+
return _x0_940 === _y0_942 && _x1_941 === _y1_943;
|
|
2926
3026
|
}
|
|
2927
|
-
return
|
|
3027
|
+
return _x0_944 === _y0_945;
|
|
2928
3028
|
}
|
|
2929
|
-
return
|
|
3029
|
+
return _x0_946 === _y0_947;
|
|
2930
3030
|
}
|
|
2931
|
-
return _M0IP311moonbitlang4core5array5ArrayP311moonbitlang4core7builtin2Eq5equalGsE(
|
|
3031
|
+
return _M0IP311moonbitlang4core5array5ArrayP311moonbitlang4core7builtin2Eq5equalGsE(_x0_948, _y0_949);
|
|
2932
3032
|
}
|
|
2933
|
-
return
|
|
3033
|
+
return _x0_950 === _y0_951;
|
|
2934
3034
|
}
|
|
2935
|
-
return
|
|
3035
|
+
return _x0_952 === _y0_953;
|
|
2936
3036
|
}
|
|
2937
|
-
return
|
|
3037
|
+
return _x0_954 === _y0_955;
|
|
2938
3038
|
}
|
|
2939
3039
|
function _M0MP28username4core6Parser4peek(self) {
|
|
2940
3040
|
return self.pos >= self.tokens.length ? $64$username$47$core$46$TokenKind$Eof : _M0MP311moonbitlang4core5array5Array2atGRP28username4core5TokenE(self.tokens, self.pos).kind;
|
|
@@ -3003,16 +3103,16 @@ function _M0MP28username4core6Parser17skip__bracket__ws(self) {
|
|
|
3003
3103
|
_L$2: {
|
|
3004
3104
|
const _bind = _M0MP28username4core6Parser4peek(self);
|
|
3005
3105
|
switch (_bind.$tag) {
|
|
3006
|
-
case
|
|
3106
|
+
case 92: {
|
|
3007
3107
|
break _L$2;
|
|
3008
3108
|
}
|
|
3009
|
-
case
|
|
3109
|
+
case 93: {
|
|
3010
3110
|
break _L$2;
|
|
3011
3111
|
}
|
|
3012
|
-
case
|
|
3112
|
+
case 96: {
|
|
3013
3113
|
break _L$2;
|
|
3014
3114
|
}
|
|
3015
|
-
case
|
|
3115
|
+
case 97: {
|
|
3016
3116
|
break _L$2;
|
|
3017
3117
|
}
|
|
3018
3118
|
default: {
|
|
@@ -3034,19 +3134,19 @@ function _M0MP28username4core6Parser21is__computed__bracket(self) {
|
|
|
3034
3134
|
_L: {
|
|
3035
3135
|
const _bind = _M0MP311moonbitlang4core5array5Array2atGRP28username4core5TokenE(self.tokens, i.val).kind;
|
|
3036
3136
|
switch (_bind.$tag) {
|
|
3037
|
-
case
|
|
3137
|
+
case 92: {
|
|
3038
3138
|
break _L;
|
|
3039
3139
|
}
|
|
3040
|
-
case
|
|
3140
|
+
case 93: {
|
|
3041
3141
|
break _L;
|
|
3042
3142
|
}
|
|
3043
|
-
case
|
|
3143
|
+
case 96: {
|
|
3044
3144
|
break _L;
|
|
3045
3145
|
}
|
|
3046
|
-
case
|
|
3146
|
+
case 97: {
|
|
3047
3147
|
break _L;
|
|
3048
3148
|
}
|
|
3049
|
-
case
|
|
3149
|
+
case 90: {
|
|
3050
3150
|
return true;
|
|
3051
3151
|
}
|
|
3052
3152
|
default: {
|
|
@@ -3111,22 +3211,22 @@ function _M0MP28username4core5Lexer25is__neg__literal__context(self) {
|
|
|
3111
3211
|
const last = _M0MP311moonbitlang4core5array5Array2atGRP28username4core5TokenE(self.tokens, self.tokens.length - 1 | 0);
|
|
3112
3212
|
const _bind = last.kind;
|
|
3113
3213
|
switch (_bind.$tag) {
|
|
3114
|
-
case
|
|
3214
|
+
case 83: {
|
|
3115
3215
|
return true;
|
|
3116
3216
|
}
|
|
3117
|
-
case
|
|
3217
|
+
case 85: {
|
|
3118
3218
|
return true;
|
|
3119
3219
|
}
|
|
3120
|
-
case
|
|
3220
|
+
case 86: {
|
|
3121
3221
|
return true;
|
|
3122
3222
|
}
|
|
3123
3223
|
case 10: {
|
|
3124
3224
|
return true;
|
|
3125
3225
|
}
|
|
3126
|
-
case
|
|
3226
|
+
case 92: {
|
|
3127
3227
|
return true;
|
|
3128
3228
|
}
|
|
3129
|
-
case
|
|
3229
|
+
case 93: {
|
|
3130
3230
|
return true;
|
|
3131
3231
|
}
|
|
3132
3232
|
case 29: {
|
|
@@ -3141,7 +3241,7 @@ function _M0MP28username4core5Lexer25is__neg__literal__context(self) {
|
|
|
3141
3241
|
case 27: {
|
|
3142
3242
|
return true;
|
|
3143
3243
|
}
|
|
3144
|
-
case
|
|
3244
|
+
case 90: {
|
|
3145
3245
|
return true;
|
|
3146
3246
|
}
|
|
3147
3247
|
default: {
|
|
@@ -3479,6 +3579,34 @@ function _M0MP28username4core5Lexer11scan__ident(self) {
|
|
|
3479
3579
|
kind = $64$username$47$core$46$TokenKind$Object_;
|
|
3480
3580
|
break;
|
|
3481
3581
|
}
|
|
3582
|
+
case "class": {
|
|
3583
|
+
kind = $64$username$47$core$46$TokenKind$Class_;
|
|
3584
|
+
break;
|
|
3585
|
+
}
|
|
3586
|
+
case "extends": {
|
|
3587
|
+
kind = $64$username$47$core$46$TokenKind$Extends_;
|
|
3588
|
+
break;
|
|
3589
|
+
}
|
|
3590
|
+
case "super": {
|
|
3591
|
+
kind = $64$username$47$core$46$TokenKind$Super_;
|
|
3592
|
+
break;
|
|
3593
|
+
}
|
|
3594
|
+
case "static": {
|
|
3595
|
+
kind = $64$username$47$core$46$TokenKind$Static_;
|
|
3596
|
+
break;
|
|
3597
|
+
}
|
|
3598
|
+
case "private": {
|
|
3599
|
+
kind = $64$username$47$core$46$TokenKind$Private_;
|
|
3600
|
+
break;
|
|
3601
|
+
}
|
|
3602
|
+
case "get": {
|
|
3603
|
+
kind = $64$username$47$core$46$TokenKind$Get_;
|
|
3604
|
+
break;
|
|
3605
|
+
}
|
|
3606
|
+
case "set": {
|
|
3607
|
+
kind = $64$username$47$core$46$TokenKind$Set_;
|
|
3608
|
+
break;
|
|
3609
|
+
}
|
|
3482
3610
|
default: {
|
|
3483
3611
|
kind = new $64$username$47$core$46$TokenKind$Ident(word);
|
|
3484
3612
|
}
|
|
@@ -3925,13 +4053,13 @@ function _M0MP28username4core6Parser18parse__param__list(self) {
|
|
|
3925
4053
|
_L$3: {
|
|
3926
4054
|
const _bind = _M0MP28username4core6Parser4peek(self);
|
|
3927
4055
|
switch (_bind.$tag) {
|
|
3928
|
-
case
|
|
4056
|
+
case 86: {
|
|
3929
4057
|
break _L$3;
|
|
3930
4058
|
}
|
|
3931
|
-
case
|
|
4059
|
+
case 92: {
|
|
3932
4060
|
break _L$3;
|
|
3933
4061
|
}
|
|
3934
|
-
case
|
|
4062
|
+
case 98: {
|
|
3935
4063
|
break _L$3;
|
|
3936
4064
|
}
|
|
3937
4065
|
case 30: {
|
|
@@ -3979,16 +4107,16 @@ function _M0MP28username4core6Parser27skip__newlines__and__indent(self) {
|
|
|
3979
4107
|
_L$4: {
|
|
3980
4108
|
const _bind = _M0MP28username4core6Parser4peek(self);
|
|
3981
4109
|
switch (_bind.$tag) {
|
|
3982
|
-
case
|
|
4110
|
+
case 92: {
|
|
3983
4111
|
break _L$4;
|
|
3984
4112
|
}
|
|
3985
|
-
case
|
|
4113
|
+
case 96: {
|
|
3986
4114
|
break _L$4;
|
|
3987
4115
|
}
|
|
3988
|
-
case
|
|
4116
|
+
case 97: {
|
|
3989
4117
|
break _L$4;
|
|
3990
4118
|
}
|
|
3991
|
-
case
|
|
4119
|
+
case 93: {
|
|
3992
4120
|
const _Indent = _bind;
|
|
3993
4121
|
const _n = _Indent._0;
|
|
3994
4122
|
n = _n;
|
|
@@ -4022,10 +4150,10 @@ function _M0MP28username4core6Parser22skip__type__annotation(self) {
|
|
|
4022
4150
|
case 10: {
|
|
4023
4151
|
break _L$2;
|
|
4024
4152
|
}
|
|
4025
|
-
case
|
|
4153
|
+
case 92: {
|
|
4026
4154
|
break _L$2;
|
|
4027
4155
|
}
|
|
4028
|
-
case
|
|
4156
|
+
case 98: {
|
|
4029
4157
|
break _L$2;
|
|
4030
4158
|
}
|
|
4031
4159
|
default: {
|
|
@@ -4139,7 +4267,7 @@ function _M0MP28username4core6Parser21parse__bracket__names(self) {
|
|
|
4139
4267
|
s = _s;
|
|
4140
4268
|
break _L$2;
|
|
4141
4269
|
}
|
|
4142
|
-
case
|
|
4270
|
+
case 85: {
|
|
4143
4271
|
self.pos = self.pos + 1 | 0;
|
|
4144
4272
|
break;
|
|
4145
4273
|
}
|
|
@@ -4254,10 +4382,10 @@ function _M0MP28username4core6Parser21parse__match__pattern(self) {
|
|
|
4254
4382
|
self.pos = self.pos + 1 | 0;
|
|
4255
4383
|
return new $64$username$47$core$46$MatchPattern$LitPat(new $64$username$47$core$46$Expr$BoolLit(false));
|
|
4256
4384
|
}
|
|
4257
|
-
case
|
|
4385
|
+
case 78: {
|
|
4258
4386
|
break _L$2;
|
|
4259
4387
|
}
|
|
4260
|
-
case
|
|
4388
|
+
case 79: {
|
|
4261
4389
|
break _L$2;
|
|
4262
4390
|
}
|
|
4263
4391
|
case 6: {
|
|
@@ -4615,7 +4743,7 @@ function _M0MP28username4core6Parser14parse__postfix(self) {
|
|
|
4615
4743
|
if (self.pos < self.tokens.length) {
|
|
4616
4744
|
const _bind = _M0MP28username4core6Parser4peek(self);
|
|
4617
4745
|
switch (_bind.$tag) {
|
|
4618
|
-
case
|
|
4746
|
+
case 87: {
|
|
4619
4747
|
self.pos = self.pos + 1 | 0;
|
|
4620
4748
|
const field = _M0MP28username4core6Parser18parse__ident__name(self);
|
|
4621
4749
|
if (_M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_M0MP28username4core6Parser4peek(self), $64$username$47$core$46$TokenKind$LBracket)) {
|
|
@@ -4627,7 +4755,7 @@ function _M0MP28username4core6Parser14parse__postfix(self) {
|
|
|
4627
4755
|
const start_expr = _M0MP28username4core6Parser11parse__expr(self);
|
|
4628
4756
|
const _bind$2 = _M0MP28username4core6Parser4peek(self);
|
|
4629
4757
|
switch (_bind$2.$tag) {
|
|
4630
|
-
case
|
|
4758
|
+
case 88: {
|
|
4631
4759
|
self.pos = self.pos + 1 | 0;
|
|
4632
4760
|
const end_expr = _M0MP28username4core6Parser11parse__expr(self);
|
|
4633
4761
|
if (_M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_M0MP28username4core6Parser4peek(self), $64$username$47$core$46$TokenKind$RBracket)) {
|
|
@@ -4636,7 +4764,7 @@ function _M0MP28username4core6Parser14parse__postfix(self) {
|
|
|
4636
4764
|
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);
|
|
4637
4765
|
break;
|
|
4638
4766
|
}
|
|
4639
|
-
case
|
|
4767
|
+
case 89: {
|
|
4640
4768
|
self.pos = self.pos + 1 | 0;
|
|
4641
4769
|
const end_expr$2 = _M0MP28username4core6Parser11parse__expr(self);
|
|
4642
4770
|
if (_M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_M0MP28username4core6Parser4peek(self), $64$username$47$core$46$TokenKind$RBracket)) {
|
|
@@ -4661,7 +4789,7 @@ function _M0MP28username4core6Parser14parse__postfix(self) {
|
|
|
4661
4789
|
}
|
|
4662
4790
|
break;
|
|
4663
4791
|
}
|
|
4664
|
-
case
|
|
4792
|
+
case 91: {
|
|
4665
4793
|
self.pos = self.pos + 1 | 0;
|
|
4666
4794
|
const field$2 = _M0MP28username4core6Parser18parse__ident__name(self);
|
|
4667
4795
|
if (_M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_M0MP28username4core6Parser4peek(self), $64$username$47$core$46$TokenKind$LBracket)) {
|
|
@@ -4684,7 +4812,7 @@ function _M0MP28username4core6Parser14parse__postfix(self) {
|
|
|
4684
4812
|
}
|
|
4685
4813
|
break;
|
|
4686
4814
|
}
|
|
4687
|
-
case
|
|
4815
|
+
case 83: {
|
|
4688
4816
|
if (_M0MP28username4core6Parser21is__computed__bracket(self)) {
|
|
4689
4817
|
self.pos = self.pos + 1 | 0;
|
|
4690
4818
|
_M0MP28username4core6Parser17skip__bracket__ws(self);
|
|
@@ -4693,7 +4821,7 @@ function _M0MP28username4core6Parser14parse__postfix(self) {
|
|
|
4693
4821
|
const key_expr = _M0MP28username4core6Parser11parse__expr(self);
|
|
4694
4822
|
const _bind$2 = _M0MP28username4core6Parser4peek(self);
|
|
4695
4823
|
switch (_bind$2.$tag) {
|
|
4696
|
-
case
|
|
4824
|
+
case 88: {
|
|
4697
4825
|
self.pos = self.pos + 1 | 0;
|
|
4698
4826
|
const end_expr = _M0MP28username4core6Parser11parse__expr(self);
|
|
4699
4827
|
if (_M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_M0MP28username4core6Parser4peek(self), $64$username$47$core$46$TokenKind$RBracket)) {
|
|
@@ -4702,7 +4830,7 @@ function _M0MP28username4core6Parser14parse__postfix(self) {
|
|
|
4702
4830
|
expr.val = new $64$username$47$core$46$Expr$Slice(expr.val, key_expr, end_expr, true);
|
|
4703
4831
|
break;
|
|
4704
4832
|
}
|
|
4705
|
-
case
|
|
4833
|
+
case 89: {
|
|
4706
4834
|
self.pos = self.pos + 1 | 0;
|
|
4707
4835
|
const end_expr$2 = _M0MP28username4core6Parser11parse__expr(self);
|
|
4708
4836
|
if (_M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_M0MP28username4core6Parser4peek(self), $64$username$47$core$46$TokenKind$RBracket)) {
|
|
@@ -4776,7 +4904,7 @@ function _M0MP28username4core6Parser14parse__primary(self) {
|
|
|
4776
4904
|
s$2 = _s;
|
|
4777
4905
|
break _L$5;
|
|
4778
4906
|
}
|
|
4779
|
-
case
|
|
4907
|
+
case 94: {
|
|
4780
4908
|
const _InterpStr = _bind;
|
|
4781
4909
|
const _segments = _InterpStr._0;
|
|
4782
4910
|
segments = _segments;
|
|
@@ -4798,13 +4926,13 @@ function _M0MP28username4core6Parser14parse__primary(self) {
|
|
|
4798
4926
|
self.pos = self.pos + 1 | 0;
|
|
4799
4927
|
return new $64$username$47$core$46$Expr$BoolLit(false);
|
|
4800
4928
|
}
|
|
4801
|
-
case
|
|
4929
|
+
case 78: {
|
|
4802
4930
|
break _L$2;
|
|
4803
4931
|
}
|
|
4804
|
-
case
|
|
4932
|
+
case 79: {
|
|
4805
4933
|
break _L$2;
|
|
4806
4934
|
}
|
|
4807
|
-
case
|
|
4935
|
+
case 80: {
|
|
4808
4936
|
self.pos = self.pos + 1 | 0;
|
|
4809
4937
|
return $64$username$47$core$46$Expr$UndefinedLit;
|
|
4810
4938
|
}
|
|
@@ -4812,21 +4940,25 @@ function _M0MP28username4core6Parser14parse__primary(self) {
|
|
|
4812
4940
|
self.pos = self.pos + 1 | 0;
|
|
4813
4941
|
return $64$username$47$core$46$Expr$ThisExpr;
|
|
4814
4942
|
}
|
|
4943
|
+
case 73: {
|
|
4944
|
+
self.pos = self.pos + 1 | 0;
|
|
4945
|
+
return $64$username$47$core$46$Expr$SuperExpr;
|
|
4946
|
+
}
|
|
4815
4947
|
case 6: {
|
|
4816
4948
|
const _Ident = _bind;
|
|
4817
4949
|
const _s$2 = _Ident._0;
|
|
4818
4950
|
s = _s$2;
|
|
4819
4951
|
break _L;
|
|
4820
4952
|
}
|
|
4821
|
-
case
|
|
4953
|
+
case 81: {
|
|
4822
4954
|
self.pos = self.pos + 1 | 0;
|
|
4823
4955
|
return _M0MP28username4core6Parser20parse__list__literal(self);
|
|
4824
4956
|
}
|
|
4825
|
-
case
|
|
4957
|
+
case 82: {
|
|
4826
4958
|
self.pos = self.pos + 1 | 0;
|
|
4827
4959
|
return _M0MP28username4core6Parser22parse__object__literal(self);
|
|
4828
4960
|
}
|
|
4829
|
-
case
|
|
4961
|
+
case 83: {
|
|
4830
4962
|
return _M0MP28username4core6Parser20parse__bracket__expr(self);
|
|
4831
4963
|
}
|
|
4832
4964
|
case 28: {
|
|
@@ -5007,13 +5139,13 @@ function _M0MP28username4core6Parser11parse__stmt(self) {
|
|
|
5007
5139
|
_L$2: {
|
|
5008
5140
|
const _bind = _M0MP28username4core6Parser4peek(self);
|
|
5009
5141
|
switch (_bind.$tag) {
|
|
5010
|
-
case
|
|
5142
|
+
case 96: {
|
|
5011
5143
|
break _L$2;
|
|
5012
5144
|
}
|
|
5013
|
-
case
|
|
5145
|
+
case 97: {
|
|
5014
5146
|
break _L$2;
|
|
5015
5147
|
}
|
|
5016
|
-
case
|
|
5148
|
+
case 93: {
|
|
5017
5149
|
self.pos = self.pos + 1 | 0;
|
|
5018
5150
|
break;
|
|
5019
5151
|
}
|
|
@@ -5064,13 +5196,13 @@ function _M0MP28username4core6Parser11parse__stmt(self) {
|
|
|
5064
5196
|
_L$2: {
|
|
5065
5197
|
const _bind$2 = _M0MP28username4core6Parser4peek(self);
|
|
5066
5198
|
switch (_bind$2.$tag) {
|
|
5067
|
-
case
|
|
5199
|
+
case 92: {
|
|
5068
5200
|
break _L$2;
|
|
5069
5201
|
}
|
|
5070
|
-
case
|
|
5202
|
+
case 98: {
|
|
5071
5203
|
break _L$2;
|
|
5072
5204
|
}
|
|
5073
|
-
case
|
|
5205
|
+
case 93: {
|
|
5074
5206
|
break _L$2;
|
|
5075
5207
|
}
|
|
5076
5208
|
default: {
|
|
@@ -5134,6 +5266,9 @@ function _M0MP28username4core6Parser11parse__stmt(self) {
|
|
|
5134
5266
|
case 70: {
|
|
5135
5267
|
return _M0MP28username4core6Parser17parse__type__decl(self);
|
|
5136
5268
|
}
|
|
5269
|
+
case 71: {
|
|
5270
|
+
return _M0MP28username4core6Parser18parse__class__decl(self);
|
|
5271
|
+
}
|
|
5137
5272
|
default: {
|
|
5138
5273
|
const expr$2 = _M0MP28username4core6Parser11parse__expr(self);
|
|
5139
5274
|
if (_M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_M0MP28username4core6Parser4peek(self), $64$username$47$core$46$TokenKind$Be)) {
|
|
@@ -5171,6 +5306,223 @@ function _M0MP28username4core6Parser14maybe__postfix(self, stmt) {
|
|
|
5171
5306
|
}
|
|
5172
5307
|
}
|
|
5173
5308
|
}
|
|
5309
|
+
function _M0MP28username4core6Parser18parse__class__decl(self) {
|
|
5310
|
+
self.pos = self.pos + 1 | 0;
|
|
5311
|
+
const name = _M0MP28username4core6Parser18parse__ident__name(self);
|
|
5312
|
+
let parent;
|
|
5313
|
+
if (_M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_M0MP28username4core6Parser4peek(self), $64$username$47$core$46$TokenKind$Extends_)) {
|
|
5314
|
+
self.pos = self.pos + 1 | 0;
|
|
5315
|
+
parent = _M0MP28username4core6Parser18parse__ident__name(self);
|
|
5316
|
+
} else {
|
|
5317
|
+
parent = undefined;
|
|
5318
|
+
}
|
|
5319
|
+
const indent = _M0MP28username4core6Parser27skip__newlines__and__indent(self);
|
|
5320
|
+
const members = [];
|
|
5321
|
+
let m;
|
|
5322
|
+
_L: {
|
|
5323
|
+
_L$2: {
|
|
5324
|
+
const _bind = _M0MP28username4core6Parser20parse__class__member(self);
|
|
5325
|
+
if (_bind === undefined) {
|
|
5326
|
+
} else {
|
|
5327
|
+
const _Some = _bind;
|
|
5328
|
+
const _m = _Some;
|
|
5329
|
+
m = _m;
|
|
5330
|
+
break _L$2;
|
|
5331
|
+
}
|
|
5332
|
+
break _L;
|
|
5333
|
+
}
|
|
5334
|
+
_M0MP311moonbitlang4core5array5Array4pushGRP28username4core11ClassMemberE(members, m);
|
|
5335
|
+
}
|
|
5336
|
+
while (true) {
|
|
5337
|
+
if (self.pos < self.tokens.length && _M0IP016_24default__implP311moonbitlang4core7builtin2Eq10not__equalGRP28username4core9TokenKindE(_M0MP28username4core6Parser4peek(self), $64$username$47$core$46$TokenKind$Eof)) {
|
|
5338
|
+
const saved2 = self.pos;
|
|
5339
|
+
const next_indent = _M0MP28username4core6Parser27skip__newlines__and__indent(self);
|
|
5340
|
+
if (next_indent < indent) {
|
|
5341
|
+
self.pos = saved2;
|
|
5342
|
+
break;
|
|
5343
|
+
}
|
|
5344
|
+
let m$2;
|
|
5345
|
+
_L$2: {
|
|
5346
|
+
_L$3: {
|
|
5347
|
+
const _bind = _M0MP28username4core6Parser20parse__class__member(self);
|
|
5348
|
+
if (_bind === undefined) {
|
|
5349
|
+
self.pos = self.pos + 1 | 0;
|
|
5350
|
+
} else {
|
|
5351
|
+
const _Some = _bind;
|
|
5352
|
+
const _m = _Some;
|
|
5353
|
+
m$2 = _m;
|
|
5354
|
+
break _L$3;
|
|
5355
|
+
}
|
|
5356
|
+
break _L$2;
|
|
5357
|
+
}
|
|
5358
|
+
_M0MP311moonbitlang4core5array5Array4pushGRP28username4core11ClassMemberE(members, m$2);
|
|
5359
|
+
}
|
|
5360
|
+
continue;
|
|
5361
|
+
} else {
|
|
5362
|
+
break;
|
|
5363
|
+
}
|
|
5364
|
+
}
|
|
5365
|
+
return new $64$username$47$core$46$Stmt$ClassDecl({ name: name, parent: parent, members: members });
|
|
5366
|
+
}
|
|
5367
|
+
function _M0MP28username4core6Parser20parse__class__member(self) {
|
|
5368
|
+
const _bind = _M0MP28username4core6Parser4peek(self);
|
|
5369
|
+
switch (_bind.$tag) {
|
|
5370
|
+
case 75: {
|
|
5371
|
+
self.pos = self.pos + 1 | 0;
|
|
5372
|
+
const field_name = _M0MP28username4core6Parser18parse__ident__name(self);
|
|
5373
|
+
let default_val;
|
|
5374
|
+
if (_M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_M0MP28username4core6Parser4peek(self), $64$username$47$core$46$TokenKind$Be)) {
|
|
5375
|
+
self.pos = self.pos + 1 | 0;
|
|
5376
|
+
default_val = _M0MP28username4core6Parser11parse__expr(self);
|
|
5377
|
+
} else {
|
|
5378
|
+
default_val = undefined;
|
|
5379
|
+
}
|
|
5380
|
+
return new $64$username$47$core$46$ClassMember$Field(true, field_name, default_val);
|
|
5381
|
+
}
|
|
5382
|
+
case 74: {
|
|
5383
|
+
self.pos = self.pos + 1 | 0;
|
|
5384
|
+
if (_M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_M0MP28username4core6Parser4peek(self), $64$username$47$core$46$TokenKind$Fn)) {
|
|
5385
|
+
self.pos = self.pos + 1 | 0;
|
|
5386
|
+
const meth_name = _M0MP28username4core6Parser18parse__ident__name(self);
|
|
5387
|
+
const params = _M0MP28username4core6Parser18parse__param__list(self);
|
|
5388
|
+
if (_M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_M0MP28username4core6Parser4peek(self), $64$username$47$core$46$TokenKind$Gives)) {
|
|
5389
|
+
self.pos = self.pos + 1 | 0;
|
|
5390
|
+
_M0MP28username4core6Parser22skip__type__annotation(self);
|
|
5391
|
+
}
|
|
5392
|
+
let body;
|
|
5393
|
+
if (_M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_M0MP28username4core6Parser4peek(self), $64$username$47$core$46$TokenKind$To)) {
|
|
5394
|
+
self.pos = self.pos + 1 | 0;
|
|
5395
|
+
body = new $64$username$47$core$46$FnBody$ToExpr(_M0MP28username4core6Parser11parse__expr(self));
|
|
5396
|
+
} else {
|
|
5397
|
+
const indent = _M0MP28username4core6Parser27skip__newlines__and__indent(self);
|
|
5398
|
+
body = new $64$username$47$core$46$FnBody$Block(_M0MP28username4core6Parser12parse__block(self, indent));
|
|
5399
|
+
}
|
|
5400
|
+
return new $64$username$47$core$46$ClassMember$Method(true, false, meth_name, params, body);
|
|
5401
|
+
} else {
|
|
5402
|
+
if (_M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_M0MP28username4core6Parser4peek(self), $64$username$47$core$46$TokenKind$Async_)) {
|
|
5403
|
+
self.pos = self.pos + 1 | 0;
|
|
5404
|
+
if (_M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_M0MP28username4core6Parser4peek(self), $64$username$47$core$46$TokenKind$Fn)) {
|
|
5405
|
+
self.pos = self.pos + 1 | 0;
|
|
5406
|
+
const meth_name = _M0MP28username4core6Parser18parse__ident__name(self);
|
|
5407
|
+
const params = _M0MP28username4core6Parser18parse__param__list(self);
|
|
5408
|
+
if (_M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_M0MP28username4core6Parser4peek(self), $64$username$47$core$46$TokenKind$Gives)) {
|
|
5409
|
+
self.pos = self.pos + 1 | 0;
|
|
5410
|
+
_M0MP28username4core6Parser22skip__type__annotation(self);
|
|
5411
|
+
}
|
|
5412
|
+
let body;
|
|
5413
|
+
if (_M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_M0MP28username4core6Parser4peek(self), $64$username$47$core$46$TokenKind$To)) {
|
|
5414
|
+
self.pos = self.pos + 1 | 0;
|
|
5415
|
+
body = new $64$username$47$core$46$FnBody$ToExpr(_M0MP28username4core6Parser11parse__expr(self));
|
|
5416
|
+
} else {
|
|
5417
|
+
const indent = _M0MP28username4core6Parser27skip__newlines__and__indent(self);
|
|
5418
|
+
body = new $64$username$47$core$46$FnBody$Block(_M0MP28username4core6Parser12parse__block(self, indent));
|
|
5419
|
+
}
|
|
5420
|
+
return new $64$username$47$core$46$ClassMember$Method(true, true, meth_name, params, body);
|
|
5421
|
+
} else {
|
|
5422
|
+
return undefined;
|
|
5423
|
+
}
|
|
5424
|
+
} else {
|
|
5425
|
+
return undefined;
|
|
5426
|
+
}
|
|
5427
|
+
}
|
|
5428
|
+
}
|
|
5429
|
+
case 76: {
|
|
5430
|
+
self.pos = self.pos + 1 | 0;
|
|
5431
|
+
if (_M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_M0MP28username4core6Parser4peek(self), $64$username$47$core$46$TokenKind$Fn)) {
|
|
5432
|
+
self.pos = self.pos + 1 | 0;
|
|
5433
|
+
const getter_name = _M0MP28username4core6Parser18parse__ident__name(self);
|
|
5434
|
+
let body;
|
|
5435
|
+
if (_M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_M0MP28username4core6Parser4peek(self), $64$username$47$core$46$TokenKind$To)) {
|
|
5436
|
+
self.pos = self.pos + 1 | 0;
|
|
5437
|
+
body = new $64$username$47$core$46$FnBody$ToExpr(_M0MP28username4core6Parser11parse__expr(self));
|
|
5438
|
+
} else {
|
|
5439
|
+
const indent = _M0MP28username4core6Parser27skip__newlines__and__indent(self);
|
|
5440
|
+
body = new $64$username$47$core$46$FnBody$Block(_M0MP28username4core6Parser12parse__block(self, indent));
|
|
5441
|
+
}
|
|
5442
|
+
return new $64$username$47$core$46$ClassMember$Getter(getter_name, body);
|
|
5443
|
+
} else {
|
|
5444
|
+
return undefined;
|
|
5445
|
+
}
|
|
5446
|
+
}
|
|
5447
|
+
case 77: {
|
|
5448
|
+
self.pos = self.pos + 1 | 0;
|
|
5449
|
+
if (_M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_M0MP28username4core6Parser4peek(self), $64$username$47$core$46$TokenKind$Fn)) {
|
|
5450
|
+
self.pos = self.pos + 1 | 0;
|
|
5451
|
+
const setter_name = _M0MP28username4core6Parser18parse__ident__name(self);
|
|
5452
|
+
const param = _M0MP28username4core6Parser18parse__ident__name(self);
|
|
5453
|
+
let body;
|
|
5454
|
+
if (_M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_M0MP28username4core6Parser4peek(self), $64$username$47$core$46$TokenKind$To)) {
|
|
5455
|
+
self.pos = self.pos + 1 | 0;
|
|
5456
|
+
body = new $64$username$47$core$46$FnBody$ToExpr(_M0MP28username4core6Parser11parse__expr(self));
|
|
5457
|
+
} else {
|
|
5458
|
+
const indent = _M0MP28username4core6Parser27skip__newlines__and__indent(self);
|
|
5459
|
+
body = new $64$username$47$core$46$FnBody$Block(_M0MP28username4core6Parser12parse__block(self, indent));
|
|
5460
|
+
}
|
|
5461
|
+
return new $64$username$47$core$46$ClassMember$Setter(setter_name, param, body);
|
|
5462
|
+
} else {
|
|
5463
|
+
return undefined;
|
|
5464
|
+
}
|
|
5465
|
+
}
|
|
5466
|
+
case 28: {
|
|
5467
|
+
self.pos = self.pos + 1 | 0;
|
|
5468
|
+
if (_M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_M0MP28username4core6Parser4peek(self), $64$username$47$core$46$TokenKind$New_)) {
|
|
5469
|
+
self.pos = self.pos + 1 | 0;
|
|
5470
|
+
const params = _M0MP28username4core6Parser18parse__param__list(self);
|
|
5471
|
+
let body;
|
|
5472
|
+
if (_M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_M0MP28username4core6Parser4peek(self), $64$username$47$core$46$TokenKind$To)) {
|
|
5473
|
+
self.pos = self.pos + 1 | 0;
|
|
5474
|
+
body = new $64$username$47$core$46$FnBody$ToExpr(_M0MP28username4core6Parser11parse__expr(self));
|
|
5475
|
+
} else {
|
|
5476
|
+
const indent = _M0MP28username4core6Parser27skip__newlines__and__indent(self);
|
|
5477
|
+
body = new $64$username$47$core$46$FnBody$Block(_M0MP28username4core6Parser12parse__block(self, indent));
|
|
5478
|
+
}
|
|
5479
|
+
return new $64$username$47$core$46$ClassMember$Constructor(params, body);
|
|
5480
|
+
} else {
|
|
5481
|
+
const meth_name = _M0MP28username4core6Parser18parse__ident__name(self);
|
|
5482
|
+
const params = _M0MP28username4core6Parser18parse__param__list(self);
|
|
5483
|
+
if (_M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_M0MP28username4core6Parser4peek(self), $64$username$47$core$46$TokenKind$Gives)) {
|
|
5484
|
+
self.pos = self.pos + 1 | 0;
|
|
5485
|
+
_M0MP28username4core6Parser22skip__type__annotation(self);
|
|
5486
|
+
}
|
|
5487
|
+
let body;
|
|
5488
|
+
if (_M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_M0MP28username4core6Parser4peek(self), $64$username$47$core$46$TokenKind$To)) {
|
|
5489
|
+
self.pos = self.pos + 1 | 0;
|
|
5490
|
+
body = new $64$username$47$core$46$FnBody$ToExpr(_M0MP28username4core6Parser11parse__expr(self));
|
|
5491
|
+
} else {
|
|
5492
|
+
const indent = _M0MP28username4core6Parser27skip__newlines__and__indent(self);
|
|
5493
|
+
body = new $64$username$47$core$46$FnBody$Block(_M0MP28username4core6Parser12parse__block(self, indent));
|
|
5494
|
+
}
|
|
5495
|
+
return new $64$username$47$core$46$ClassMember$Method(false, false, meth_name, params, body);
|
|
5496
|
+
}
|
|
5497
|
+
}
|
|
5498
|
+
case 55: {
|
|
5499
|
+
self.pos = self.pos + 1 | 0;
|
|
5500
|
+
if (_M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_M0MP28username4core6Parser4peek(self), $64$username$47$core$46$TokenKind$Fn)) {
|
|
5501
|
+
self.pos = self.pos + 1 | 0;
|
|
5502
|
+
const meth_name = _M0MP28username4core6Parser18parse__ident__name(self);
|
|
5503
|
+
const params = _M0MP28username4core6Parser18parse__param__list(self);
|
|
5504
|
+
if (_M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_M0MP28username4core6Parser4peek(self), $64$username$47$core$46$TokenKind$Gives)) {
|
|
5505
|
+
self.pos = self.pos + 1 | 0;
|
|
5506
|
+
_M0MP28username4core6Parser22skip__type__annotation(self);
|
|
5507
|
+
}
|
|
5508
|
+
let body;
|
|
5509
|
+
if (_M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_M0MP28username4core6Parser4peek(self), $64$username$47$core$46$TokenKind$To)) {
|
|
5510
|
+
self.pos = self.pos + 1 | 0;
|
|
5511
|
+
body = new $64$username$47$core$46$FnBody$ToExpr(_M0MP28username4core6Parser11parse__expr(self));
|
|
5512
|
+
} else {
|
|
5513
|
+
const indent = _M0MP28username4core6Parser27skip__newlines__and__indent(self);
|
|
5514
|
+
body = new $64$username$47$core$46$FnBody$Block(_M0MP28username4core6Parser12parse__block(self, indent));
|
|
5515
|
+
}
|
|
5516
|
+
return new $64$username$47$core$46$ClassMember$Method(false, true, meth_name, params, body);
|
|
5517
|
+
} else {
|
|
5518
|
+
return undefined;
|
|
5519
|
+
}
|
|
5520
|
+
}
|
|
5521
|
+
default: {
|
|
5522
|
+
return undefined;
|
|
5523
|
+
}
|
|
5524
|
+
}
|
|
5525
|
+
}
|
|
5174
5526
|
function _M0MP28username4core6Parser19parse__export__stmt(self) {
|
|
5175
5527
|
self.pos = self.pos + 1 | 0;
|
|
5176
5528
|
if (_M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_M0MP28username4core6Parser4peek(self), $64$username$47$core$46$TokenKind$Default_)) {
|
|
@@ -5559,7 +5911,7 @@ function _M0MP28username4core6Parser20parse__bracket__expr(self) {
|
|
|
5559
5911
|
_M0MP28username4core6Parser17skip__bracket__ws(self);
|
|
5560
5912
|
const _bind = _M0MP28username4core6Parser4peek(self);
|
|
5561
5913
|
switch (_bind.$tag) {
|
|
5562
|
-
case
|
|
5914
|
+
case 88: {
|
|
5563
5915
|
self.pos = self.pos + 1 | 0;
|
|
5564
5916
|
const end_expr = _M0MP28username4core6Parser11parse__expr(self);
|
|
5565
5917
|
_M0MP28username4core6Parser17skip__bracket__ws(self);
|
|
@@ -5568,7 +5920,7 @@ function _M0MP28username4core6Parser20parse__bracket__expr(self) {
|
|
|
5568
5920
|
}
|
|
5569
5921
|
return new $64$username$47$core$46$Expr$RangeArray(first, end_expr, true);
|
|
5570
5922
|
}
|
|
5571
|
-
case
|
|
5923
|
+
case 89: {
|
|
5572
5924
|
self.pos = self.pos + 1 | 0;
|
|
5573
5925
|
const end_expr$2 = _M0MP28username4core6Parser11parse__expr(self);
|
|
5574
5926
|
_M0MP28username4core6Parser17skip__bracket__ws(self);
|
|
@@ -5622,7 +5974,7 @@ function _M0MP28username4core6Parser20parse__bracket__expr(self) {
|
|
|
5622
5974
|
}
|
|
5623
5975
|
return new $64$username$47$core$46$Expr$ObjectLit(pairs);
|
|
5624
5976
|
}
|
|
5625
|
-
case
|
|
5977
|
+
case 85: {
|
|
5626
5978
|
const elements = [first];
|
|
5627
5979
|
while (true) {
|
|
5628
5980
|
if (_M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_M0MP28username4core6Parser4peek(self), $64$username$47$core$46$TokenKind$Comma)) {
|
|
@@ -5643,7 +5995,7 @@ function _M0MP28username4core6Parser20parse__bracket__expr(self) {
|
|
|
5643
5995
|
}
|
|
5644
5996
|
return new $64$username$47$core$46$Expr$ArrayLit(elements);
|
|
5645
5997
|
}
|
|
5646
|
-
case
|
|
5998
|
+
case 86: {
|
|
5647
5999
|
const elements$2 = [first];
|
|
5648
6000
|
while (true) {
|
|
5649
6001
|
if (_M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_M0MP28username4core6Parser4peek(self), $64$username$47$core$46$TokenKind$Semicolon)) {
|
|
@@ -5664,7 +6016,7 @@ function _M0MP28username4core6Parser20parse__bracket__expr(self) {
|
|
|
5664
6016
|
}
|
|
5665
6017
|
return new $64$username$47$core$46$Expr$ArrayLit(elements$2);
|
|
5666
6018
|
}
|
|
5667
|
-
case
|
|
6019
|
+
case 84: {
|
|
5668
6020
|
self.pos = self.pos + 1 | 0;
|
|
5669
6021
|
return first;
|
|
5670
6022
|
}
|
|
@@ -6471,6 +6823,10 @@ function _M0MP28username4core9JsCodegen9gen__expr(self, expr) {
|
|
|
6471
6823
|
return;
|
|
6472
6824
|
}
|
|
6473
6825
|
case 34: {
|
|
6826
|
+
_M0MP28username4core9JsCodegen5write(self$2, "super");
|
|
6827
|
+
return;
|
|
6828
|
+
}
|
|
6829
|
+
case 35: {
|
|
6474
6830
|
const _OptDotAccess = expr$2;
|
|
6475
6831
|
const _obj$5 = _OptDotAccess._0;
|
|
6476
6832
|
const _field$2 = _OptDotAccess._1;
|
|
@@ -6478,7 +6834,7 @@ function _M0MP28username4core9JsCodegen9gen__expr(self, expr) {
|
|
|
6478
6834
|
field = _field$2;
|
|
6479
6835
|
break _L$6;
|
|
6480
6836
|
}
|
|
6481
|
-
case
|
|
6837
|
+
case 36: {
|
|
6482
6838
|
const _OptMethodCall = expr$2;
|
|
6483
6839
|
const _obj$6 = _OptMethodCall._0;
|
|
6484
6840
|
const _meth_name$2 = _OptMethodCall._1;
|
|
@@ -6488,7 +6844,7 @@ function _M0MP28username4core9JsCodegen9gen__expr(self, expr) {
|
|
|
6488
6844
|
args = _args$4;
|
|
6489
6845
|
break _L$5;
|
|
6490
6846
|
}
|
|
6491
|
-
case
|
|
6847
|
+
case 37: {
|
|
6492
6848
|
const _ComputedAccess = expr$2;
|
|
6493
6849
|
const _obj$7 = _ComputedAccess._0;
|
|
6494
6850
|
const _key = _ComputedAccess._1;
|
|
@@ -6496,7 +6852,7 @@ function _M0MP28username4core9JsCodegen9gen__expr(self, expr) {
|
|
|
6496
6852
|
key = _key;
|
|
6497
6853
|
break _L$4;
|
|
6498
6854
|
}
|
|
6499
|
-
case
|
|
6855
|
+
case 38: {
|
|
6500
6856
|
const _AsyncFnExpr = expr$2;
|
|
6501
6857
|
const _params$3 = _AsyncFnExpr._0;
|
|
6502
6858
|
const _body$2 = _AsyncFnExpr._1;
|
|
@@ -6665,7 +7021,28 @@ function _M0MP28username4core9JsCodegen9gen__expr(self, expr) {
|
|
|
6665
7021
|
}
|
|
6666
7022
|
_M0MP28username4core9JsCodegen15gen__expr__wrap(self$2, obj$6);
|
|
6667
7023
|
_M0MP28username4core9JsCodegen5write(self$2, ".");
|
|
6668
|
-
|
|
7024
|
+
const is_private = { val: false };
|
|
7025
|
+
const _arr = self$2.private_fields;
|
|
7026
|
+
const _len = _arr.length;
|
|
7027
|
+
let _tmp$3 = 0;
|
|
7028
|
+
while (true) {
|
|
7029
|
+
const _i = _tmp$3;
|
|
7030
|
+
if (_i < _len) {
|
|
7031
|
+
const pf = _arr[_i];
|
|
7032
|
+
if (pf === field$2) {
|
|
7033
|
+
is_private.val = true;
|
|
7034
|
+
break;
|
|
7035
|
+
}
|
|
7036
|
+
_tmp$3 = _i + 1 | 0;
|
|
7037
|
+
continue;
|
|
7038
|
+
} else {
|
|
7039
|
+
break;
|
|
7040
|
+
}
|
|
7041
|
+
}
|
|
7042
|
+
if (is_private.val) {
|
|
7043
|
+
_M0MP28username4core9JsCodegen5write(self$2, "#");
|
|
7044
|
+
}
|
|
7045
|
+
_M0MP28username4core9JsCodegen5write(self$2, _M0FP28username4core9js__ident(field$2));
|
|
6669
7046
|
return;
|
|
6670
7047
|
}
|
|
6671
7048
|
_M0MP28username4core9JsCodegen15gen__expr__wrap(self$2, obj$5);
|
|
@@ -7286,307 +7663,338 @@ function _M0MP28username4core9JsCodegen15gen__expr__wrap(self, expr) {
|
|
|
7286
7663
|
function _M0MP28username4core9JsCodegen9gen__stmt(self, stmt) {
|
|
7287
7664
|
let expr;
|
|
7288
7665
|
_L: {
|
|
7289
|
-
let
|
|
7666
|
+
let decl;
|
|
7290
7667
|
_L$2: {
|
|
7291
|
-
let inner
|
|
7668
|
+
let inner;
|
|
7292
7669
|
_L$3: {
|
|
7293
|
-
let
|
|
7294
|
-
let body;
|
|
7670
|
+
let inner$2;
|
|
7295
7671
|
_L$4: {
|
|
7296
|
-
let
|
|
7297
|
-
let
|
|
7672
|
+
let name;
|
|
7673
|
+
let body;
|
|
7298
7674
|
_L$5: {
|
|
7299
|
-
let
|
|
7675
|
+
let path;
|
|
7676
|
+
let names;
|
|
7300
7677
|
_L$6: {
|
|
7301
|
-
let
|
|
7678
|
+
let decl$2;
|
|
7302
7679
|
_L$7: {
|
|
7303
|
-
let
|
|
7680
|
+
let expr$2;
|
|
7304
7681
|
_L$8: {
|
|
7305
|
-
let
|
|
7682
|
+
let value;
|
|
7306
7683
|
_L$9: {
|
|
7307
|
-
let
|
|
7308
|
-
let try_body;
|
|
7309
|
-
let catch_name;
|
|
7310
|
-
let finally_body;
|
|
7684
|
+
let expr$3;
|
|
7311
7685
|
_L$10: {
|
|
7312
|
-
let
|
|
7313
|
-
let
|
|
7314
|
-
let
|
|
7686
|
+
let catch_body;
|
|
7687
|
+
let try_body;
|
|
7688
|
+
let catch_name;
|
|
7689
|
+
let finally_body;
|
|
7315
7690
|
_L$11: {
|
|
7316
|
-
let
|
|
7317
|
-
let
|
|
7691
|
+
let name$2;
|
|
7692
|
+
let inner$3;
|
|
7693
|
+
let iter;
|
|
7318
7694
|
_L$12: {
|
|
7319
|
-
let inner$
|
|
7320
|
-
let cond
|
|
7695
|
+
let inner$4;
|
|
7696
|
+
let cond;
|
|
7321
7697
|
_L$13: {
|
|
7322
|
-
let
|
|
7323
|
-
let
|
|
7698
|
+
let inner$5;
|
|
7699
|
+
let cond$2;
|
|
7324
7700
|
_L$14: {
|
|
7325
|
-
let
|
|
7326
|
-
let
|
|
7327
|
-
let start;
|
|
7328
|
-
let body$2;
|
|
7701
|
+
let subject;
|
|
7702
|
+
let arms;
|
|
7329
7703
|
_L$15: {
|
|
7330
|
-
let
|
|
7331
|
-
let name$
|
|
7332
|
-
let
|
|
7333
|
-
let body$
|
|
7704
|
+
let end;
|
|
7705
|
+
let name$3;
|
|
7706
|
+
let start;
|
|
7707
|
+
let body$2;
|
|
7334
7708
|
_L$16: {
|
|
7335
|
-
let
|
|
7336
|
-
let
|
|
7709
|
+
let iter$2;
|
|
7710
|
+
let name$4;
|
|
7711
|
+
let index;
|
|
7712
|
+
let body$3;
|
|
7337
7713
|
_L$17: {
|
|
7338
|
-
let cond$
|
|
7339
|
-
let body$
|
|
7714
|
+
let cond$3;
|
|
7715
|
+
let body$4;
|
|
7340
7716
|
_L$18: {
|
|
7341
|
-
let cond$
|
|
7342
|
-
let body$
|
|
7717
|
+
let cond$4;
|
|
7718
|
+
let body$5;
|
|
7343
7719
|
_L$19: {
|
|
7344
|
-
let
|
|
7345
|
-
let
|
|
7346
|
-
let body$7;
|
|
7347
|
-
let else_body;
|
|
7720
|
+
let cond$5;
|
|
7721
|
+
let body$6;
|
|
7348
7722
|
_L$20: {
|
|
7349
|
-
let
|
|
7723
|
+
let elifs;
|
|
7724
|
+
let cond$6;
|
|
7725
|
+
let body$7;
|
|
7726
|
+
let else_body;
|
|
7350
7727
|
_L$21: {
|
|
7351
|
-
let
|
|
7352
|
-
let value$2;
|
|
7728
|
+
let decl$3;
|
|
7353
7729
|
_L$22: {
|
|
7354
|
-
let
|
|
7355
|
-
let
|
|
7356
|
-
let value$3;
|
|
7730
|
+
let target;
|
|
7731
|
+
let value$2;
|
|
7357
7732
|
_L$23: {
|
|
7358
|
-
let names$
|
|
7359
|
-
let kind
|
|
7360
|
-
let value$
|
|
7733
|
+
let names$2;
|
|
7734
|
+
let kind;
|
|
7735
|
+
let value$3;
|
|
7361
7736
|
_L$24: {
|
|
7362
|
-
let
|
|
7363
|
-
let kind$
|
|
7364
|
-
let value$
|
|
7737
|
+
let names$3;
|
|
7738
|
+
let kind$2;
|
|
7739
|
+
let value$4;
|
|
7365
7740
|
_L$25: {
|
|
7366
|
-
|
|
7367
|
-
|
|
7368
|
-
|
|
7369
|
-
|
|
7370
|
-
|
|
7371
|
-
|
|
7372
|
-
|
|
7373
|
-
|
|
7374
|
-
|
|
7375
|
-
|
|
7376
|
-
|
|
7377
|
-
|
|
7378
|
-
|
|
7379
|
-
|
|
7380
|
-
|
|
7381
|
-
|
|
7382
|
-
|
|
7383
|
-
|
|
7384
|
-
|
|
7385
|
-
|
|
7386
|
-
|
|
7387
|
-
|
|
7388
|
-
|
|
7389
|
-
|
|
7390
|
-
|
|
7391
|
-
|
|
7392
|
-
|
|
7393
|
-
|
|
7394
|
-
|
|
7395
|
-
|
|
7396
|
-
|
|
7397
|
-
|
|
7398
|
-
|
|
7399
|
-
|
|
7400
|
-
|
|
7401
|
-
|
|
7402
|
-
|
|
7403
|
-
|
|
7404
|
-
|
|
7405
|
-
|
|
7406
|
-
|
|
7407
|
-
|
|
7408
|
-
|
|
7409
|
-
|
|
7410
|
-
|
|
7411
|
-
|
|
7412
|
-
|
|
7413
|
-
|
|
7414
|
-
|
|
7415
|
-
|
|
7416
|
-
|
|
7417
|
-
|
|
7418
|
-
|
|
7419
|
-
|
|
7420
|
-
|
|
7421
|
-
|
|
7422
|
-
|
|
7423
|
-
|
|
7424
|
-
|
|
7425
|
-
|
|
7426
|
-
|
|
7427
|
-
|
|
7428
|
-
|
|
7429
|
-
|
|
7430
|
-
|
|
7431
|
-
|
|
7432
|
-
|
|
7433
|
-
|
|
7434
|
-
|
|
7435
|
-
|
|
7436
|
-
|
|
7437
|
-
|
|
7438
|
-
|
|
7439
|
-
|
|
7440
|
-
|
|
7441
|
-
|
|
7442
|
-
|
|
7443
|
-
|
|
7444
|
-
|
|
7445
|
-
|
|
7446
|
-
|
|
7447
|
-
|
|
7448
|
-
|
|
7449
|
-
|
|
7450
|
-
|
|
7451
|
-
|
|
7452
|
-
|
|
7453
|
-
|
|
7454
|
-
|
|
7455
|
-
|
|
7456
|
-
|
|
7457
|
-
|
|
7458
|
-
|
|
7459
|
-
|
|
7460
|
-
|
|
7461
|
-
|
|
7462
|
-
|
|
7463
|
-
|
|
7464
|
-
|
|
7465
|
-
|
|
7466
|
-
|
|
7467
|
-
|
|
7468
|
-
|
|
7469
|
-
|
|
7470
|
-
|
|
7471
|
-
|
|
7472
|
-
|
|
7473
|
-
|
|
7474
|
-
|
|
7475
|
-
|
|
7476
|
-
|
|
7477
|
-
|
|
7478
|
-
|
|
7479
|
-
|
|
7480
|
-
|
|
7481
|
-
|
|
7482
|
-
|
|
7483
|
-
|
|
7484
|
-
|
|
7485
|
-
|
|
7486
|
-
|
|
7487
|
-
|
|
7488
|
-
|
|
7489
|
-
|
|
7490
|
-
|
|
7491
|
-
|
|
7492
|
-
|
|
7493
|
-
|
|
7494
|
-
|
|
7495
|
-
|
|
7496
|
-
|
|
7497
|
-
|
|
7498
|
-
|
|
7499
|
-
|
|
7500
|
-
|
|
7501
|
-
|
|
7502
|
-
|
|
7503
|
-
|
|
7504
|
-
|
|
7505
|
-
|
|
7506
|
-
|
|
7507
|
-
|
|
7508
|
-
|
|
7509
|
-
|
|
7510
|
-
|
|
7511
|
-
|
|
7512
|
-
|
|
7513
|
-
|
|
7514
|
-
|
|
7515
|
-
|
|
7516
|
-
|
|
7517
|
-
|
|
7518
|
-
|
|
7519
|
-
|
|
7520
|
-
|
|
7521
|
-
|
|
7522
|
-
|
|
7523
|
-
|
|
7524
|
-
|
|
7525
|
-
|
|
7526
|
-
|
|
7527
|
-
|
|
7528
|
-
|
|
7529
|
-
|
|
7530
|
-
|
|
7531
|
-
|
|
7532
|
-
|
|
7533
|
-
|
|
7534
|
-
|
|
7535
|
-
|
|
7536
|
-
|
|
7537
|
-
|
|
7538
|
-
|
|
7539
|
-
|
|
7540
|
-
|
|
7541
|
-
|
|
7542
|
-
|
|
7543
|
-
|
|
7544
|
-
|
|
7545
|
-
|
|
7546
|
-
|
|
7547
|
-
|
|
7548
|
-
|
|
7549
|
-
|
|
7550
|
-
|
|
7551
|
-
|
|
7552
|
-
|
|
7553
|
-
|
|
7554
|
-
|
|
7555
|
-
|
|
7556
|
-
|
|
7557
|
-
|
|
7558
|
-
|
|
7559
|
-
|
|
7560
|
-
|
|
7561
|
-
|
|
7562
|
-
|
|
7563
|
-
|
|
7564
|
-
|
|
7565
|
-
|
|
7566
|
-
|
|
7567
|
-
|
|
7568
|
-
|
|
7569
|
-
|
|
7741
|
+
let name$5;
|
|
7742
|
+
let kind$3;
|
|
7743
|
+
let value$5;
|
|
7744
|
+
_L$26: {
|
|
7745
|
+
switch (stmt.$tag) {
|
|
7746
|
+
case 0: {
|
|
7747
|
+
const _VarDecl = stmt;
|
|
7748
|
+
const _kind = _VarDecl._0;
|
|
7749
|
+
const _name = _VarDecl._1;
|
|
7750
|
+
const _value = _VarDecl._2;
|
|
7751
|
+
name$5 = _name;
|
|
7752
|
+
kind$3 = _kind;
|
|
7753
|
+
value$5 = _value;
|
|
7754
|
+
break _L$26;
|
|
7755
|
+
}
|
|
7756
|
+
case 1: {
|
|
7757
|
+
const _DestructDecl = stmt;
|
|
7758
|
+
const _kind$2 = _DestructDecl._0;
|
|
7759
|
+
const _names = _DestructDecl._1;
|
|
7760
|
+
const _value$2 = _DestructDecl._2;
|
|
7761
|
+
names$3 = _names;
|
|
7762
|
+
kind$2 = _kind$2;
|
|
7763
|
+
value$4 = _value$2;
|
|
7764
|
+
break _L$25;
|
|
7765
|
+
}
|
|
7766
|
+
case 2: {
|
|
7767
|
+
const _ObjDestructDecl = stmt;
|
|
7768
|
+
const _kind$3 = _ObjDestructDecl._0;
|
|
7769
|
+
const _names$2 = _ObjDestructDecl._1;
|
|
7770
|
+
const _value$3 = _ObjDestructDecl._2;
|
|
7771
|
+
names$2 = _names$2;
|
|
7772
|
+
kind = _kind$3;
|
|
7773
|
+
value$3 = _value$3;
|
|
7774
|
+
break _L$24;
|
|
7775
|
+
}
|
|
7776
|
+
case 3: {
|
|
7777
|
+
const _Assign = stmt;
|
|
7778
|
+
const _target = _Assign._0;
|
|
7779
|
+
const _value$4 = _Assign._1;
|
|
7780
|
+
target = _target;
|
|
7781
|
+
value$2 = _value$4;
|
|
7782
|
+
break _L$23;
|
|
7783
|
+
}
|
|
7784
|
+
case 4: {
|
|
7785
|
+
const _FnDecl = stmt;
|
|
7786
|
+
const _decl = _FnDecl._0;
|
|
7787
|
+
decl$3 = _decl;
|
|
7788
|
+
break _L$22;
|
|
7789
|
+
}
|
|
7790
|
+
case 5: {
|
|
7791
|
+
const _If = stmt;
|
|
7792
|
+
const _cond = _If._0;
|
|
7793
|
+
const _body = _If._1;
|
|
7794
|
+
const _elifs = _If._2;
|
|
7795
|
+
const _else_body = _If._3;
|
|
7796
|
+
elifs = _elifs;
|
|
7797
|
+
cond$6 = _cond;
|
|
7798
|
+
body$7 = _body;
|
|
7799
|
+
else_body = _else_body;
|
|
7800
|
+
break _L$21;
|
|
7801
|
+
}
|
|
7802
|
+
case 6: {
|
|
7803
|
+
const _Unless = stmt;
|
|
7804
|
+
const _cond$2 = _Unless._0;
|
|
7805
|
+
const _body$2 = _Unless._1;
|
|
7806
|
+
cond$5 = _cond$2;
|
|
7807
|
+
body$6 = _body$2;
|
|
7808
|
+
break _L$20;
|
|
7809
|
+
}
|
|
7810
|
+
case 7: {
|
|
7811
|
+
const _While = stmt;
|
|
7812
|
+
const _cond$3 = _While._0;
|
|
7813
|
+
const _body$3 = _While._1;
|
|
7814
|
+
cond$4 = _cond$3;
|
|
7815
|
+
body$5 = _body$3;
|
|
7816
|
+
break _L$19;
|
|
7817
|
+
}
|
|
7818
|
+
case 8: {
|
|
7819
|
+
const _Until = stmt;
|
|
7820
|
+
const _cond$4 = _Until._0;
|
|
7821
|
+
const _body$4 = _Until._1;
|
|
7822
|
+
cond$3 = _cond$4;
|
|
7823
|
+
body$4 = _body$4;
|
|
7824
|
+
break _L$18;
|
|
7825
|
+
}
|
|
7826
|
+
case 9: {
|
|
7827
|
+
const _ForIn = stmt;
|
|
7828
|
+
const _name$2 = _ForIn._0;
|
|
7829
|
+
const _index = _ForIn._1;
|
|
7830
|
+
const _iter = _ForIn._2;
|
|
7831
|
+
const _body$5 = _ForIn._3;
|
|
7832
|
+
iter$2 = _iter;
|
|
7833
|
+
name$4 = _name$2;
|
|
7834
|
+
index = _index;
|
|
7835
|
+
body$3 = _body$5;
|
|
7836
|
+
break _L$17;
|
|
7837
|
+
}
|
|
7838
|
+
case 10: {
|
|
7839
|
+
const _ForRange = stmt;
|
|
7840
|
+
const _name$3 = _ForRange._0;
|
|
7841
|
+
const _start = _ForRange._1;
|
|
7842
|
+
const _end = _ForRange._2;
|
|
7843
|
+
const _body$6 = _ForRange._3;
|
|
7844
|
+
end = _end;
|
|
7845
|
+
name$3 = _name$3;
|
|
7846
|
+
start = _start;
|
|
7847
|
+
body$2 = _body$6;
|
|
7848
|
+
break _L$16;
|
|
7849
|
+
}
|
|
7850
|
+
case 11: {
|
|
7851
|
+
const _MatchStmt = stmt;
|
|
7852
|
+
const _subject = _MatchStmt._0;
|
|
7853
|
+
const _arms = _MatchStmt._1;
|
|
7854
|
+
subject = _subject;
|
|
7855
|
+
arms = _arms;
|
|
7856
|
+
break _L$15;
|
|
7857
|
+
}
|
|
7858
|
+
case 12: {
|
|
7859
|
+
const _PostfixIf = stmt;
|
|
7860
|
+
const _inner = _PostfixIf._0;
|
|
7861
|
+
const _cond$5 = _PostfixIf._1;
|
|
7862
|
+
inner$5 = _inner;
|
|
7863
|
+
cond$2 = _cond$5;
|
|
7864
|
+
break _L$14;
|
|
7865
|
+
}
|
|
7866
|
+
case 13: {
|
|
7867
|
+
const _PostfixUnless = stmt;
|
|
7868
|
+
const _inner$2 = _PostfixUnless._0;
|
|
7869
|
+
const _cond$6 = _PostfixUnless._1;
|
|
7870
|
+
inner$4 = _inner$2;
|
|
7871
|
+
cond = _cond$6;
|
|
7872
|
+
break _L$13;
|
|
7873
|
+
}
|
|
7874
|
+
case 14: {
|
|
7875
|
+
const _PostfixFor = stmt;
|
|
7876
|
+
const _inner$3 = _PostfixFor._0;
|
|
7877
|
+
const _name$4 = _PostfixFor._1;
|
|
7878
|
+
const _iter$2 = _PostfixFor._2;
|
|
7879
|
+
name$2 = _name$4;
|
|
7880
|
+
inner$3 = _inner$3;
|
|
7881
|
+
iter = _iter$2;
|
|
7882
|
+
break _L$12;
|
|
7883
|
+
}
|
|
7884
|
+
case 15: {
|
|
7885
|
+
const _TryCatch = stmt;
|
|
7886
|
+
const _try_body = _TryCatch._0;
|
|
7887
|
+
const _catch_name = _TryCatch._1;
|
|
7888
|
+
const _catch_body = _TryCatch._2;
|
|
7889
|
+
const _finally_body = _TryCatch._3;
|
|
7890
|
+
catch_body = _catch_body;
|
|
7891
|
+
try_body = _try_body;
|
|
7892
|
+
catch_name = _catch_name;
|
|
7893
|
+
finally_body = _finally_body;
|
|
7894
|
+
break _L$11;
|
|
7895
|
+
}
|
|
7896
|
+
case 16: {
|
|
7897
|
+
const _Throw = stmt;
|
|
7898
|
+
const _expr = _Throw._0;
|
|
7899
|
+
expr$3 = _expr;
|
|
7900
|
+
break _L$10;
|
|
7901
|
+
}
|
|
7902
|
+
case 17: {
|
|
7903
|
+
const _Return = stmt;
|
|
7904
|
+
const _value$5 = _Return._0;
|
|
7905
|
+
value = _value$5;
|
|
7906
|
+
break _L$9;
|
|
7907
|
+
}
|
|
7908
|
+
case 18: {
|
|
7909
|
+
_M0MP28username4core9JsCodegen7writeln(self, "break;");
|
|
7910
|
+
return;
|
|
7911
|
+
}
|
|
7912
|
+
case 19: {
|
|
7913
|
+
_M0MP28username4core9JsCodegen7writeln(self, "continue;");
|
|
7914
|
+
return;
|
|
7915
|
+
}
|
|
7916
|
+
case 20: {
|
|
7917
|
+
const _ExprStmt = stmt;
|
|
7918
|
+
const _expr$2 = _ExprStmt._0;
|
|
7919
|
+
expr$2 = _expr$2;
|
|
7920
|
+
break _L$8;
|
|
7921
|
+
}
|
|
7922
|
+
case 21: {
|
|
7923
|
+
const _ImportDecl = stmt;
|
|
7924
|
+
const _decl$2 = _ImportDecl._0;
|
|
7925
|
+
decl$2 = _decl$2;
|
|
7926
|
+
break _L$7;
|
|
7927
|
+
}
|
|
7928
|
+
case 22: {
|
|
7929
|
+
const _UseDecl = stmt;
|
|
7930
|
+
const _path = _UseDecl._0;
|
|
7931
|
+
const _names$3 = _UseDecl._1;
|
|
7932
|
+
path = _path;
|
|
7933
|
+
names = _names$3;
|
|
7934
|
+
break _L$6;
|
|
7935
|
+
}
|
|
7936
|
+
case 23: {
|
|
7937
|
+
const _ModDecl = stmt;
|
|
7938
|
+
const _name$5 = _ModDecl._0;
|
|
7939
|
+
const _body$7 = _ModDecl._1;
|
|
7940
|
+
name = _name$5;
|
|
7941
|
+
body = _body$7;
|
|
7942
|
+
break _L$5;
|
|
7943
|
+
}
|
|
7944
|
+
case 24: {
|
|
7945
|
+
const _ExportDefault = stmt;
|
|
7946
|
+
const _inner$4 = _ExportDefault._0;
|
|
7947
|
+
inner$2 = _inner$4;
|
|
7948
|
+
break _L$4;
|
|
7949
|
+
}
|
|
7950
|
+
case 25: {
|
|
7951
|
+
const _PubDecl = stmt;
|
|
7952
|
+
const _inner$5 = _PubDecl._0;
|
|
7953
|
+
inner = _inner$5;
|
|
7954
|
+
break _L$3;
|
|
7955
|
+
}
|
|
7956
|
+
case 26: {
|
|
7957
|
+
return;
|
|
7958
|
+
}
|
|
7959
|
+
case 27: {
|
|
7960
|
+
const _ClassDecl = stmt;
|
|
7961
|
+
const _decl$3 = _ClassDecl._0;
|
|
7962
|
+
decl = _decl$3;
|
|
7963
|
+
break _L$2;
|
|
7964
|
+
}
|
|
7965
|
+
default: {
|
|
7966
|
+
const _DeleteStmt = stmt;
|
|
7967
|
+
const _expr$3 = _DeleteStmt._0;
|
|
7968
|
+
expr = _expr$3;
|
|
7969
|
+
break _L;
|
|
7970
|
+
}
|
|
7570
7971
|
}
|
|
7571
|
-
|
|
7572
|
-
|
|
7573
|
-
|
|
7574
|
-
|
|
7575
|
-
|
|
7972
|
+
}
|
|
7973
|
+
let kw;
|
|
7974
|
+
switch (kind$3) {
|
|
7975
|
+
case 0: {
|
|
7976
|
+
kw = "const";
|
|
7977
|
+
break;
|
|
7576
7978
|
}
|
|
7577
|
-
case
|
|
7578
|
-
|
|
7979
|
+
case 1: {
|
|
7980
|
+
kw = "let";
|
|
7981
|
+
break;
|
|
7579
7982
|
}
|
|
7580
7983
|
default: {
|
|
7581
|
-
|
|
7582
|
-
const _expr$3 = _DeleteStmt._0;
|
|
7583
|
-
expr = _expr$3;
|
|
7584
|
-
break _L;
|
|
7984
|
+
kw = "var";
|
|
7585
7985
|
}
|
|
7586
7986
|
}
|
|
7987
|
+
_M0MP28username4core9JsCodegen13write__indent(self);
|
|
7988
|
+
_M0MP28username4core9JsCodegen5write(self, kw);
|
|
7989
|
+
_M0MP28username4core9JsCodegen5write(self, " ");
|
|
7990
|
+
_M0MP28username4core9JsCodegen5write(self, _M0FP28username4core9js__ident(name$5));
|
|
7991
|
+
_M0MP28username4core9JsCodegen5write(self, " = ");
|
|
7992
|
+
_M0MP28username4core9JsCodegen9gen__expr(self, value$5);
|
|
7993
|
+
_M0MP28username4core9JsCodegen5write(self, ";\n");
|
|
7994
|
+
return;
|
|
7587
7995
|
}
|
|
7588
7996
|
let kw;
|
|
7589
|
-
switch (kind$
|
|
7997
|
+
switch (kind$2) {
|
|
7590
7998
|
case 0: {
|
|
7591
7999
|
kw = "const";
|
|
7592
8000
|
break;
|
|
@@ -7601,15 +8009,33 @@ function _M0MP28username4core9JsCodegen9gen__stmt(self, stmt) {
|
|
|
7601
8009
|
}
|
|
7602
8010
|
_M0MP28username4core9JsCodegen13write__indent(self);
|
|
7603
8011
|
_M0MP28username4core9JsCodegen5write(self, kw);
|
|
7604
|
-
_M0MP28username4core9JsCodegen5write(self, " ");
|
|
7605
|
-
|
|
7606
|
-
|
|
7607
|
-
|
|
8012
|
+
_M0MP28username4core9JsCodegen5write(self, " [");
|
|
8013
|
+
const first = { val: true };
|
|
8014
|
+
const _arr = names$3;
|
|
8015
|
+
const _len = _arr.length;
|
|
8016
|
+
let _tmp = 0;
|
|
8017
|
+
while (true) {
|
|
8018
|
+
const _i = _tmp;
|
|
8019
|
+
if (_i < _len) {
|
|
8020
|
+
const n = _arr[_i];
|
|
8021
|
+
if (!first.val) {
|
|
8022
|
+
_M0MP28username4core9JsCodegen5write(self, ", ");
|
|
8023
|
+
}
|
|
8024
|
+
_M0MP28username4core9JsCodegen5write(self, _M0FP28username4core9js__ident(n));
|
|
8025
|
+
first.val = false;
|
|
8026
|
+
_tmp = _i + 1 | 0;
|
|
8027
|
+
continue;
|
|
8028
|
+
} else {
|
|
8029
|
+
break;
|
|
8030
|
+
}
|
|
8031
|
+
}
|
|
8032
|
+
_M0MP28username4core9JsCodegen5write(self, "] = ");
|
|
8033
|
+
_M0MP28username4core9JsCodegen9gen__expr(self, value$4);
|
|
7608
8034
|
_M0MP28username4core9JsCodegen5write(self, ";\n");
|
|
7609
8035
|
return;
|
|
7610
8036
|
}
|
|
7611
8037
|
let kw;
|
|
7612
|
-
switch (kind
|
|
8038
|
+
switch (kind) {
|
|
7613
8039
|
case 0: {
|
|
7614
8040
|
kw = "const";
|
|
7615
8041
|
break;
|
|
@@ -7624,9 +8050,9 @@ function _M0MP28username4core9JsCodegen9gen__stmt(self, stmt) {
|
|
|
7624
8050
|
}
|
|
7625
8051
|
_M0MP28username4core9JsCodegen13write__indent(self);
|
|
7626
8052
|
_M0MP28username4core9JsCodegen5write(self, kw);
|
|
7627
|
-
_M0MP28username4core9JsCodegen5write(self, "
|
|
8053
|
+
_M0MP28username4core9JsCodegen5write(self, " { ");
|
|
7628
8054
|
const first = { val: true };
|
|
7629
|
-
const _arr = names$
|
|
8055
|
+
const _arr = names$2;
|
|
7630
8056
|
const _len = _arr.length;
|
|
7631
8057
|
let _tmp = 0;
|
|
7632
8058
|
while (true) {
|
|
@@ -7644,133 +8070,115 @@ function _M0MP28username4core9JsCodegen9gen__stmt(self, stmt) {
|
|
|
7644
8070
|
break;
|
|
7645
8071
|
}
|
|
7646
8072
|
}
|
|
7647
|
-
_M0MP28username4core9JsCodegen5write(self, "
|
|
7648
|
-
_M0MP28username4core9JsCodegen9gen__expr(self, value$
|
|
8073
|
+
_M0MP28username4core9JsCodegen5write(self, " } = ");
|
|
8074
|
+
_M0MP28username4core9JsCodegen9gen__expr(self, value$3);
|
|
7649
8075
|
_M0MP28username4core9JsCodegen5write(self, ";\n");
|
|
7650
8076
|
return;
|
|
7651
8077
|
}
|
|
7652
|
-
let
|
|
7653
|
-
|
|
7654
|
-
|
|
7655
|
-
|
|
7656
|
-
|
|
7657
|
-
|
|
7658
|
-
|
|
7659
|
-
|
|
7660
|
-
|
|
7661
|
-
|
|
7662
|
-
|
|
7663
|
-
|
|
7664
|
-
|
|
7665
|
-
|
|
7666
|
-
|
|
7667
|
-
|
|
7668
|
-
_M0MP28username4core9JsCodegen5write(self, " { ");
|
|
7669
|
-
const first = { val: true };
|
|
7670
|
-
const _arr = names$2;
|
|
7671
|
-
const _len = _arr.length;
|
|
7672
|
-
let _tmp = 0;
|
|
7673
|
-
while (true) {
|
|
7674
|
-
const _i = _tmp;
|
|
7675
|
-
if (_i < _len) {
|
|
7676
|
-
const n = _arr[_i];
|
|
7677
|
-
if (!first.val) {
|
|
7678
|
-
_M0MP28username4core9JsCodegen5write(self, ", ");
|
|
7679
|
-
}
|
|
7680
|
-
_M0MP28username4core9JsCodegen5write(self, _M0FP28username4core9js__ident(n));
|
|
7681
|
-
first.val = false;
|
|
7682
|
-
_tmp = _i + 1 | 0;
|
|
7683
|
-
continue;
|
|
8078
|
+
let end$2;
|
|
8079
|
+
let obj;
|
|
8080
|
+
let start$2;
|
|
8081
|
+
let inclusive;
|
|
8082
|
+
_L$24: {
|
|
8083
|
+
if (target.$tag === 10) {
|
|
8084
|
+
const _Slice = target;
|
|
8085
|
+
const _obj = _Slice._0;
|
|
8086
|
+
const _start = _Slice._1;
|
|
8087
|
+
const _end = _Slice._2;
|
|
8088
|
+
const _inclusive = _Slice._3;
|
|
8089
|
+
end$2 = _end;
|
|
8090
|
+
obj = _obj;
|
|
8091
|
+
start$2 = _start;
|
|
8092
|
+
inclusive = _inclusive;
|
|
8093
|
+
break _L$24;
|
|
7684
8094
|
} else {
|
|
7685
|
-
|
|
8095
|
+
_M0MP28username4core9JsCodegen13write__indent(self);
|
|
8096
|
+
_M0MP28username4core9JsCodegen9gen__expr(self, target);
|
|
8097
|
+
_M0MP28username4core9JsCodegen5write(self, " = ");
|
|
8098
|
+
_M0MP28username4core9JsCodegen9gen__expr(self, value$2);
|
|
8099
|
+
_M0MP28username4core9JsCodegen5write(self, ";\n");
|
|
8100
|
+
return;
|
|
7686
8101
|
}
|
|
7687
8102
|
}
|
|
7688
|
-
|
|
7689
|
-
_M0MP28username4core9JsCodegen9gen__expr(self,
|
|
7690
|
-
_M0MP28username4core9JsCodegen5write(self, "
|
|
7691
|
-
|
|
7692
|
-
|
|
7693
|
-
|
|
7694
|
-
|
|
7695
|
-
|
|
7696
|
-
|
|
7697
|
-
|
|
7698
|
-
if (target.$tag === 10) {
|
|
7699
|
-
const _Slice = target;
|
|
7700
|
-
const _obj = _Slice._0;
|
|
7701
|
-
const _start = _Slice._1;
|
|
7702
|
-
const _end = _Slice._2;
|
|
7703
|
-
const _inclusive = _Slice._3;
|
|
7704
|
-
end$2 = _end;
|
|
7705
|
-
obj = _obj;
|
|
7706
|
-
start$2 = _start;
|
|
7707
|
-
inclusive = _inclusive;
|
|
7708
|
-
break _L$23;
|
|
7709
|
-
} else {
|
|
7710
|
-
_M0MP28username4core9JsCodegen13write__indent(self);
|
|
7711
|
-
_M0MP28username4core9JsCodegen9gen__expr(self, target);
|
|
7712
|
-
_M0MP28username4core9JsCodegen5write(self, " = ");
|
|
7713
|
-
_M0MP28username4core9JsCodegen9gen__expr(self, value$2);
|
|
7714
|
-
_M0MP28username4core9JsCodegen5write(self, ";\n");
|
|
7715
|
-
return;
|
|
8103
|
+
_M0MP28username4core9JsCodegen13write__indent(self);
|
|
8104
|
+
_M0MP28username4core9JsCodegen9gen__expr(self, obj);
|
|
8105
|
+
_M0MP28username4core9JsCodegen5write(self, ".splice(");
|
|
8106
|
+
_M0MP28username4core9JsCodegen9gen__expr(self, start$2);
|
|
8107
|
+
_M0MP28username4core9JsCodegen5write(self, ", ");
|
|
8108
|
+
_M0MP28username4core9JsCodegen15gen__expr__wrap(self, end$2);
|
|
8109
|
+
_M0MP28username4core9JsCodegen5write(self, " - ");
|
|
8110
|
+
_M0MP28username4core9JsCodegen15gen__expr__wrap(self, start$2);
|
|
8111
|
+
if (inclusive) {
|
|
8112
|
+
_M0MP28username4core9JsCodegen5write(self, " + 1");
|
|
7716
8113
|
}
|
|
7717
|
-
|
|
7718
|
-
_M0MP28username4core9JsCodegen13write__indent(self);
|
|
7719
|
-
_M0MP28username4core9JsCodegen9gen__expr(self, obj);
|
|
7720
|
-
_M0MP28username4core9JsCodegen5write(self, ".splice(");
|
|
7721
|
-
_M0MP28username4core9JsCodegen9gen__expr(self, start$2);
|
|
7722
|
-
_M0MP28username4core9JsCodegen5write(self, ", ");
|
|
7723
|
-
_M0MP28username4core9JsCodegen15gen__expr__wrap(self, end$2);
|
|
7724
|
-
_M0MP28username4core9JsCodegen5write(self, " - ");
|
|
7725
|
-
_M0MP28username4core9JsCodegen15gen__expr__wrap(self, start$2);
|
|
7726
|
-
if (inclusive) {
|
|
7727
|
-
_M0MP28username4core9JsCodegen5write(self, " + 1");
|
|
7728
|
-
}
|
|
7729
|
-
let elems;
|
|
7730
|
-
_L$24: {
|
|
8114
|
+
let elems;
|
|
7731
8115
|
_L$25: {
|
|
7732
|
-
|
|
7733
|
-
|
|
7734
|
-
|
|
7735
|
-
|
|
8116
|
+
_L$26: {
|
|
8117
|
+
if (value$2.$tag === 8) {
|
|
8118
|
+
const _ArrayLit = value$2;
|
|
8119
|
+
const _elems = _ArrayLit._0;
|
|
8120
|
+
elems = _elems;
|
|
8121
|
+
break _L$26;
|
|
8122
|
+
} else {
|
|
8123
|
+
_M0MP28username4core9JsCodegen5write(self, ", ...");
|
|
8124
|
+
_M0MP28username4core9JsCodegen9gen__expr(self, value$2);
|
|
8125
|
+
}
|
|
7736
8126
|
break _L$25;
|
|
7737
|
-
} else {
|
|
7738
|
-
_M0MP28username4core9JsCodegen5write(self, ", ...");
|
|
7739
|
-
_M0MP28username4core9JsCodegen9gen__expr(self, value$2);
|
|
7740
8127
|
}
|
|
7741
|
-
|
|
7742
|
-
|
|
7743
|
-
|
|
7744
|
-
|
|
7745
|
-
|
|
7746
|
-
|
|
7747
|
-
|
|
7748
|
-
|
|
7749
|
-
|
|
7750
|
-
|
|
7751
|
-
|
|
7752
|
-
|
|
7753
|
-
|
|
7754
|
-
|
|
7755
|
-
break;
|
|
8128
|
+
const _arr = elems;
|
|
8129
|
+
const _len = _arr.length;
|
|
8130
|
+
let _tmp = 0;
|
|
8131
|
+
while (true) {
|
|
8132
|
+
const _i = _tmp;
|
|
8133
|
+
if (_i < _len) {
|
|
8134
|
+
const e = _arr[_i];
|
|
8135
|
+
_M0MP28username4core9JsCodegen5write(self, ", ");
|
|
8136
|
+
_M0MP28username4core9JsCodegen9gen__expr(self, e);
|
|
8137
|
+
_tmp = _i + 1 | 0;
|
|
8138
|
+
continue;
|
|
8139
|
+
} else {
|
|
8140
|
+
break;
|
|
8141
|
+
}
|
|
7756
8142
|
}
|
|
7757
8143
|
}
|
|
8144
|
+
_M0MP28username4core9JsCodegen5write(self, ");\n");
|
|
8145
|
+
return;
|
|
7758
8146
|
}
|
|
7759
|
-
|
|
8147
|
+
_M0MP28username4core9JsCodegen13gen__fn__decl(self, decl$3);
|
|
7760
8148
|
return;
|
|
7761
8149
|
}
|
|
7762
|
-
|
|
8150
|
+
_M0MP28username4core9JsCodegen7gen__if(self, cond$6, body$7, elifs, else_body);
|
|
7763
8151
|
return;
|
|
7764
8152
|
}
|
|
7765
|
-
|
|
8153
|
+
_M0MP28username4core9JsCodegen13write__indent(self);
|
|
8154
|
+
_M0MP28username4core9JsCodegen5write(self, "if (!(");
|
|
8155
|
+
_M0MP28username4core9JsCodegen9gen__expr(self, cond$5);
|
|
8156
|
+
_M0MP28username4core9JsCodegen5write(self, ")) {\n");
|
|
8157
|
+
self.indent_level = self.indent_level + 1 | 0;
|
|
8158
|
+
const _arr = body$6;
|
|
8159
|
+
const _len = _arr.length;
|
|
8160
|
+
let _tmp = 0;
|
|
8161
|
+
while (true) {
|
|
8162
|
+
const _i = _tmp;
|
|
8163
|
+
if (_i < _len) {
|
|
8164
|
+
const s = _arr[_i];
|
|
8165
|
+
_M0MP28username4core9JsCodegen9gen__stmt(self, s);
|
|
8166
|
+
_tmp = _i + 1 | 0;
|
|
8167
|
+
continue;
|
|
8168
|
+
} else {
|
|
8169
|
+
break;
|
|
8170
|
+
}
|
|
8171
|
+
}
|
|
8172
|
+
self.indent_level = self.indent_level - 1 | 0;
|
|
8173
|
+
_M0MP28username4core9JsCodegen7writeln(self, "}");
|
|
7766
8174
|
return;
|
|
7767
8175
|
}
|
|
7768
8176
|
_M0MP28username4core9JsCodegen13write__indent(self);
|
|
7769
|
-
_M0MP28username4core9JsCodegen5write(self, "
|
|
7770
|
-
_M0MP28username4core9JsCodegen9gen__expr(self, cond$
|
|
7771
|
-
_M0MP28username4core9JsCodegen5write(self, ")
|
|
8177
|
+
_M0MP28username4core9JsCodegen5write(self, "while (");
|
|
8178
|
+
_M0MP28username4core9JsCodegen9gen__expr(self, cond$4);
|
|
8179
|
+
_M0MP28username4core9JsCodegen5write(self, ") {\n");
|
|
7772
8180
|
self.indent_level = self.indent_level + 1 | 0;
|
|
7773
|
-
const _arr = body$
|
|
8181
|
+
const _arr = body$5;
|
|
7774
8182
|
const _len = _arr.length;
|
|
7775
8183
|
let _tmp = 0;
|
|
7776
8184
|
while (true) {
|
|
@@ -7789,11 +8197,11 @@ function _M0MP28username4core9JsCodegen9gen__stmt(self, stmt) {
|
|
|
7789
8197
|
return;
|
|
7790
8198
|
}
|
|
7791
8199
|
_M0MP28username4core9JsCodegen13write__indent(self);
|
|
7792
|
-
_M0MP28username4core9JsCodegen5write(self, "while (");
|
|
7793
|
-
_M0MP28username4core9JsCodegen9gen__expr(self, cond$
|
|
7794
|
-
_M0MP28username4core9JsCodegen5write(self, ") {\n");
|
|
8200
|
+
_M0MP28username4core9JsCodegen5write(self, "while (!(");
|
|
8201
|
+
_M0MP28username4core9JsCodegen9gen__expr(self, cond$3);
|
|
8202
|
+
_M0MP28username4core9JsCodegen5write(self, ")) {\n");
|
|
7795
8203
|
self.indent_level = self.indent_level + 1 | 0;
|
|
7796
|
-
const _arr = body$
|
|
8204
|
+
const _arr = body$4;
|
|
7797
8205
|
const _len = _arr.length;
|
|
7798
8206
|
let _tmp = 0;
|
|
7799
8207
|
while (true) {
|
|
@@ -7811,12 +8219,35 @@ function _M0MP28username4core9JsCodegen9gen__stmt(self, stmt) {
|
|
|
7811
8219
|
_M0MP28username4core9JsCodegen7writeln(self, "}");
|
|
7812
8220
|
return;
|
|
7813
8221
|
}
|
|
7814
|
-
|
|
7815
|
-
|
|
7816
|
-
|
|
7817
|
-
|
|
8222
|
+
let idx;
|
|
8223
|
+
_L$18: {
|
|
8224
|
+
_L$19: {
|
|
8225
|
+
if (index === undefined) {
|
|
8226
|
+
_M0MP28username4core9JsCodegen13write__indent(self);
|
|
8227
|
+
_M0MP28username4core9JsCodegen5write(self, "for (const ");
|
|
8228
|
+
_M0MP28username4core9JsCodegen5write(self, _M0FP28username4core9js__ident(name$4));
|
|
8229
|
+
_M0MP28username4core9JsCodegen5write(self, " of ");
|
|
8230
|
+
_M0MP28username4core9JsCodegen9gen__expr(self, iter$2);
|
|
8231
|
+
_M0MP28username4core9JsCodegen5write(self, ") {\n");
|
|
8232
|
+
} else {
|
|
8233
|
+
const _Some = index;
|
|
8234
|
+
const _idx = _Some;
|
|
8235
|
+
idx = _idx;
|
|
8236
|
+
break _L$19;
|
|
8237
|
+
}
|
|
8238
|
+
break _L$18;
|
|
8239
|
+
}
|
|
8240
|
+
_M0MP28username4core9JsCodegen13write__indent(self);
|
|
8241
|
+
_M0MP28username4core9JsCodegen5write(self, "for (let [");
|
|
8242
|
+
_M0MP28username4core9JsCodegen5write(self, _M0FP28username4core9js__ident(idx));
|
|
8243
|
+
_M0MP28username4core9JsCodegen5write(self, ", ");
|
|
8244
|
+
_M0MP28username4core9JsCodegen5write(self, _M0FP28username4core9js__ident(name$4));
|
|
8245
|
+
_M0MP28username4core9JsCodegen5write(self, "] of ");
|
|
8246
|
+
_M0MP28username4core9JsCodegen9gen__expr(self, iter$2);
|
|
8247
|
+
_M0MP28username4core9JsCodegen5write(self, ".entries()) {\n");
|
|
8248
|
+
}
|
|
7818
8249
|
self.indent_level = self.indent_level + 1 | 0;
|
|
7819
|
-
const _arr = body$
|
|
8250
|
+
const _arr = body$3;
|
|
7820
8251
|
const _len = _arr.length;
|
|
7821
8252
|
let _tmp = 0;
|
|
7822
8253
|
while (true) {
|
|
@@ -7834,35 +8265,20 @@ function _M0MP28username4core9JsCodegen9gen__stmt(self, stmt) {
|
|
|
7834
8265
|
_M0MP28username4core9JsCodegen7writeln(self, "}");
|
|
7835
8266
|
return;
|
|
7836
8267
|
}
|
|
7837
|
-
|
|
7838
|
-
|
|
7839
|
-
|
|
7840
|
-
|
|
7841
|
-
|
|
7842
|
-
|
|
7843
|
-
|
|
7844
|
-
|
|
7845
|
-
|
|
7846
|
-
|
|
7847
|
-
|
|
7848
|
-
|
|
7849
|
-
const _idx = _Some;
|
|
7850
|
-
idx = _idx;
|
|
7851
|
-
break _L$18;
|
|
7852
|
-
}
|
|
7853
|
-
break _L$17;
|
|
7854
|
-
}
|
|
7855
|
-
_M0MP28username4core9JsCodegen13write__indent(self);
|
|
7856
|
-
_M0MP28username4core9JsCodegen5write(self, "for (let [");
|
|
7857
|
-
_M0MP28username4core9JsCodegen5write(self, _M0FP28username4core9js__ident(idx));
|
|
7858
|
-
_M0MP28username4core9JsCodegen5write(self, ", ");
|
|
7859
|
-
_M0MP28username4core9JsCodegen5write(self, _M0FP28username4core9js__ident(name$4));
|
|
7860
|
-
_M0MP28username4core9JsCodegen5write(self, "] of ");
|
|
7861
|
-
_M0MP28username4core9JsCodegen9gen__expr(self, iter$2);
|
|
7862
|
-
_M0MP28username4core9JsCodegen5write(self, ".entries()) {\n");
|
|
7863
|
-
}
|
|
8268
|
+
_M0MP28username4core9JsCodegen13write__indent(self);
|
|
8269
|
+
_M0MP28username4core9JsCodegen5write(self, "for (let ");
|
|
8270
|
+
_M0MP28username4core9JsCodegen5write(self, _M0FP28username4core9js__ident(name$3));
|
|
8271
|
+
_M0MP28username4core9JsCodegen5write(self, " = ");
|
|
8272
|
+
_M0MP28username4core9JsCodegen9gen__expr(self, start);
|
|
8273
|
+
_M0MP28username4core9JsCodegen5write(self, "; ");
|
|
8274
|
+
_M0MP28username4core9JsCodegen5write(self, _M0FP28username4core9js__ident(name$3));
|
|
8275
|
+
_M0MP28username4core9JsCodegen5write(self, " < ");
|
|
8276
|
+
_M0MP28username4core9JsCodegen9gen__expr(self, end);
|
|
8277
|
+
_M0MP28username4core9JsCodegen5write(self, "; ");
|
|
8278
|
+
_M0MP28username4core9JsCodegen5write(self, _M0FP28username4core9js__ident(name$3));
|
|
8279
|
+
_M0MP28username4core9JsCodegen5write(self, "++) {\n");
|
|
7864
8280
|
self.indent_level = self.indent_level + 1 | 0;
|
|
7865
|
-
const _arr = body$
|
|
8281
|
+
const _arr = body$2;
|
|
7866
8282
|
const _len = _arr.length;
|
|
7867
8283
|
let _tmp = 0;
|
|
7868
8284
|
while (true) {
|
|
@@ -7880,283 +8296,255 @@ function _M0MP28username4core9JsCodegen9gen__stmt(self, stmt) {
|
|
|
7880
8296
|
_M0MP28username4core9JsCodegen7writeln(self, "}");
|
|
7881
8297
|
return;
|
|
7882
8298
|
}
|
|
7883
|
-
|
|
7884
|
-
_M0MP28username4core9JsCodegen5write(self, "for (let ");
|
|
7885
|
-
_M0MP28username4core9JsCodegen5write(self, _M0FP28username4core9js__ident(name$3));
|
|
7886
|
-
_M0MP28username4core9JsCodegen5write(self, " = ");
|
|
7887
|
-
_M0MP28username4core9JsCodegen9gen__expr(self, start);
|
|
7888
|
-
_M0MP28username4core9JsCodegen5write(self, "; ");
|
|
7889
|
-
_M0MP28username4core9JsCodegen5write(self, _M0FP28username4core9js__ident(name$3));
|
|
7890
|
-
_M0MP28username4core9JsCodegen5write(self, " < ");
|
|
7891
|
-
_M0MP28username4core9JsCodegen9gen__expr(self, end);
|
|
7892
|
-
_M0MP28username4core9JsCodegen5write(self, "; ");
|
|
7893
|
-
_M0MP28username4core9JsCodegen5write(self, _M0FP28username4core9js__ident(name$3));
|
|
7894
|
-
_M0MP28username4core9JsCodegen5write(self, "++) {\n");
|
|
7895
|
-
self.indent_level = self.indent_level + 1 | 0;
|
|
7896
|
-
const _arr = body$2;
|
|
7897
|
-
const _len = _arr.length;
|
|
7898
|
-
let _tmp = 0;
|
|
7899
|
-
while (true) {
|
|
7900
|
-
const _i = _tmp;
|
|
7901
|
-
if (_i < _len) {
|
|
7902
|
-
const s = _arr[_i];
|
|
7903
|
-
_M0MP28username4core9JsCodegen9gen__stmt(self, s);
|
|
7904
|
-
_tmp = _i + 1 | 0;
|
|
7905
|
-
continue;
|
|
7906
|
-
} else {
|
|
7907
|
-
break;
|
|
7908
|
-
}
|
|
7909
|
-
}
|
|
7910
|
-
self.indent_level = self.indent_level - 1 | 0;
|
|
7911
|
-
_M0MP28username4core9JsCodegen7writeln(self, "}");
|
|
8299
|
+
_M0MP28username4core9JsCodegen10gen__match(self, subject, arms);
|
|
7912
8300
|
return;
|
|
7913
8301
|
}
|
|
7914
|
-
|
|
8302
|
+
_M0MP28username4core9JsCodegen13write__indent(self);
|
|
8303
|
+
_M0MP28username4core9JsCodegen5write(self, "if (");
|
|
8304
|
+
_M0MP28username4core9JsCodegen9gen__expr(self, cond$2);
|
|
8305
|
+
_M0MP28username4core9JsCodegen5write(self, ") ");
|
|
8306
|
+
_M0MP28username4core9JsCodegen17gen__stmt__inline(self, inner$5);
|
|
8307
|
+
_M0MP28username4core9JsCodegen5write(self, "\n");
|
|
7915
8308
|
return;
|
|
7916
8309
|
}
|
|
7917
8310
|
_M0MP28username4core9JsCodegen13write__indent(self);
|
|
7918
|
-
_M0MP28username4core9JsCodegen5write(self, "if (");
|
|
7919
|
-
_M0MP28username4core9JsCodegen9gen__expr(self, cond
|
|
7920
|
-
_M0MP28username4core9JsCodegen5write(self, ") ");
|
|
7921
|
-
_M0MP28username4core9JsCodegen17gen__stmt__inline(self, inner$
|
|
8311
|
+
_M0MP28username4core9JsCodegen5write(self, "if (!(");
|
|
8312
|
+
_M0MP28username4core9JsCodegen9gen__expr(self, cond);
|
|
8313
|
+
_M0MP28username4core9JsCodegen5write(self, ")) ");
|
|
8314
|
+
_M0MP28username4core9JsCodegen17gen__stmt__inline(self, inner$4);
|
|
7922
8315
|
_M0MP28username4core9JsCodegen5write(self, "\n");
|
|
7923
8316
|
return;
|
|
7924
8317
|
}
|
|
7925
8318
|
_M0MP28username4core9JsCodegen13write__indent(self);
|
|
7926
|
-
_M0MP28username4core9JsCodegen5write(self, "
|
|
7927
|
-
|
|
7928
|
-
_M0MP28username4core9JsCodegen5write(self, "
|
|
7929
|
-
|
|
8319
|
+
_M0MP28username4core9JsCodegen5write(self, "for (const ");
|
|
8320
|
+
_M0MP28username4core9JsCodegen5write(self, _M0FP28username4core9js__ident(name$2));
|
|
8321
|
+
_M0MP28username4core9JsCodegen5write(self, " of ");
|
|
8322
|
+
_M0MP28username4core9JsCodegen9gen__expr(self, iter);
|
|
8323
|
+
_M0MP28username4core9JsCodegen5write(self, ") ");
|
|
8324
|
+
_M0MP28username4core9JsCodegen17gen__stmt__inline(self, inner$3);
|
|
7930
8325
|
_M0MP28username4core9JsCodegen5write(self, "\n");
|
|
7931
8326
|
return;
|
|
7932
8327
|
}
|
|
7933
|
-
|
|
7934
|
-
|
|
7935
|
-
|
|
7936
|
-
|
|
7937
|
-
|
|
7938
|
-
|
|
7939
|
-
|
|
7940
|
-
|
|
7941
|
-
|
|
7942
|
-
|
|
7943
|
-
|
|
7944
|
-
|
|
7945
|
-
|
|
7946
|
-
|
|
7947
|
-
|
|
7948
|
-
while (true) {
|
|
7949
|
-
const _i = _tmp;
|
|
7950
|
-
if (_i < _len) {
|
|
7951
|
-
const s = _arr[_i];
|
|
7952
|
-
_M0MP28username4core9JsCodegen9gen__stmt(self, s);
|
|
7953
|
-
_tmp = _i + 1 | 0;
|
|
7954
|
-
continue;
|
|
7955
|
-
} else {
|
|
7956
|
-
break;
|
|
8328
|
+
_M0MP28username4core9JsCodegen7writeln(self, "try {");
|
|
8329
|
+
self.indent_level = self.indent_level + 1 | 0;
|
|
8330
|
+
const _arr = try_body;
|
|
8331
|
+
const _len = _arr.length;
|
|
8332
|
+
let _tmp = 0;
|
|
8333
|
+
while (true) {
|
|
8334
|
+
const _i = _tmp;
|
|
8335
|
+
if (_i < _len) {
|
|
8336
|
+
const s = _arr[_i];
|
|
8337
|
+
_M0MP28username4core9JsCodegen9gen__stmt(self, s);
|
|
8338
|
+
_tmp = _i + 1 | 0;
|
|
8339
|
+
continue;
|
|
8340
|
+
} else {
|
|
8341
|
+
break;
|
|
8342
|
+
}
|
|
7957
8343
|
}
|
|
7958
|
-
|
|
7959
|
-
|
|
7960
|
-
|
|
7961
|
-
|
|
7962
|
-
|
|
7963
|
-
let n;
|
|
7964
|
-
_L$11: {
|
|
8344
|
+
self.indent_level = self.indent_level - 1 | 0;
|
|
8345
|
+
_M0MP28username4core9JsCodegen13write__indent(self);
|
|
8346
|
+
_M0MP28username4core9JsCodegen5write(self, "} catch (");
|
|
8347
|
+
let _tmp$2;
|
|
8348
|
+
let n;
|
|
7965
8349
|
_L$12: {
|
|
7966
|
-
|
|
7967
|
-
|
|
7968
|
-
|
|
7969
|
-
|
|
7970
|
-
|
|
7971
|
-
|
|
8350
|
+
_L$13: {
|
|
8351
|
+
if (catch_name === undefined) {
|
|
8352
|
+
_tmp$2 = "e";
|
|
8353
|
+
} else {
|
|
8354
|
+
const _Some = catch_name;
|
|
8355
|
+
const _n = _Some;
|
|
8356
|
+
n = _n;
|
|
8357
|
+
break _L$13;
|
|
8358
|
+
}
|
|
7972
8359
|
break _L$12;
|
|
7973
8360
|
}
|
|
7974
|
-
|
|
8361
|
+
_tmp$2 = _M0FP28username4core9js__ident(n);
|
|
7975
8362
|
}
|
|
7976
|
-
_tmp$2
|
|
7977
|
-
|
|
7978
|
-
|
|
7979
|
-
|
|
7980
|
-
|
|
7981
|
-
|
|
7982
|
-
|
|
7983
|
-
|
|
7984
|
-
|
|
7985
|
-
|
|
7986
|
-
|
|
7987
|
-
|
|
7988
|
-
|
|
7989
|
-
|
|
7990
|
-
|
|
7991
|
-
|
|
7992
|
-
break;
|
|
8363
|
+
_M0MP28username4core9JsCodegen5write(self, _tmp$2);
|
|
8364
|
+
_M0MP28username4core9JsCodegen5write(self, ") {\n");
|
|
8365
|
+
self.indent_level = self.indent_level + 1 | 0;
|
|
8366
|
+
const _arr$2 = catch_body;
|
|
8367
|
+
const _len$2 = _arr$2.length;
|
|
8368
|
+
let _tmp$3 = 0;
|
|
8369
|
+
while (true) {
|
|
8370
|
+
const _i = _tmp$3;
|
|
8371
|
+
if (_i < _len$2) {
|
|
8372
|
+
const s = _arr$2[_i];
|
|
8373
|
+
_M0MP28username4core9JsCodegen9gen__stmt(self, s);
|
|
8374
|
+
_tmp$3 = _i + 1 | 0;
|
|
8375
|
+
continue;
|
|
8376
|
+
} else {
|
|
8377
|
+
break;
|
|
8378
|
+
}
|
|
7993
8379
|
}
|
|
7994
|
-
|
|
7995
|
-
|
|
7996
|
-
|
|
7997
|
-
|
|
7998
|
-
|
|
7999
|
-
|
|
8000
|
-
|
|
8001
|
-
|
|
8002
|
-
|
|
8003
|
-
|
|
8004
|
-
|
|
8005
|
-
|
|
8380
|
+
self.indent_level = self.indent_level - 1 | 0;
|
|
8381
|
+
let fb;
|
|
8382
|
+
_L$13: {
|
|
8383
|
+
if (finally_body.$tag === 1) {
|
|
8384
|
+
const _Some = finally_body;
|
|
8385
|
+
const _fb = _Some._0;
|
|
8386
|
+
fb = _fb;
|
|
8387
|
+
break _L$13;
|
|
8388
|
+
} else {
|
|
8389
|
+
_M0MP28username4core9JsCodegen7writeln(self, "}");
|
|
8390
|
+
return;
|
|
8391
|
+
}
|
|
8006
8392
|
}
|
|
8007
|
-
|
|
8008
|
-
|
|
8009
|
-
|
|
8010
|
-
|
|
8011
|
-
|
|
8012
|
-
|
|
8013
|
-
|
|
8014
|
-
|
|
8015
|
-
|
|
8016
|
-
|
|
8017
|
-
|
|
8018
|
-
|
|
8019
|
-
|
|
8020
|
-
|
|
8021
|
-
|
|
8393
|
+
_M0MP28username4core9JsCodegen7writeln(self, "} finally {");
|
|
8394
|
+
self.indent_level = self.indent_level + 1 | 0;
|
|
8395
|
+
const _arr$3 = fb;
|
|
8396
|
+
const _len$3 = _arr$3.length;
|
|
8397
|
+
let _tmp$4 = 0;
|
|
8398
|
+
while (true) {
|
|
8399
|
+
const _i = _tmp$4;
|
|
8400
|
+
if (_i < _len$3) {
|
|
8401
|
+
const s = _arr$3[_i];
|
|
8402
|
+
_M0MP28username4core9JsCodegen9gen__stmt(self, s);
|
|
8403
|
+
_tmp$4 = _i + 1 | 0;
|
|
8404
|
+
continue;
|
|
8405
|
+
} else {
|
|
8406
|
+
break;
|
|
8407
|
+
}
|
|
8022
8408
|
}
|
|
8409
|
+
self.indent_level = self.indent_level - 1 | 0;
|
|
8410
|
+
_M0MP28username4core9JsCodegen7writeln(self, "}");
|
|
8411
|
+
return;
|
|
8023
8412
|
}
|
|
8024
|
-
self
|
|
8025
|
-
|
|
8413
|
+
_M0MP28username4core9JsCodegen13write__indent(self);
|
|
8414
|
+
_M0MP28username4core9JsCodegen5write(self, "throw ");
|
|
8415
|
+
_M0MP28username4core9JsCodegen9gen__expr(self, expr$3);
|
|
8416
|
+
_M0MP28username4core9JsCodegen5write(self, ";\n");
|
|
8026
8417
|
return;
|
|
8027
8418
|
}
|
|
8028
8419
|
_M0MP28username4core9JsCodegen13write__indent(self);
|
|
8029
|
-
|
|
8030
|
-
|
|
8420
|
+
let v;
|
|
8421
|
+
_L$10: {
|
|
8422
|
+
if (value === undefined) {
|
|
8423
|
+
_M0MP28username4core9JsCodegen5write(self, "return;\n");
|
|
8424
|
+
return;
|
|
8425
|
+
} else {
|
|
8426
|
+
const _Some = value;
|
|
8427
|
+
const _v = _Some;
|
|
8428
|
+
v = _v;
|
|
8429
|
+
break _L$10;
|
|
8430
|
+
}
|
|
8431
|
+
}
|
|
8432
|
+
_M0MP28username4core9JsCodegen5write(self, "return ");
|
|
8433
|
+
_M0MP28username4core9JsCodegen9gen__expr(self, v);
|
|
8031
8434
|
_M0MP28username4core9JsCodegen5write(self, ";\n");
|
|
8032
8435
|
return;
|
|
8033
8436
|
}
|
|
8034
8437
|
_M0MP28username4core9JsCodegen13write__indent(self);
|
|
8035
|
-
|
|
8036
|
-
_L$9: {
|
|
8037
|
-
if (value === undefined) {
|
|
8038
|
-
_M0MP28username4core9JsCodegen5write(self, "return;\n");
|
|
8039
|
-
return;
|
|
8040
|
-
} else {
|
|
8041
|
-
const _Some = value;
|
|
8042
|
-
const _v = _Some;
|
|
8043
|
-
v = _v;
|
|
8044
|
-
break _L$9;
|
|
8045
|
-
}
|
|
8046
|
-
}
|
|
8047
|
-
_M0MP28username4core9JsCodegen5write(self, "return ");
|
|
8048
|
-
_M0MP28username4core9JsCodegen9gen__expr(self, v);
|
|
8438
|
+
_M0MP28username4core9JsCodegen9gen__expr(self, expr$2);
|
|
8049
8439
|
_M0MP28username4core9JsCodegen5write(self, ";\n");
|
|
8050
8440
|
return;
|
|
8051
8441
|
}
|
|
8052
|
-
|
|
8053
|
-
_M0MP28username4core9JsCodegen9gen__expr(self, expr$2);
|
|
8054
|
-
_M0MP28username4core9JsCodegen5write(self, ";\n");
|
|
8442
|
+
_M0MP28username4core9JsCodegen11gen__import(self, decl$2);
|
|
8055
8443
|
return;
|
|
8056
8444
|
}
|
|
8057
|
-
|
|
8058
|
-
|
|
8059
|
-
|
|
8060
|
-
|
|
8061
|
-
|
|
8062
|
-
|
|
8063
|
-
|
|
8064
|
-
|
|
8065
|
-
|
|
8066
|
-
|
|
8067
|
-
|
|
8068
|
-
|
|
8069
|
-
|
|
8070
|
-
|
|
8071
|
-
|
|
8072
|
-
|
|
8073
|
-
|
|
8074
|
-
|
|
8075
|
-
|
|
8076
|
-
|
|
8077
|
-
|
|
8078
|
-
|
|
8079
|
-
|
|
8080
|
-
|
|
8081
|
-
|
|
8082
|
-
|
|
8083
|
-
|
|
8084
|
-
|
|
8085
|
-
|
|
8086
|
-
|
|
8087
|
-
p = _p;
|
|
8088
|
-
break _L$7;
|
|
8445
|
+
const _bind = ".";
|
|
8446
|
+
const _tmp = { str: _bind, start: 0, end: _bind.length };
|
|
8447
|
+
const _bind$2 = "/";
|
|
8448
|
+
const module_path = _M0MP311moonbitlang4core6string6String12replace__all(path, _tmp, { str: _bind$2, start: 0, end: _bind$2.length });
|
|
8449
|
+
let ns;
|
|
8450
|
+
_L$7: {
|
|
8451
|
+
if (names.$tag === 1) {
|
|
8452
|
+
const _Some = names;
|
|
8453
|
+
const _ns = _Some._0;
|
|
8454
|
+
ns = _ns;
|
|
8455
|
+
break _L$7;
|
|
8456
|
+
} else {
|
|
8457
|
+
_M0MP28username4core9JsCodegen13write__indent(self);
|
|
8458
|
+
_M0MP28username4core9JsCodegen5write(self, "import * as ");
|
|
8459
|
+
const last = { val: path };
|
|
8460
|
+
const _bind$3 = ".";
|
|
8461
|
+
const parts = _M0MP311moonbitlang4core6string6String5split(path, { str: _bind$3, start: 0, end: _bind$3.length });
|
|
8462
|
+
const _it = parts;
|
|
8463
|
+
while (true) {
|
|
8464
|
+
let p;
|
|
8465
|
+
_L$8: {
|
|
8466
|
+
const _bind$4 = _M0MP311moonbitlang4core7builtin4Iter4nextGRP311moonbitlang4core6string10StringViewE(_it);
|
|
8467
|
+
if (_bind$4 === undefined) {
|
|
8468
|
+
break;
|
|
8469
|
+
} else {
|
|
8470
|
+
const _Some = _bind$4;
|
|
8471
|
+
const _p = _Some;
|
|
8472
|
+
p = _p;
|
|
8473
|
+
break _L$8;
|
|
8474
|
+
}
|
|
8089
8475
|
}
|
|
8476
|
+
last.val = _M0IP311moonbitlang4core6string10StringViewP311moonbitlang4core7builtin4Show10to__string(p);
|
|
8477
|
+
continue;
|
|
8478
|
+
}
|
|
8479
|
+
_M0MP28username4core9JsCodegen5write(self, last.val);
|
|
8480
|
+
_M0MP28username4core9JsCodegen5write(self, " from \"");
|
|
8481
|
+
_M0MP28username4core9JsCodegen5write(self, module_path);
|
|
8482
|
+
_M0MP28username4core9JsCodegen5write(self, "\";\n");
|
|
8483
|
+
return;
|
|
8484
|
+
}
|
|
8485
|
+
}
|
|
8486
|
+
_M0MP28username4core9JsCodegen13write__indent(self);
|
|
8487
|
+
_M0MP28username4core9JsCodegen5write(self, "import { ");
|
|
8488
|
+
const first = { val: true };
|
|
8489
|
+
const _arr = ns;
|
|
8490
|
+
const _len = _arr.length;
|
|
8491
|
+
let _tmp$2 = 0;
|
|
8492
|
+
while (true) {
|
|
8493
|
+
const _i = _tmp$2;
|
|
8494
|
+
if (_i < _len) {
|
|
8495
|
+
const n = _arr[_i];
|
|
8496
|
+
if (!first.val) {
|
|
8497
|
+
_M0MP28username4core9JsCodegen5write(self, ", ");
|
|
8090
8498
|
}
|
|
8091
|
-
|
|
8499
|
+
_M0MP28username4core9JsCodegen5write(self, n);
|
|
8500
|
+
first.val = false;
|
|
8501
|
+
_tmp$2 = _i + 1 | 0;
|
|
8092
8502
|
continue;
|
|
8503
|
+
} else {
|
|
8504
|
+
break;
|
|
8093
8505
|
}
|
|
8094
|
-
_M0MP28username4core9JsCodegen5write(self, last.val);
|
|
8095
|
-
_M0MP28username4core9JsCodegen5write(self, " from \"");
|
|
8096
|
-
_M0MP28username4core9JsCodegen5write(self, module_path);
|
|
8097
|
-
_M0MP28username4core9JsCodegen5write(self, "\";\n");
|
|
8098
|
-
return;
|
|
8099
8506
|
}
|
|
8507
|
+
_M0MP28username4core9JsCodegen5write(self, " } from \"");
|
|
8508
|
+
_M0MP28username4core9JsCodegen5write(self, module_path);
|
|
8509
|
+
_M0MP28username4core9JsCodegen5write(self, "\";\n");
|
|
8510
|
+
return;
|
|
8100
8511
|
}
|
|
8101
8512
|
_M0MP28username4core9JsCodegen13write__indent(self);
|
|
8102
|
-
_M0MP28username4core9JsCodegen5write(self, "
|
|
8103
|
-
|
|
8104
|
-
|
|
8513
|
+
_M0MP28username4core9JsCodegen5write(self, "const ");
|
|
8514
|
+
_M0MP28username4core9JsCodegen5write(self, _M0FP28username4core9js__ident(name));
|
|
8515
|
+
_M0MP28username4core9JsCodegen5write(self, " = (() => {\n");
|
|
8516
|
+
self.indent_level = self.indent_level + 1 | 0;
|
|
8517
|
+
const _arr = body;
|
|
8105
8518
|
const _len = _arr.length;
|
|
8106
|
-
let _tmp
|
|
8519
|
+
let _tmp = 0;
|
|
8107
8520
|
while (true) {
|
|
8108
|
-
const _i = _tmp
|
|
8521
|
+
const _i = _tmp;
|
|
8109
8522
|
if (_i < _len) {
|
|
8110
|
-
const
|
|
8111
|
-
|
|
8112
|
-
|
|
8113
|
-
}
|
|
8114
|
-
_M0MP28username4core9JsCodegen5write(self, n);
|
|
8115
|
-
first.val = false;
|
|
8116
|
-
_tmp$2 = _i + 1 | 0;
|
|
8523
|
+
const s = _arr[_i];
|
|
8524
|
+
_M0MP28username4core9JsCodegen9gen__stmt(self, s);
|
|
8525
|
+
_tmp = _i + 1 | 0;
|
|
8117
8526
|
continue;
|
|
8118
8527
|
} else {
|
|
8119
8528
|
break;
|
|
8120
8529
|
}
|
|
8121
8530
|
}
|
|
8122
|
-
|
|
8123
|
-
|
|
8124
|
-
_M0MP28username4core9JsCodegen5write(self, "\";\n");
|
|
8531
|
+
self.indent_level = self.indent_level - 1 | 0;
|
|
8532
|
+
_M0MP28username4core9JsCodegen7writeln(self, "})();");
|
|
8125
8533
|
return;
|
|
8126
8534
|
}
|
|
8127
8535
|
_M0MP28username4core9JsCodegen13write__indent(self);
|
|
8128
|
-
_M0MP28username4core9JsCodegen5write(self, "
|
|
8129
|
-
|
|
8130
|
-
_M0MP28username4core9JsCodegen5write(self, "
|
|
8131
|
-
self.indent_level = self.indent_level + 1 | 0;
|
|
8132
|
-
const _arr = body;
|
|
8133
|
-
const _len = _arr.length;
|
|
8134
|
-
let _tmp = 0;
|
|
8135
|
-
while (true) {
|
|
8136
|
-
const _i = _tmp;
|
|
8137
|
-
if (_i < _len) {
|
|
8138
|
-
const s = _arr[_i];
|
|
8139
|
-
_M0MP28username4core9JsCodegen9gen__stmt(self, s);
|
|
8140
|
-
_tmp = _i + 1 | 0;
|
|
8141
|
-
continue;
|
|
8142
|
-
} else {
|
|
8143
|
-
break;
|
|
8144
|
-
}
|
|
8145
|
-
}
|
|
8146
|
-
self.indent_level = self.indent_level - 1 | 0;
|
|
8147
|
-
_M0MP28username4core9JsCodegen7writeln(self, "})();");
|
|
8536
|
+
_M0MP28username4core9JsCodegen5write(self, "export default ");
|
|
8537
|
+
_M0MP28username4core9JsCodegen17gen__stmt__inline(self, inner$2);
|
|
8538
|
+
_M0MP28username4core9JsCodegen5write(self, "\n");
|
|
8148
8539
|
return;
|
|
8149
8540
|
}
|
|
8150
8541
|
_M0MP28username4core9JsCodegen13write__indent(self);
|
|
8151
|
-
_M0MP28username4core9JsCodegen5write(self, "export
|
|
8152
|
-
_M0MP28username4core9JsCodegen17gen__stmt__inline(self, inner
|
|
8542
|
+
_M0MP28username4core9JsCodegen5write(self, "export ");
|
|
8543
|
+
_M0MP28username4core9JsCodegen17gen__stmt__inline(self, inner);
|
|
8153
8544
|
_M0MP28username4core9JsCodegen5write(self, "\n");
|
|
8154
8545
|
return;
|
|
8155
8546
|
}
|
|
8156
|
-
|
|
8157
|
-
_M0MP28username4core9JsCodegen5write(self, "export ");
|
|
8158
|
-
_M0MP28username4core9JsCodegen17gen__stmt__inline(self, inner);
|
|
8159
|
-
_M0MP28username4core9JsCodegen5write(self, "\n");
|
|
8547
|
+
_M0MP28username4core9JsCodegen16gen__class__decl(self, decl);
|
|
8160
8548
|
return;
|
|
8161
8549
|
}
|
|
8162
8550
|
_M0MP28username4core9JsCodegen13write__indent(self);
|
|
@@ -8164,6 +8552,292 @@ function _M0MP28username4core9JsCodegen9gen__stmt(self, stmt) {
|
|
|
8164
8552
|
_M0MP28username4core9JsCodegen9gen__expr(self, expr);
|
|
8165
8553
|
_M0MP28username4core9JsCodegen5write(self, ";\n");
|
|
8166
8554
|
}
|
|
8555
|
+
function _M0MP28username4core9JsCodegen16gen__class__decl(self, decl) {
|
|
8556
|
+
const saved_private = self.private_fields;
|
|
8557
|
+
self.private_fields = [];
|
|
8558
|
+
const _arr = decl.members;
|
|
8559
|
+
const _len = _arr.length;
|
|
8560
|
+
let _tmp = 0;
|
|
8561
|
+
while (true) {
|
|
8562
|
+
const _i = _tmp;
|
|
8563
|
+
if (_i < _len) {
|
|
8564
|
+
const mbr = _arr[_i];
|
|
8565
|
+
let name;
|
|
8566
|
+
_L: {
|
|
8567
|
+
_L$2: {
|
|
8568
|
+
if (mbr.$tag === 0) {
|
|
8569
|
+
const _Field = mbr;
|
|
8570
|
+
const _x = _Field._0;
|
|
8571
|
+
if (_x === true) {
|
|
8572
|
+
const _name = _Field._1;
|
|
8573
|
+
name = _name;
|
|
8574
|
+
break _L$2;
|
|
8575
|
+
}
|
|
8576
|
+
}
|
|
8577
|
+
break _L;
|
|
8578
|
+
}
|
|
8579
|
+
_M0MP311moonbitlang4core5array5Array4pushGsE(self.private_fields, name);
|
|
8580
|
+
}
|
|
8581
|
+
_tmp = _i + 1 | 0;
|
|
8582
|
+
continue;
|
|
8583
|
+
} else {
|
|
8584
|
+
break;
|
|
8585
|
+
}
|
|
8586
|
+
}
|
|
8587
|
+
_M0MP28username4core9JsCodegen13write__indent(self);
|
|
8588
|
+
_M0MP28username4core9JsCodegen5write(self, "class ");
|
|
8589
|
+
_M0MP28username4core9JsCodegen5write(self, _M0FP28username4core9js__ident(decl.name));
|
|
8590
|
+
let p;
|
|
8591
|
+
_L: {
|
|
8592
|
+
_L$2: {
|
|
8593
|
+
const _bind = decl.parent;
|
|
8594
|
+
if (_bind === undefined) {
|
|
8595
|
+
} else {
|
|
8596
|
+
const _Some = _bind;
|
|
8597
|
+
const _p = _Some;
|
|
8598
|
+
p = _p;
|
|
8599
|
+
break _L$2;
|
|
8600
|
+
}
|
|
8601
|
+
break _L;
|
|
8602
|
+
}
|
|
8603
|
+
_M0MP28username4core9JsCodegen5write(self, " extends ");
|
|
8604
|
+
_M0MP28username4core9JsCodegen5write(self, _M0FP28username4core9js__ident(p));
|
|
8605
|
+
}
|
|
8606
|
+
_M0MP28username4core9JsCodegen5write(self, " {\n");
|
|
8607
|
+
self.indent_level = self.indent_level + 1 | 0;
|
|
8608
|
+
const _arr$2 = decl.members;
|
|
8609
|
+
const _len$2 = _arr$2.length;
|
|
8610
|
+
let _tmp$2 = 0;
|
|
8611
|
+
while (true) {
|
|
8612
|
+
const _i = _tmp$2;
|
|
8613
|
+
if (_i < _len$2) {
|
|
8614
|
+
const mbr = _arr$2[_i];
|
|
8615
|
+
let param;
|
|
8616
|
+
let name;
|
|
8617
|
+
let body;
|
|
8618
|
+
_L$2: {
|
|
8619
|
+
_L$3: {
|
|
8620
|
+
let name$2;
|
|
8621
|
+
let body$2;
|
|
8622
|
+
_L$4: {
|
|
8623
|
+
_L$5: {
|
|
8624
|
+
let params;
|
|
8625
|
+
let is_async;
|
|
8626
|
+
let is_static;
|
|
8627
|
+
let name$3;
|
|
8628
|
+
let body$3;
|
|
8629
|
+
_L$6: {
|
|
8630
|
+
_L$7: {
|
|
8631
|
+
let params$2;
|
|
8632
|
+
let body$4;
|
|
8633
|
+
_L$8: {
|
|
8634
|
+
_L$9: {
|
|
8635
|
+
let name$4;
|
|
8636
|
+
let is_private;
|
|
8637
|
+
let default_val;
|
|
8638
|
+
_L$10: {
|
|
8639
|
+
switch (mbr.$tag) {
|
|
8640
|
+
case 0: {
|
|
8641
|
+
const _Field = mbr;
|
|
8642
|
+
const _is_private = _Field._0;
|
|
8643
|
+
const _name = _Field._1;
|
|
8644
|
+
const _default_val = _Field._2;
|
|
8645
|
+
name$4 = _name;
|
|
8646
|
+
is_private = _is_private;
|
|
8647
|
+
default_val = _default_val;
|
|
8648
|
+
break _L$10;
|
|
8649
|
+
}
|
|
8650
|
+
case 1: {
|
|
8651
|
+
const _Constructor = mbr;
|
|
8652
|
+
const _params = _Constructor._0;
|
|
8653
|
+
const _body = _Constructor._1;
|
|
8654
|
+
params$2 = _params;
|
|
8655
|
+
body$4 = _body;
|
|
8656
|
+
break _L$9;
|
|
8657
|
+
}
|
|
8658
|
+
case 2: {
|
|
8659
|
+
const _Method = mbr;
|
|
8660
|
+
const _is_static = _Method._0;
|
|
8661
|
+
const _is_async = _Method._1;
|
|
8662
|
+
const _name$2 = _Method._2;
|
|
8663
|
+
const _params$2 = _Method._3;
|
|
8664
|
+
const _body$2 = _Method._4;
|
|
8665
|
+
params = _params$2;
|
|
8666
|
+
is_async = _is_async;
|
|
8667
|
+
is_static = _is_static;
|
|
8668
|
+
name$3 = _name$2;
|
|
8669
|
+
body$3 = _body$2;
|
|
8670
|
+
break _L$7;
|
|
8671
|
+
}
|
|
8672
|
+
case 3: {
|
|
8673
|
+
const _Getter = mbr;
|
|
8674
|
+
const _name$3 = _Getter._0;
|
|
8675
|
+
const _body$3 = _Getter._1;
|
|
8676
|
+
name$2 = _name$3;
|
|
8677
|
+
body$2 = _body$3;
|
|
8678
|
+
break _L$5;
|
|
8679
|
+
}
|
|
8680
|
+
default: {
|
|
8681
|
+
const _Setter = mbr;
|
|
8682
|
+
const _name$4 = _Setter._0;
|
|
8683
|
+
const _param = _Setter._1;
|
|
8684
|
+
const _body$4 = _Setter._2;
|
|
8685
|
+
param = _param;
|
|
8686
|
+
name = _name$4;
|
|
8687
|
+
body = _body$4;
|
|
8688
|
+
break _L$3;
|
|
8689
|
+
}
|
|
8690
|
+
}
|
|
8691
|
+
}
|
|
8692
|
+
_M0MP28username4core9JsCodegen13write__indent(self);
|
|
8693
|
+
if (is_private) {
|
|
8694
|
+
_M0MP28username4core9JsCodegen5write(self, "#");
|
|
8695
|
+
}
|
|
8696
|
+
_M0MP28username4core9JsCodegen5write(self, _M0FP28username4core9js__ident(name$4));
|
|
8697
|
+
let v;
|
|
8698
|
+
_L$11: {
|
|
8699
|
+
_L$12: {
|
|
8700
|
+
if (default_val === undefined) {
|
|
8701
|
+
} else {
|
|
8702
|
+
const _Some = default_val;
|
|
8703
|
+
const _v = _Some;
|
|
8704
|
+
v = _v;
|
|
8705
|
+
break _L$12;
|
|
8706
|
+
}
|
|
8707
|
+
break _L$11;
|
|
8708
|
+
}
|
|
8709
|
+
_M0MP28username4core9JsCodegen5write(self, " = ");
|
|
8710
|
+
_M0MP28username4core9JsCodegen9gen__expr(self, v);
|
|
8711
|
+
}
|
|
8712
|
+
_M0MP28username4core9JsCodegen5write(self, ";\n");
|
|
8713
|
+
break _L$8;
|
|
8714
|
+
}
|
|
8715
|
+
_M0MP28username4core9JsCodegen13write__indent(self);
|
|
8716
|
+
_M0MP28username4core9JsCodegen5write(self, "constructor(");
|
|
8717
|
+
const first = { val: true };
|
|
8718
|
+
const _arr$3 = params$2;
|
|
8719
|
+
const _len$3 = _arr$3.length;
|
|
8720
|
+
let _tmp$3 = 0;
|
|
8721
|
+
while (true) {
|
|
8722
|
+
const _i$2 = _tmp$3;
|
|
8723
|
+
if (_i$2 < _len$3) {
|
|
8724
|
+
const p$2 = _arr$3[_i$2];
|
|
8725
|
+
if (!first.val) {
|
|
8726
|
+
_M0MP28username4core9JsCodegen5write(self, ", ");
|
|
8727
|
+
}
|
|
8728
|
+
_M0MP28username4core9JsCodegen5write(self, _M0FP28username4core9js__ident(p$2));
|
|
8729
|
+
first.val = false;
|
|
8730
|
+
_tmp$3 = _i$2 + 1 | 0;
|
|
8731
|
+
continue;
|
|
8732
|
+
} else {
|
|
8733
|
+
break;
|
|
8734
|
+
}
|
|
8735
|
+
}
|
|
8736
|
+
_M0MP28username4core9JsCodegen5write(self, ") ");
|
|
8737
|
+
_M0MP28username4core9JsCodegen16gen__class__body(self, body$4);
|
|
8738
|
+
}
|
|
8739
|
+
break _L$6;
|
|
8740
|
+
}
|
|
8741
|
+
_M0MP28username4core9JsCodegen13write__indent(self);
|
|
8742
|
+
if (is_static) {
|
|
8743
|
+
_M0MP28username4core9JsCodegen5write(self, "static ");
|
|
8744
|
+
}
|
|
8745
|
+
if (is_async) {
|
|
8746
|
+
_M0MP28username4core9JsCodegen5write(self, "async ");
|
|
8747
|
+
}
|
|
8748
|
+
_M0MP28username4core9JsCodegen5write(self, _M0FP28username4core9js__ident(name$3));
|
|
8749
|
+
_M0MP28username4core9JsCodegen5write(self, "(");
|
|
8750
|
+
const first = { val: true };
|
|
8751
|
+
const _arr$3 = params;
|
|
8752
|
+
const _len$3 = _arr$3.length;
|
|
8753
|
+
let _tmp$3 = 0;
|
|
8754
|
+
while (true) {
|
|
8755
|
+
const _i$2 = _tmp$3;
|
|
8756
|
+
if (_i$2 < _len$3) {
|
|
8757
|
+
const p$2 = _arr$3[_i$2];
|
|
8758
|
+
if (!first.val) {
|
|
8759
|
+
_M0MP28username4core9JsCodegen5write(self, ", ");
|
|
8760
|
+
}
|
|
8761
|
+
_M0MP28username4core9JsCodegen5write(self, _M0FP28username4core9js__ident(p$2));
|
|
8762
|
+
first.val = false;
|
|
8763
|
+
_tmp$3 = _i$2 + 1 | 0;
|
|
8764
|
+
continue;
|
|
8765
|
+
} else {
|
|
8766
|
+
break;
|
|
8767
|
+
}
|
|
8768
|
+
}
|
|
8769
|
+
_M0MP28username4core9JsCodegen5write(self, ") ");
|
|
8770
|
+
_M0MP28username4core9JsCodegen16gen__class__body(self, body$3);
|
|
8771
|
+
}
|
|
8772
|
+
break _L$4;
|
|
8773
|
+
}
|
|
8774
|
+
_M0MP28username4core9JsCodegen13write__indent(self);
|
|
8775
|
+
_M0MP28username4core9JsCodegen5write(self, "get ");
|
|
8776
|
+
_M0MP28username4core9JsCodegen5write(self, _M0FP28username4core9js__ident(name$2));
|
|
8777
|
+
_M0MP28username4core9JsCodegen5write(self, "() ");
|
|
8778
|
+
_M0MP28username4core9JsCodegen16gen__class__body(self, body$2);
|
|
8779
|
+
}
|
|
8780
|
+
break _L$2;
|
|
8781
|
+
}
|
|
8782
|
+
_M0MP28username4core9JsCodegen13write__indent(self);
|
|
8783
|
+
_M0MP28username4core9JsCodegen5write(self, "set ");
|
|
8784
|
+
_M0MP28username4core9JsCodegen5write(self, _M0FP28username4core9js__ident(name));
|
|
8785
|
+
_M0MP28username4core9JsCodegen5write(self, "(");
|
|
8786
|
+
_M0MP28username4core9JsCodegen5write(self, _M0FP28username4core9js__ident(param));
|
|
8787
|
+
_M0MP28username4core9JsCodegen5write(self, ") ");
|
|
8788
|
+
_M0MP28username4core9JsCodegen16gen__class__body(self, body);
|
|
8789
|
+
}
|
|
8790
|
+
_tmp$2 = _i + 1 | 0;
|
|
8791
|
+
continue;
|
|
8792
|
+
} else {
|
|
8793
|
+
break;
|
|
8794
|
+
}
|
|
8795
|
+
}
|
|
8796
|
+
self.indent_level = self.indent_level - 1 | 0;
|
|
8797
|
+
_M0MP28username4core9JsCodegen7writeln(self, "}");
|
|
8798
|
+
self.private_fields = saved_private;
|
|
8799
|
+
}
|
|
8800
|
+
function _M0MP28username4core9JsCodegen16gen__class__body(self, body) {
|
|
8801
|
+
let stmts;
|
|
8802
|
+
_L: {
|
|
8803
|
+
let expr;
|
|
8804
|
+
_L$2: {
|
|
8805
|
+
if (body.$tag === 1) {
|
|
8806
|
+
const _ToExpr = body;
|
|
8807
|
+
const _expr = _ToExpr._0;
|
|
8808
|
+
expr = _expr;
|
|
8809
|
+
break _L$2;
|
|
8810
|
+
} else {
|
|
8811
|
+
const _Block = body;
|
|
8812
|
+
const _stmts = _Block._0;
|
|
8813
|
+
stmts = _stmts;
|
|
8814
|
+
break _L;
|
|
8815
|
+
}
|
|
8816
|
+
}
|
|
8817
|
+
_M0MP28username4core9JsCodegen5write(self, "{ return ");
|
|
8818
|
+
_M0MP28username4core9JsCodegen9gen__expr(self, expr);
|
|
8819
|
+
_M0MP28username4core9JsCodegen5write(self, "; }\n");
|
|
8820
|
+
return;
|
|
8821
|
+
}
|
|
8822
|
+
_M0MP28username4core9JsCodegen5write(self, "{\n");
|
|
8823
|
+
self.indent_level = self.indent_level + 1 | 0;
|
|
8824
|
+
const _arr = stmts;
|
|
8825
|
+
const _len = _arr.length;
|
|
8826
|
+
let _tmp = 0;
|
|
8827
|
+
while (true) {
|
|
8828
|
+
const _i = _tmp;
|
|
8829
|
+
if (_i < _len) {
|
|
8830
|
+
const s = _arr[_i];
|
|
8831
|
+
_M0MP28username4core9JsCodegen9gen__stmt(self, s);
|
|
8832
|
+
_tmp = _i + 1 | 0;
|
|
8833
|
+
continue;
|
|
8834
|
+
} else {
|
|
8835
|
+
break;
|
|
8836
|
+
}
|
|
8837
|
+
}
|
|
8838
|
+
self.indent_level = self.indent_level - 1 | 0;
|
|
8839
|
+
_M0MP28username4core9JsCodegen7writeln(self, "}");
|
|
8840
|
+
}
|
|
8167
8841
|
function _M0MP28username4core9JsCodegen13gen__fn__decl(self, decl) {
|
|
8168
8842
|
_M0MP28username4core9JsCodegen13write__indent(self);
|
|
8169
8843
|
if (decl.is_async) {
|
|
@@ -8616,9 +9290,9 @@ function _M0MP28username4core9JsCodegen17gen__stmt__inline(self, stmt) {
|
|
|
8616
9290
|
_M0MP28username4core9JsCodegen5write(self, ");");
|
|
8617
9291
|
}
|
|
8618
9292
|
function _M0MP28username4core9JsCodegen3new() {
|
|
8619
|
-
return { buf: _M0MP311moonbitlang4core7builtin13StringBuilder11new_2einner(0), indent_level: 0 };
|
|
9293
|
+
return { buf: _M0MP311moonbitlang4core7builtin13StringBuilder11new_2einner(0), indent_level: 0, private_fields: [] };
|
|
8620
9294
|
}
|
|
8621
|
-
function _M0MP28username4core9JsCodegen16generate_2einner(self, stmts, header, shebang) {
|
|
9295
|
+
function _M0MP28username4core9JsCodegen16generate_2einner(self, stmts, header, shebang, strict) {
|
|
8622
9296
|
if (shebang.length > 0) {
|
|
8623
9297
|
_M0IP311moonbitlang4core7builtin13StringBuilderP311moonbitlang4core7builtin6Logger13write__string(self.buf, shebang);
|
|
8624
9298
|
_M0IP311moonbitlang4core7builtin13StringBuilderP311moonbitlang4core7builtin6Logger11write__char(self.buf, 10);
|
|
@@ -8627,6 +9301,9 @@ function _M0MP28username4core9JsCodegen16generate_2einner(self, stmts, header, s
|
|
|
8627
9301
|
_M0IP311moonbitlang4core7builtin13StringBuilderP311moonbitlang4core7builtin6Logger13write__string(self.buf, header);
|
|
8628
9302
|
_M0IP311moonbitlang4core7builtin13StringBuilderP311moonbitlang4core7builtin6Logger11write__char(self.buf, 10);
|
|
8629
9303
|
}
|
|
9304
|
+
if (strict) {
|
|
9305
|
+
_M0IP311moonbitlang4core7builtin13StringBuilderP311moonbitlang4core7builtin6Logger13write__string(self.buf, "\"use strict\";\n");
|
|
9306
|
+
}
|
|
8630
9307
|
const _arr = stmts;
|
|
8631
9308
|
const _len = _arr.length;
|
|
8632
9309
|
let _tmp = 0;
|
|
@@ -8647,6 +9324,7 @@ function _M0FP48username4core3cmd4main10cmd__build(args) {
|
|
|
8647
9324
|
const file = { val: "" };
|
|
8648
9325
|
const no_header = { val: false };
|
|
8649
9326
|
const to_stdout = { val: false };
|
|
9327
|
+
const strict = { val: true };
|
|
8650
9328
|
const i = { val: 0 };
|
|
8651
9329
|
while (true) {
|
|
8652
9330
|
if (i.val < args.length) {
|
|
@@ -8656,7 +9334,16 @@ function _M0FP48username4core3cmd4main10cmd__build(args) {
|
|
|
8656
9334
|
if (_M0MP311moonbitlang4core5array5Array2atGsE(args, i.val) === "--stdout") {
|
|
8657
9335
|
to_stdout.val = true;
|
|
8658
9336
|
} else {
|
|
8659
|
-
|
|
9337
|
+
if (_M0MP311moonbitlang4core5array5Array2atGsE(args, i.val) === "--strict") {
|
|
9338
|
+
if ((i.val + 1 | 0) < args.length && (_M0MP311moonbitlang4core5array5Array2atGsE(args, i.val + 1 | 0) === "true" || _M0MP311moonbitlang4core5array5Array2atGsE(args, i.val + 1 | 0) === "false")) {
|
|
9339
|
+
i.val = i.val + 1 | 0;
|
|
9340
|
+
strict.val = _M0MP311moonbitlang4core5array5Array2atGsE(args, i.val) === "true";
|
|
9341
|
+
} else {
|
|
9342
|
+
strict.val = true;
|
|
9343
|
+
}
|
|
9344
|
+
} else {
|
|
9345
|
+
file.val = _M0MP311moonbitlang4core5array5Array2atGsE(args, i.val);
|
|
9346
|
+
}
|
|
8660
9347
|
}
|
|
8661
9348
|
}
|
|
8662
9349
|
i.val = i.val + 1 | 0;
|
|
@@ -8703,7 +9390,7 @@ function _M0FP48username4core3cmd4main10cmd__build(args) {
|
|
|
8703
9390
|
_L$2: {
|
|
8704
9391
|
_L$3: {
|
|
8705
9392
|
const _bind = _M0MP311moonbitlang4core5array5Array2atGRP28username4core5TokenE(tokens, 0).kind;
|
|
8706
|
-
if (_bind.$tag ===
|
|
9393
|
+
if (_bind.$tag === 95) {
|
|
8707
9394
|
const _Shebang = _bind;
|
|
8708
9395
|
const _s = _Shebang._0;
|
|
8709
9396
|
s = _s;
|
|
@@ -8715,7 +9402,7 @@ function _M0FP48username4core3cmd4main10cmd__build(args) {
|
|
|
8715
9402
|
tok_start.val = 1;
|
|
8716
9403
|
if (tok_start.val < tokens.length) {
|
|
8717
9404
|
const _bind = _M0MP311moonbitlang4core5array5Array2atGRP28username4core5TokenE(tokens, tok_start.val).kind;
|
|
8718
|
-
if (_bind.$tag ===
|
|
9405
|
+
if (_bind.$tag === 92) {
|
|
8719
9406
|
tok_start.val = tok_start.val + 1 | 0;
|
|
8720
9407
|
}
|
|
8721
9408
|
}
|
|
@@ -8733,8 +9420,8 @@ function _M0FP48username4core3cmd4main10cmd__build(args) {
|
|
|
8733
9420
|
}
|
|
8734
9421
|
}
|
|
8735
9422
|
const stmts = _M0MP28username4core6Parser5parse(_M0MP28username4core6Parser3new(filtered));
|
|
8736
|
-
const header = no_header.val ? "" : "// Generated by Purus 0.
|
|
8737
|
-
const js = _M0MP28username4core9JsCodegen16generate_2einner(_M0MP28username4core9JsCodegen3new(), stmts, header, shebang.val);
|
|
9423
|
+
const header = no_header.val ? "" : "// Generated by Purus 0.6.1";
|
|
9424
|
+
const js = _M0MP28username4core9JsCodegen16generate_2einner(_M0MP28username4core9JsCodegen3new(), stmts, header, shebang.val, strict.val);
|
|
8738
9425
|
if (to_stdout.val) {
|
|
8739
9426
|
_M0FP311moonbitlang4core7builtin7printlnGsE(js);
|
|
8740
9427
|
return undefined;
|