purus 0.10.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README-ja.md +11 -11
- package/README.md +11 -11
- package/bin/purus.js +9 -0
- package/package.json +5 -5
- package/pkg/lib/create.js +5 -47
- package/pkg/lib/generate-config.js +35 -0
- package/pkg/lib/init.js +85 -0
- package/pkg/lib/purus-compiler.js +662 -637
- package/pkg/lib/templates.js +50 -0
|
@@ -2,6 +2,9 @@ class $PanicError extends Error {}
|
|
|
2
2
|
function $panic() {
|
|
3
3
|
throw new $PanicError();
|
|
4
4
|
}
|
|
5
|
+
function $bound_check(arr, index) {
|
|
6
|
+
if (index < 0 || index >= arr.length) throw new Error("Index out of bounds");
|
|
7
|
+
}
|
|
5
8
|
function _M0TPB13StringBuilder(param0) {
|
|
6
9
|
this.val = param0;
|
|
7
10
|
}
|
|
@@ -16,8 +19,9 @@ function _M0TPC16string10StringView(param0, param1, param2) {
|
|
|
16
19
|
const _M0FPB19int__to__string__js = (x, radix) => {
|
|
17
20
|
return x.toString(radix);
|
|
18
21
|
};
|
|
19
|
-
function
|
|
20
|
-
|
|
22
|
+
function _M0TPB4IterGcE(param0, param1) {
|
|
23
|
+
this.f = param0;
|
|
24
|
+
this.size_hint = param1;
|
|
21
25
|
}
|
|
22
26
|
function $makebytes(a, b) {
|
|
23
27
|
const arr = new Uint8Array(a);
|
|
@@ -35,7 +39,6 @@ const _M0MPB7JSArray4push = (arr, val) => { arr.push(val); };
|
|
|
35
39
|
function _M0TPB8MutLocalGiE(param0) {
|
|
36
40
|
this.val = param0;
|
|
37
41
|
}
|
|
38
|
-
const _M0FPB15ryu__to__string = (number) => number.toString();
|
|
39
42
|
const $bytes_literal$0 = new Uint8Array();
|
|
40
43
|
function _M0TPB9ArrayViewGsE(param0, param1, param2) {
|
|
41
44
|
this.buf = param0;
|
|
@@ -107,20 +110,6 @@ function _M0DTPC16result6ResultGuRP311moonbitlang1x2fs7IOErrorE2Ok(param0) {
|
|
|
107
110
|
this._0 = param0;
|
|
108
111
|
}
|
|
109
112
|
_M0DTPC16result6ResultGuRP311moonbitlang1x2fs7IOErrorE2Ok.prototype.$tag = 1;
|
|
110
|
-
const _M0FP311moonbitlang1x2fs17path__exists__ffi = function(path) {
|
|
111
|
-
var fs = require('fs');
|
|
112
|
-
return fs.existsSync(path);
|
|
113
|
-
};
|
|
114
|
-
const _M0FP311moonbitlang1x2fs16create__dir__ffi = function(path) {
|
|
115
|
-
var fs = require('fs');
|
|
116
|
-
try {
|
|
117
|
-
fs.mkdirSync(path, { recursive: true });
|
|
118
|
-
return 0;
|
|
119
|
-
} catch (error) {
|
|
120
|
-
globalThis.errorMessage = error.message;
|
|
121
|
-
return -1;
|
|
122
|
-
}
|
|
123
|
-
};
|
|
124
113
|
const _M0FP511moonbitlang1x3sys8internal3ffi24get__cli__args__internal = function() {
|
|
125
114
|
return process.argv.slice(1);
|
|
126
115
|
};
|
|
@@ -481,20 +470,23 @@ function _M0DTP48username4core3src5lexer9TokenKind9InterpStr(param0) {
|
|
|
481
470
|
this._0 = param0;
|
|
482
471
|
}
|
|
483
472
|
_M0DTP48username4core3src5lexer9TokenKind9InterpStr.prototype.$tag = 110;
|
|
473
|
+
function _M0DTP48username4core3src5lexer9TokenKind5Blank() {}
|
|
474
|
+
_M0DTP48username4core3src5lexer9TokenKind5Blank.prototype.$tag = 111;
|
|
475
|
+
const _M0DTP48username4core3src5lexer9TokenKind5Blank__ = new _M0DTP48username4core3src5lexer9TokenKind5Blank();
|
|
484
476
|
function _M0DTP48username4core3src5lexer9TokenKind7Shebang(param0) {
|
|
485
477
|
this._0 = param0;
|
|
486
478
|
}
|
|
487
|
-
_M0DTP48username4core3src5lexer9TokenKind7Shebang.prototype.$tag =
|
|
479
|
+
_M0DTP48username4core3src5lexer9TokenKind7Shebang.prototype.$tag = 112;
|
|
488
480
|
function _M0DTP48username4core3src5lexer9TokenKind7Comment(param0) {
|
|
489
481
|
this._0 = param0;
|
|
490
482
|
}
|
|
491
|
-
_M0DTP48username4core3src5lexer9TokenKind7Comment.prototype.$tag =
|
|
483
|
+
_M0DTP48username4core3src5lexer9TokenKind7Comment.prototype.$tag = 113;
|
|
492
484
|
function _M0DTP48username4core3src5lexer9TokenKind12BlockComment(param0) {
|
|
493
485
|
this._0 = param0;
|
|
494
486
|
}
|
|
495
|
-
_M0DTP48username4core3src5lexer9TokenKind12BlockComment.prototype.$tag =
|
|
487
|
+
_M0DTP48username4core3src5lexer9TokenKind12BlockComment.prototype.$tag = 114;
|
|
496
488
|
function _M0DTP48username4core3src5lexer9TokenKind3Eof() {}
|
|
497
|
-
_M0DTP48username4core3src5lexer9TokenKind3Eof.prototype.$tag =
|
|
489
|
+
_M0DTP48username4core3src5lexer9TokenKind3Eof.prototype.$tag = 115;
|
|
498
490
|
const _M0DTP48username4core3src5lexer9TokenKind3Eof__ = new _M0DTP48username4core3src5lexer9TokenKind3Eof();
|
|
499
491
|
function _M0TPB8MutLocalGRPB13StringBuilderE(param0) {
|
|
500
492
|
this.val = param0;
|
|
@@ -1048,15 +1040,66 @@ function _M0TP48username4core3src7codegen9JsCodegen(param0, param1, param2, para
|
|
|
1048
1040
|
function _M0TPB8MutLocalGsE(param0) {
|
|
1049
1041
|
this.val = param0;
|
|
1050
1042
|
}
|
|
1051
|
-
const
|
|
1052
|
-
const
|
|
1043
|
+
const _M0FP092moonbitlang_2fcore_2fbuiltin_2fStringBuilder_24as_24_40moonbitlang_2fcore_2fbuiltin_2eLogger = { method_0: _M0IPB13StringBuilderPB6Logger13write__string, method_1: _M0IP016_24default__implPB6Logger16write__substringGRPB13StringBuilderE, method_2: _M0IPB13StringBuilderPB6Logger11write__view, method_3: _M0IPB13StringBuilderPB6Logger11write__char, method_4: _M0IP016_24default__implPB6Logger28write__string__interpolationGRPB13StringBuilderE, method_5: _M0IP016_24default__implPB6Logger5writeGRPB13StringBuilderE };
|
|
1044
|
+
const _M0MPB4Iter4nextN6constrS8926GcE = 0;
|
|
1045
|
+
const _M0MPB4Iter4nextN6constrS8927GcE = 0;
|
|
1046
|
+
const _M0MPB4Iter3newN6constrS8934GcE = 0;
|
|
1047
|
+
const _M0FPB18brute__force__findN6constrS8937 = 0;
|
|
1048
|
+
const _M0FPB28boyer__moore__horspool__findN6constrS8936 = 0;
|
|
1053
1049
|
function _M0FPC15abort5abortGRPB9ArrayViewGsEE(msg) {
|
|
1054
1050
|
return $panic();
|
|
1055
1051
|
}
|
|
1056
1052
|
function _M0FPC15abort5abortGyE(msg) {
|
|
1057
1053
|
return $panic();
|
|
1058
1054
|
}
|
|
1059
|
-
function
|
|
1055
|
+
function _M0MPC15array10FixedArray12unsafe__blitGRPB17UnsafeMaybeUninitGsEE(dst, dst_offset, src, src_offset, len) {
|
|
1056
|
+
if (dst === src && dst_offset < src_offset) {
|
|
1057
|
+
let _tmp = 0;
|
|
1058
|
+
while (true) {
|
|
1059
|
+
const i = _tmp;
|
|
1060
|
+
if (i < len) {
|
|
1061
|
+
const _tmp$2 = dst_offset + i | 0;
|
|
1062
|
+
const _tmp$3 = src_offset + i | 0;
|
|
1063
|
+
$bound_check(src, _tmp$3);
|
|
1064
|
+
$bound_check(dst, _tmp$2);
|
|
1065
|
+
dst[_tmp$2] = src[_tmp$3];
|
|
1066
|
+
_tmp = i + 1 | 0;
|
|
1067
|
+
continue;
|
|
1068
|
+
} else {
|
|
1069
|
+
return;
|
|
1070
|
+
}
|
|
1071
|
+
}
|
|
1072
|
+
} else {
|
|
1073
|
+
let _tmp = len - 1 | 0;
|
|
1074
|
+
while (true) {
|
|
1075
|
+
const i = _tmp;
|
|
1076
|
+
if (i >= 0) {
|
|
1077
|
+
const _tmp$2 = dst_offset + i | 0;
|
|
1078
|
+
const _tmp$3 = src_offset + i | 0;
|
|
1079
|
+
$bound_check(src, _tmp$3);
|
|
1080
|
+
$bound_check(dst, _tmp$2);
|
|
1081
|
+
dst[_tmp$2] = src[_tmp$3];
|
|
1082
|
+
_tmp = i - 1 | 0;
|
|
1083
|
+
continue;
|
|
1084
|
+
} else {
|
|
1085
|
+
return;
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1088
|
+
}
|
|
1089
|
+
}
|
|
1090
|
+
function _M0MPB18UninitializedArray12unsafe__blitGsE(dst, dst_offset, src, src_offset, len) {
|
|
1091
|
+
_M0MPC15array10FixedArray12unsafe__blitGRPB17UnsafeMaybeUninitGsEE(dst, dst_offset, src, src_offset, len);
|
|
1092
|
+
}
|
|
1093
|
+
function _M0MPB13StringBuilder13write__objectGsE(self, obj) {
|
|
1094
|
+
_M0IP016_24default__implPB4Show6outputGsE(obj, { self: self, method_table: _M0FP092moonbitlang_2fcore_2fbuiltin_2fStringBuilder_24as_24_40moonbitlang_2fcore_2fbuiltin_2eLogger });
|
|
1095
|
+
}
|
|
1096
|
+
function _M0MPB13StringBuilder13write__objectGiE(self, obj) {
|
|
1097
|
+
_M0IP016_24default__implPB4Show6outputGiE(obj, { self: self, method_table: _M0FP092moonbitlang_2fcore_2fbuiltin_2fStringBuilder_24as_24_40moonbitlang_2fcore_2fbuiltin_2eLogger });
|
|
1098
|
+
}
|
|
1099
|
+
function _M0MPC13int3Int16unsafe__to__char(self) {
|
|
1100
|
+
return self;
|
|
1101
|
+
}
|
|
1102
|
+
function _M0MPB13StringBuilder21StringBuilder_2einner(size_hint) {
|
|
1060
1103
|
return new _M0TPB13StringBuilder("");
|
|
1061
1104
|
}
|
|
1062
1105
|
function _M0MPB13StringBuilder10to__string(self) {
|
|
@@ -1095,15 +1138,18 @@ function _M0IPC16uint166UInt16PB7Compare7compare(self, that) {
|
|
|
1095
1138
|
function _M0IP016_24default__implPB2Eq10not__equalGRP48username4core3src5lexer9TokenKindE(x, y) {
|
|
1096
1139
|
return !_M0IP48username4core3src5lexer9TokenKindPB2Eq5equal(x, y);
|
|
1097
1140
|
}
|
|
1098
|
-
function _M0IP016_24default__implPB2Eq10not__equalGsE(x, y) {
|
|
1099
|
-
return !(x === y);
|
|
1100
|
-
}
|
|
1101
1141
|
function _M0IP016_24default__implPB7Compare6op__leGkE(x, y) {
|
|
1102
1142
|
return _M0IPC16uint166UInt16PB7Compare7compare(x, y) <= 0;
|
|
1103
1143
|
}
|
|
1104
1144
|
function _M0IP016_24default__implPB7Compare6op__geGkE(x, y) {
|
|
1105
1145
|
return _M0IPC16uint166UInt16PB7Compare7compare(x, y) >= 0;
|
|
1106
1146
|
}
|
|
1147
|
+
function _M0IP016_24default__implPB6Logger28write__string__interpolationGRPB13StringBuilderE(self, show) {
|
|
1148
|
+
show.method_table.method_0(show.self, { self: self, method_table: _M0FP092moonbitlang_2fcore_2fbuiltin_2fStringBuilder_24as_24_40moonbitlang_2fcore_2fbuiltin_2eLogger });
|
|
1149
|
+
}
|
|
1150
|
+
function _M0IP016_24default__implPB6Logger5writeGRPB13StringBuilderE(self, show) {
|
|
1151
|
+
show.method_table.method_0(show.self, { self: self, method_table: _M0FP092moonbitlang_2fcore_2fbuiltin_2fStringBuilder_24as_24_40moonbitlang_2fcore_2fbuiltin_2eLogger });
|
|
1152
|
+
}
|
|
1107
1153
|
function _M0MPC16string6String11sub_2einner(self, start, end) {
|
|
1108
1154
|
const len = self.length;
|
|
1109
1155
|
let end$2;
|
|
@@ -1142,15 +1188,41 @@ function _M0MPC16string10StringView4data(self) {
|
|
|
1142
1188
|
function _M0MPC16string10StringView13start__offset(self) {
|
|
1143
1189
|
return self.start;
|
|
1144
1190
|
}
|
|
1191
|
+
function _M0IP016_24default__implPB4Show6outputGsE(self, logger) {
|
|
1192
|
+
logger.method_table.method_0(logger.self, _M0IPC16string6StringPB4Show10to__string(self));
|
|
1193
|
+
}
|
|
1194
|
+
function _M0IP016_24default__implPB4Show6outputGiE(self, logger) {
|
|
1195
|
+
logger.method_table.method_0(logger.self, _M0IPC13int3IntPB4Show10to__string(self));
|
|
1196
|
+
}
|
|
1145
1197
|
function _M0MPB4Iter4nextGcE(self) {
|
|
1146
|
-
const _func = self;
|
|
1147
|
-
|
|
1198
|
+
const _func = self.f;
|
|
1199
|
+
const result = _func();
|
|
1200
|
+
const _bind = self.size_hint;
|
|
1201
|
+
if (result === -1) {
|
|
1202
|
+
self.size_hint = _M0MPB4Iter4nextN6constrS8927GcE;
|
|
1203
|
+
} else {
|
|
1204
|
+
if (_bind === undefined) {
|
|
1205
|
+
} else {
|
|
1206
|
+
const _Some = _bind;
|
|
1207
|
+
const _n = _Some;
|
|
1208
|
+
self.size_hint = _n > 0 ? _n - 1 | 0 : _M0MPB4Iter4nextN6constrS8926GcE;
|
|
1209
|
+
}
|
|
1210
|
+
}
|
|
1211
|
+
return result;
|
|
1148
1212
|
}
|
|
1149
1213
|
function _M0MPC13int3Int18to__string_2einner(self, radix) {
|
|
1150
1214
|
return _M0FPB19int__to__string__js(self, radix);
|
|
1151
1215
|
}
|
|
1152
|
-
function _M0MPB4Iter3newGcE(f) {
|
|
1153
|
-
|
|
1216
|
+
function _M0MPB4Iter3newGcE(f, size_hint) {
|
|
1217
|
+
let size_hint$2;
|
|
1218
|
+
if (size_hint === undefined) {
|
|
1219
|
+
size_hint$2 = undefined;
|
|
1220
|
+
} else {
|
|
1221
|
+
const _Some = size_hint;
|
|
1222
|
+
const _n = _Some;
|
|
1223
|
+
size_hint$2 = _n > 0 ? _n : _M0MPB4Iter3newN6constrS8934GcE;
|
|
1224
|
+
}
|
|
1225
|
+
return new _M0TPB4IterGcE(f, size_hint$2);
|
|
1154
1226
|
}
|
|
1155
1227
|
function _M0MPC16string10StringView12view_2einner(self, start_offset, end_offset) {
|
|
1156
1228
|
let end_offset$2;
|
|
@@ -1175,7 +1247,7 @@ function _M0MPC15array9ArrayView6lengthGyE(self) {
|
|
|
1175
1247
|
return self.end - self.start | 0;
|
|
1176
1248
|
}
|
|
1177
1249
|
function _M0MPC16string6String11from__array(chars) {
|
|
1178
|
-
const buf =
|
|
1250
|
+
const buf = _M0MPB13StringBuilder21StringBuilder_2einner(Math.imul(_M0MPC15array9ArrayView6lengthGcE(chars), 4) | 0);
|
|
1179
1251
|
const _bind = chars.end - chars.start | 0;
|
|
1180
1252
|
let _tmp = 0;
|
|
1181
1253
|
while (true) {
|
|
@@ -1245,7 +1317,7 @@ function _M0FPB28boyer__moore__horspool__find(haystack, needle) {
|
|
|
1245
1317
|
return undefined;
|
|
1246
1318
|
}
|
|
1247
1319
|
} else {
|
|
1248
|
-
return
|
|
1320
|
+
return _M0FPB28boyer__moore__horspool__findN6constrS8936;
|
|
1249
1321
|
}
|
|
1250
1322
|
}
|
|
1251
1323
|
function _M0FPB18brute__force__find(haystack, needle) {
|
|
@@ -1287,7 +1359,7 @@ function _M0FPB18brute__force__find(haystack, needle) {
|
|
|
1287
1359
|
return undefined;
|
|
1288
1360
|
}
|
|
1289
1361
|
} else {
|
|
1290
|
-
return
|
|
1362
|
+
return _M0FPB18brute__force__findN6constrS8937;
|
|
1291
1363
|
}
|
|
1292
1364
|
}
|
|
1293
1365
|
function _M0MPC16string10StringView4find(self, str) {
|
|
@@ -1454,26 +1526,47 @@ function _M0MPC16string6String4iter(self) {
|
|
|
1454
1526
|
} else {
|
|
1455
1527
|
return -1;
|
|
1456
1528
|
}
|
|
1457
|
-
});
|
|
1529
|
+
}, undefined);
|
|
1458
1530
|
}
|
|
1459
1531
|
function _M0MPC16string6String12replace__all(self, old, new_) {
|
|
1460
1532
|
const len = self.length;
|
|
1461
|
-
const buf =
|
|
1533
|
+
const buf = _M0MPB13StringBuilder21StringBuilder_2einner(len);
|
|
1462
1534
|
const old_len = _M0MPC16string10StringView6length(old);
|
|
1463
1535
|
const new$2 = _M0MPC16string10StringView9to__owned(new_);
|
|
1464
1536
|
if (old_len === 0) {
|
|
1465
1537
|
_M0IPB13StringBuilderPB6Logger13write__string(buf, new$2);
|
|
1466
|
-
const
|
|
1538
|
+
const _bind = self.length;
|
|
1539
|
+
let _tmp = 0;
|
|
1467
1540
|
while (true) {
|
|
1468
|
-
const
|
|
1469
|
-
if (
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1541
|
+
const _string_index = _tmp;
|
|
1542
|
+
if (_string_index < _bind) {
|
|
1543
|
+
let _decoded_next_string_index;
|
|
1544
|
+
let _decoded_char;
|
|
1545
|
+
_L: {
|
|
1546
|
+
const _bind$2 = self.charCodeAt(_string_index);
|
|
1547
|
+
if (_bind$2 >= 55296 && _bind$2 <= 56319 && (_string_index + 1 | 0) < _bind) {
|
|
1548
|
+
const _bind$3 = self.charCodeAt(_string_index + 1 | 0);
|
|
1549
|
+
if (_bind$3 >= 56320 && _bind$3 <= 57343) {
|
|
1550
|
+
_decoded_next_string_index = _string_index + 2 | 0;
|
|
1551
|
+
_decoded_char = _M0MPC13int3Int16unsafe__to__char((((Math.imul(_bind$2 - 55296 | 0, 1024) | 0) + _bind$3 | 0) - 56320 | 0) + 65536 | 0);
|
|
1552
|
+
break _L;
|
|
1553
|
+
} else {
|
|
1554
|
+
_decoded_next_string_index = _string_index + 1 | 0;
|
|
1555
|
+
_decoded_char = _M0MPC13int3Int16unsafe__to__char(_bind$2);
|
|
1556
|
+
break _L;
|
|
1557
|
+
}
|
|
1558
|
+
} else {
|
|
1559
|
+
_decoded_next_string_index = _string_index + 1 | 0;
|
|
1560
|
+
_decoded_char = _M0MPC13int3Int16unsafe__to__char(_bind$2);
|
|
1561
|
+
break _L;
|
|
1562
|
+
}
|
|
1563
|
+
}
|
|
1564
|
+
_M0IPB13StringBuilderPB6Logger11write__char(buf, _decoded_char);
|
|
1475
1565
|
_M0IPB13StringBuilderPB6Logger13write__string(buf, new$2);
|
|
1566
|
+
_tmp = _decoded_next_string_index;
|
|
1476
1567
|
continue;
|
|
1568
|
+
} else {
|
|
1569
|
+
break;
|
|
1477
1570
|
}
|
|
1478
1571
|
}
|
|
1479
1572
|
return _M0MPB13StringBuilder10to__string(buf);
|
|
@@ -1522,16 +1615,6 @@ function _M0MPC16string6String9to__array(self) {
|
|
|
1522
1615
|
function _M0IPC13int3IntPB4Show10to__string(self) {
|
|
1523
1616
|
return _M0MPC13int3Int18to__string_2einner(self, 10);
|
|
1524
1617
|
}
|
|
1525
|
-
function _M0MPC15array9ArrayView2atGsE(self, index) {
|
|
1526
|
-
if (index >= 0 && index < (self.end - self.start | 0)) {
|
|
1527
|
-
const _tmp = self.buf;
|
|
1528
|
-
const _tmp$2 = self.start + index | 0;
|
|
1529
|
-
$bound_check(_tmp, _tmp$2);
|
|
1530
|
-
return _tmp[_tmp$2];
|
|
1531
|
-
} else {
|
|
1532
|
-
return _M0FPC15abort5abortGRPB9ArrayViewGsEE(`index out of bounds: the len is from 0 to ${_M0IPC13int3IntPB4Show10to__string(self.end - self.start | 0)} but the index is ${_M0IPC13int3IntPB4Show10to__string(index)}`);
|
|
1533
|
-
}
|
|
1534
|
-
}
|
|
1535
1618
|
function _M0MPC15array9ArrayView2atGyE(self, index) {
|
|
1536
1619
|
if (index >= 0 && index < (self.end - self.start | 0)) {
|
|
1537
1620
|
const _tmp = self.buf;
|
|
@@ -1539,59 +1622,22 @@ function _M0MPC15array9ArrayView2atGyE(self, index) {
|
|
|
1539
1622
|
$bound_check(_tmp, _tmp$2);
|
|
1540
1623
|
return _tmp[_tmp$2];
|
|
1541
1624
|
} else {
|
|
1542
|
-
|
|
1625
|
+
const _string_builder = _M0MPB13StringBuilder21StringBuilder_2einner(60);
|
|
1626
|
+
_M0IPB13StringBuilderPB6Logger13write__string(_string_builder, "index out of bounds: the len is from 0 to ");
|
|
1627
|
+
_M0MPB13StringBuilder13write__objectGiE(_string_builder, self.end - self.start | 0);
|
|
1628
|
+
_M0IPB13StringBuilderPB6Logger13write__string(_string_builder, " but the index is ");
|
|
1629
|
+
_M0MPB13StringBuilder13write__objectGiE(_string_builder, index);
|
|
1630
|
+
return _M0FPC15abort5abortGyE(_M0MPB13StringBuilder10to__string(_string_builder));
|
|
1543
1631
|
}
|
|
1544
1632
|
}
|
|
1545
|
-
function
|
|
1546
|
-
const
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
const i = _tmp;
|
|
1550
|
-
if (i < len) {
|
|
1551
|
-
arr[i] = elem;
|
|
1552
|
-
_tmp = i + 1 | 0;
|
|
1553
|
-
continue;
|
|
1554
|
-
} else {
|
|
1555
|
-
break;
|
|
1556
|
-
}
|
|
1557
|
-
}
|
|
1558
|
-
return arr;
|
|
1559
|
-
}
|
|
1560
|
-
function _M0MPC15array5Array3setGsE(self, index, value) {
|
|
1561
|
-
const len = self.length;
|
|
1562
|
-
if (index >= 0 && index < len) {
|
|
1563
|
-
$bound_check(self, index);
|
|
1564
|
-
self[index] = value;
|
|
1565
|
-
return;
|
|
1566
|
-
} else {
|
|
1567
|
-
$panic();
|
|
1568
|
-
return;
|
|
1569
|
-
}
|
|
1633
|
+
function _M0MPC15array5Array31unsafe__make__and__blit_2einnerGsE(src, allocate_len, len, src_offset, dst_offset) {
|
|
1634
|
+
const dst = new Array(allocate_len);
|
|
1635
|
+
_M0MPB18UninitializedArray12unsafe__blitGsE(dst, dst_offset, src, src_offset, len);
|
|
1636
|
+
return dst;
|
|
1570
1637
|
}
|
|
1571
1638
|
function _M0MPC15array9ArrayView9to__ownedGsE(self) {
|
|
1572
1639
|
const len = _M0MPC15array9ArrayView6lengthGsE(self);
|
|
1573
|
-
|
|
1574
|
-
return [];
|
|
1575
|
-
} else {
|
|
1576
|
-
const arr = _M0MPC15array5Array4makeGsE(len, _M0MPC15array9ArrayView2atGsE(self, 0));
|
|
1577
|
-
const _bind = self.end - self.start | 0;
|
|
1578
|
-
let _tmp = 0;
|
|
1579
|
-
while (true) {
|
|
1580
|
-
const i = _tmp;
|
|
1581
|
-
if (i < _bind) {
|
|
1582
|
-
const v = self.buf[self.start + i | 0];
|
|
1583
|
-
_M0MPC15array5Array3setGsE(arr, i, v);
|
|
1584
|
-
_tmp = i + 1 | 0;
|
|
1585
|
-
continue;
|
|
1586
|
-
} else {
|
|
1587
|
-
break;
|
|
1588
|
-
}
|
|
1589
|
-
}
|
|
1590
|
-
return arr;
|
|
1591
|
-
}
|
|
1592
|
-
}
|
|
1593
|
-
function _M0MPC16double6Double10to__string(self) {
|
|
1594
|
-
return _M0FPB15ryu__to__string(self);
|
|
1640
|
+
return len === 0 ? [] : _M0MPC15array5Array31unsafe__make__and__blit_2einnerGsE(self.buf, len, len, self.start, 0);
|
|
1595
1641
|
}
|
|
1596
1642
|
function _M0MPC15bytes5Bytes5makei(length, value) {
|
|
1597
1643
|
if (length <= 0) {
|
|
@@ -1637,6 +1683,9 @@ function _M0MPC15array5Array12view_2einnerGsE(self, start, end) {
|
|
|
1637
1683
|
return _M0FPC15abort5abortGRPB9ArrayViewGsEE("View index out of bounds");
|
|
1638
1684
|
}
|
|
1639
1685
|
}
|
|
1686
|
+
function _M0MPC15array5Array9is__emptyGRP48username4core3src5lexer5TokenE(self) {
|
|
1687
|
+
return self.length === 0;
|
|
1688
|
+
}
|
|
1640
1689
|
function _M0MPC15array5Array2atGsE(self, index) {
|
|
1641
1690
|
const len = self.length;
|
|
1642
1691
|
if (index >= 0 && index < len) {
|
|
@@ -1677,9 +1726,6 @@ function _M0IPC15array5ArrayPB2Eq5equalGsE(self, other) {
|
|
|
1677
1726
|
return false;
|
|
1678
1727
|
}
|
|
1679
1728
|
}
|
|
1680
|
-
function _M0MPC15array5Array9is__emptyGRP48username4core3src5lexer5TokenE(self) {
|
|
1681
|
-
return self.length === 0;
|
|
1682
|
-
}
|
|
1683
1729
|
function _M0FP411moonbitlang1x8internal3ffi28mbt__string__to__utf8__bytes(str, is_filename) {
|
|
1684
1730
|
const res = [];
|
|
1685
1731
|
const len = str.length;
|
|
@@ -1811,7 +1857,11 @@ function _M0FP311moonbitlang1x2fs40read__file__to__string__internal_2einner(path
|
|
|
1811
1857
|
}
|
|
1812
1858
|
return new _M0DTPC16result6ResultGsRP311moonbitlang1x2fs7IOErrorE2Ok(_M0FP411moonbitlang1x8internal3ffi28utf8__bytes__to__mbt__string(bytes));
|
|
1813
1859
|
} else {
|
|
1814
|
-
|
|
1860
|
+
const _string_builder = _M0MPB13StringBuilder21StringBuilder_2einner(54);
|
|
1861
|
+
_M0IPB13StringBuilderPB6Logger13write__string(_string_builder, "Unsupported encoding: ");
|
|
1862
|
+
_M0MPB13StringBuilder13write__objectGsE(_string_builder, encoding);
|
|
1863
|
+
_M0IPB13StringBuilderPB6Logger13write__string(_string_builder, ", only utf8 is supported for now");
|
|
1864
|
+
return new _M0DTPC16result6ResultGsRP311moonbitlang1x2fs7IOErrorE3Err(new _M0DTPC15error5Error40moonbitlang_2fx_2ffs_2eIOError_2eIOError(_M0MPB13StringBuilder10to__string(_string_builder)));
|
|
1815
1865
|
}
|
|
1816
1866
|
}
|
|
1817
1867
|
function _M0FP311moonbitlang1x2fs32write__bytes__to__file__internal(path, content) {
|
|
@@ -1827,18 +1877,11 @@ function _M0FP311moonbitlang1x2fs41write__string__to__file__internal_2einner(pat
|
|
|
1827
1877
|
const bytes = _M0FP411moonbitlang1x8internal3ffi28mbt__string__to__utf8__bytes(content, false);
|
|
1828
1878
|
return _M0FP311moonbitlang1x2fs32write__bytes__to__file__internal(path, bytes);
|
|
1829
1879
|
} else {
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
}
|
|
1836
|
-
function _M0FP311moonbitlang1x2fs21create__dir__internal(path) {
|
|
1837
|
-
const res = _M0FP311moonbitlang1x2fs16create__dir__ffi(path);
|
|
1838
|
-
if (res === -1) {
|
|
1839
|
-
return new _M0DTPC16result6ResultGuRP311moonbitlang1x2fs7IOErrorE3Err(new _M0DTPC15error5Error40moonbitlang_2fx_2ffs_2eIOError_2eIOError(_M0FP311moonbitlang1x2fs24get__error__message__ffi()));
|
|
1840
|
-
} else {
|
|
1841
|
-
return new _M0DTPC16result6ResultGuRP311moonbitlang1x2fs7IOErrorE2Ok(undefined);
|
|
1880
|
+
const _string_builder = _M0MPB13StringBuilder21StringBuilder_2einner(54);
|
|
1881
|
+
_M0IPB13StringBuilderPB6Logger13write__string(_string_builder, "Unsupported encoding: ");
|
|
1882
|
+
_M0MPB13StringBuilder13write__objectGsE(_string_builder, encoding);
|
|
1883
|
+
_M0IPB13StringBuilderPB6Logger13write__string(_string_builder, ", only utf8 is supported for now");
|
|
1884
|
+
return new _M0DTPC16result6ResultGuRP311moonbitlang1x2fs7IOErrorE3Err(new _M0DTPC15error5Error40moonbitlang_2fx_2ffs_2eIOError_2eIOError(_M0MPB13StringBuilder10to__string(_string_builder)));
|
|
1842
1885
|
}
|
|
1843
1886
|
}
|
|
1844
1887
|
function _M0FP311moonbitlang1x2fs30read__file__to__string_2einner(path, encoding) {
|
|
@@ -1847,925 +1890,926 @@ function _M0FP311moonbitlang1x2fs30read__file__to__string_2einner(path, encoding
|
|
|
1847
1890
|
function _M0FP311moonbitlang1x2fs31write__string__to__file_2einner(path, content, encoding) {
|
|
1848
1891
|
return _M0FP311moonbitlang1x2fs41write__string__to__file__internal_2einner(path, content, encoding);
|
|
1849
1892
|
}
|
|
1850
|
-
function _M0FP311moonbitlang1x2fs12path__exists(path) {
|
|
1851
|
-
return _M0FP311moonbitlang1x2fs22path__exists__internal(path);
|
|
1852
|
-
}
|
|
1853
|
-
function _M0FP311moonbitlang1x2fs11create__dir(path) {
|
|
1854
|
-
return _M0FP311moonbitlang1x2fs21create__dir__internal(path);
|
|
1855
|
-
}
|
|
1856
1893
|
function _M0FP511moonbitlang1x3sys8internal3ffi14get__cli__args() {
|
|
1857
1894
|
return _M0FP511moonbitlang1x3sys8internal3ffi24get__cli__args__internal();
|
|
1858
1895
|
}
|
|
1859
1896
|
function _M0FP311moonbitlang1x3sys14get__cli__args() {
|
|
1860
1897
|
return _M0FP511moonbitlang1x3sys8internal3ffi14get__cli__args();
|
|
1861
1898
|
}
|
|
1862
|
-
function _M0IP48username4core3src5lexer9TokenKindPB2Eq5equal(
|
|
1863
|
-
let
|
|
1864
|
-
let
|
|
1899
|
+
function _M0IP48username4core3src5lexer9TokenKindPB2Eq5equal(_x_114, _x_115) {
|
|
1900
|
+
let _x0_138;
|
|
1901
|
+
let _y0_139;
|
|
1865
1902
|
_L: {
|
|
1866
|
-
let
|
|
1867
|
-
let
|
|
1903
|
+
let _x0_136;
|
|
1904
|
+
let _y0_137;
|
|
1868
1905
|
_L$2: {
|
|
1869
|
-
let
|
|
1870
|
-
let
|
|
1906
|
+
let _x0_134;
|
|
1907
|
+
let _y0_135;
|
|
1871
1908
|
_L$3: {
|
|
1872
|
-
let
|
|
1873
|
-
let
|
|
1909
|
+
let _x0_132;
|
|
1910
|
+
let _y0_133;
|
|
1874
1911
|
_L$4: {
|
|
1875
|
-
let
|
|
1876
|
-
let
|
|
1912
|
+
let _x0_130;
|
|
1913
|
+
let _y0_131;
|
|
1877
1914
|
_L$5: {
|
|
1878
|
-
let
|
|
1879
|
-
let
|
|
1915
|
+
let _x0_128;
|
|
1916
|
+
let _y0_129;
|
|
1880
1917
|
_L$6: {
|
|
1881
|
-
let
|
|
1882
|
-
let
|
|
1883
|
-
let
|
|
1884
|
-
let
|
|
1918
|
+
let _x1_125;
|
|
1919
|
+
let _x0_124;
|
|
1920
|
+
let _y0_126;
|
|
1921
|
+
let _y1_127;
|
|
1885
1922
|
_L$7: {
|
|
1886
|
-
let
|
|
1887
|
-
let
|
|
1923
|
+
let _x0_122;
|
|
1924
|
+
let _y0_123;
|
|
1888
1925
|
_L$8: {
|
|
1889
|
-
let
|
|
1890
|
-
let
|
|
1926
|
+
let _x0_120;
|
|
1927
|
+
let _y0_121;
|
|
1891
1928
|
_L$9: {
|
|
1892
|
-
let
|
|
1893
|
-
let
|
|
1929
|
+
let _x0_118;
|
|
1930
|
+
let _y0_119;
|
|
1894
1931
|
_L$10: {
|
|
1895
|
-
let
|
|
1896
|
-
let
|
|
1932
|
+
let _x0_116;
|
|
1933
|
+
let _y0_117;
|
|
1897
1934
|
_L$11: {
|
|
1898
|
-
switch (
|
|
1935
|
+
switch (_x_114.$tag) {
|
|
1899
1936
|
case 0: {
|
|
1900
|
-
const _Int =
|
|
1901
|
-
const _$42$
|
|
1902
|
-
if (
|
|
1903
|
-
const _Int$2 =
|
|
1904
|
-
const _$42$
|
|
1905
|
-
|
|
1906
|
-
|
|
1937
|
+
const _Int = _x_114;
|
|
1938
|
+
const _$42$x0_116 = _Int._0;
|
|
1939
|
+
if (_x_115.$tag === 0) {
|
|
1940
|
+
const _Int$2 = _x_115;
|
|
1941
|
+
const _$42$y0_117 = _Int$2._0;
|
|
1942
|
+
_x0_116 = _$42$x0_116;
|
|
1943
|
+
_y0_117 = _$42$y0_117;
|
|
1907
1944
|
break _L$11;
|
|
1908
1945
|
} else {
|
|
1909
1946
|
return false;
|
|
1910
1947
|
}
|
|
1911
1948
|
}
|
|
1912
1949
|
case 1: {
|
|
1913
|
-
const _BigInt =
|
|
1914
|
-
const _$42$
|
|
1915
|
-
if (
|
|
1916
|
-
const _BigInt$2 =
|
|
1917
|
-
const _$42$
|
|
1918
|
-
|
|
1919
|
-
|
|
1950
|
+
const _BigInt = _x_114;
|
|
1951
|
+
const _$42$x0_118 = _BigInt._0;
|
|
1952
|
+
if (_x_115.$tag === 1) {
|
|
1953
|
+
const _BigInt$2 = _x_115;
|
|
1954
|
+
const _$42$y0_119 = _BigInt$2._0;
|
|
1955
|
+
_x0_118 = _$42$x0_118;
|
|
1956
|
+
_y0_119 = _$42$y0_119;
|
|
1920
1957
|
break _L$10;
|
|
1921
1958
|
} else {
|
|
1922
1959
|
return false;
|
|
1923
1960
|
}
|
|
1924
1961
|
}
|
|
1925
1962
|
case 2: {
|
|
1926
|
-
const _Float =
|
|
1927
|
-
const _$42$
|
|
1928
|
-
if (
|
|
1929
|
-
const _Float$2 =
|
|
1930
|
-
const _$42$
|
|
1931
|
-
|
|
1932
|
-
|
|
1963
|
+
const _Float = _x_114;
|
|
1964
|
+
const _$42$x0_120 = _Float._0;
|
|
1965
|
+
if (_x_115.$tag === 2) {
|
|
1966
|
+
const _Float$2 = _x_115;
|
|
1967
|
+
const _$42$y0_121 = _Float$2._0;
|
|
1968
|
+
_x0_120 = _$42$x0_120;
|
|
1969
|
+
_y0_121 = _$42$y0_121;
|
|
1933
1970
|
break _L$9;
|
|
1934
1971
|
} else {
|
|
1935
1972
|
return false;
|
|
1936
1973
|
}
|
|
1937
1974
|
}
|
|
1938
1975
|
case 3: {
|
|
1939
|
-
const _Str =
|
|
1940
|
-
const _$42$
|
|
1941
|
-
if (
|
|
1942
|
-
const _Str$2 =
|
|
1943
|
-
const _$42$
|
|
1944
|
-
|
|
1945
|
-
|
|
1976
|
+
const _Str = _x_114;
|
|
1977
|
+
const _$42$x0_122 = _Str._0;
|
|
1978
|
+
if (_x_115.$tag === 3) {
|
|
1979
|
+
const _Str$2 = _x_115;
|
|
1980
|
+
const _$42$y0_123 = _Str$2._0;
|
|
1981
|
+
_x0_122 = _$42$x0_122;
|
|
1982
|
+
_y0_123 = _$42$y0_123;
|
|
1946
1983
|
break _L$8;
|
|
1947
1984
|
} else {
|
|
1948
1985
|
return false;
|
|
1949
1986
|
}
|
|
1950
1987
|
}
|
|
1951
1988
|
case 4: {
|
|
1952
|
-
const _Regex =
|
|
1953
|
-
const _$42$
|
|
1954
|
-
const _$42$
|
|
1955
|
-
if (
|
|
1956
|
-
const _Regex$2 =
|
|
1957
|
-
const _$42$
|
|
1958
|
-
const _$42$
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1989
|
+
const _Regex = _x_114;
|
|
1990
|
+
const _$42$x0_124 = _Regex._0;
|
|
1991
|
+
const _$42$x1_125 = _Regex._1;
|
|
1992
|
+
if (_x_115.$tag === 4) {
|
|
1993
|
+
const _Regex$2 = _x_115;
|
|
1994
|
+
const _$42$y0_126 = _Regex$2._0;
|
|
1995
|
+
const _$42$y1_127 = _Regex$2._1;
|
|
1996
|
+
_x1_125 = _$42$x1_125;
|
|
1997
|
+
_x0_124 = _$42$x0_124;
|
|
1998
|
+
_y0_126 = _$42$y0_126;
|
|
1999
|
+
_y1_127 = _$42$y1_127;
|
|
1963
2000
|
break _L$7;
|
|
1964
2001
|
} else {
|
|
1965
2002
|
return false;
|
|
1966
2003
|
}
|
|
1967
2004
|
}
|
|
1968
2005
|
case 5: {
|
|
1969
|
-
if (
|
|
2006
|
+
if (_x_115.$tag === 5) {
|
|
1970
2007
|
return true;
|
|
1971
2008
|
} else {
|
|
1972
2009
|
return false;
|
|
1973
2010
|
}
|
|
1974
2011
|
}
|
|
1975
2012
|
case 6: {
|
|
1976
|
-
if (
|
|
2013
|
+
if (_x_115.$tag === 6) {
|
|
1977
2014
|
return true;
|
|
1978
2015
|
} else {
|
|
1979
2016
|
return false;
|
|
1980
2017
|
}
|
|
1981
2018
|
}
|
|
1982
2019
|
case 7: {
|
|
1983
|
-
const _Ident =
|
|
1984
|
-
const _$42$
|
|
1985
|
-
if (
|
|
1986
|
-
const _Ident$2 =
|
|
1987
|
-
const _$42$
|
|
1988
|
-
|
|
1989
|
-
|
|
2020
|
+
const _Ident = _x_114;
|
|
2021
|
+
const _$42$x0_128 = _Ident._0;
|
|
2022
|
+
if (_x_115.$tag === 7) {
|
|
2023
|
+
const _Ident$2 = _x_115;
|
|
2024
|
+
const _$42$y0_129 = _Ident$2._0;
|
|
2025
|
+
_x0_128 = _$42$x0_128;
|
|
2026
|
+
_y0_129 = _$42$y0_129;
|
|
1990
2027
|
break _L$6;
|
|
1991
2028
|
} else {
|
|
1992
2029
|
return false;
|
|
1993
2030
|
}
|
|
1994
2031
|
}
|
|
1995
2032
|
case 8: {
|
|
1996
|
-
if (
|
|
2033
|
+
if (_x_115.$tag === 8) {
|
|
1997
2034
|
return true;
|
|
1998
2035
|
} else {
|
|
1999
2036
|
return false;
|
|
2000
2037
|
}
|
|
2001
2038
|
}
|
|
2002
2039
|
case 9: {
|
|
2003
|
-
if (
|
|
2040
|
+
if (_x_115.$tag === 9) {
|
|
2004
2041
|
return true;
|
|
2005
2042
|
} else {
|
|
2006
2043
|
return false;
|
|
2007
2044
|
}
|
|
2008
2045
|
}
|
|
2009
2046
|
case 10: {
|
|
2010
|
-
if (
|
|
2047
|
+
if (_x_115.$tag === 10) {
|
|
2011
2048
|
return true;
|
|
2012
2049
|
} else {
|
|
2013
2050
|
return false;
|
|
2014
2051
|
}
|
|
2015
2052
|
}
|
|
2016
2053
|
case 11: {
|
|
2017
|
-
if (
|
|
2054
|
+
if (_x_115.$tag === 11) {
|
|
2018
2055
|
return true;
|
|
2019
2056
|
} else {
|
|
2020
2057
|
return false;
|
|
2021
2058
|
}
|
|
2022
2059
|
}
|
|
2023
2060
|
case 12: {
|
|
2024
|
-
if (
|
|
2061
|
+
if (_x_115.$tag === 12) {
|
|
2025
2062
|
return true;
|
|
2026
2063
|
} else {
|
|
2027
2064
|
return false;
|
|
2028
2065
|
}
|
|
2029
2066
|
}
|
|
2030
2067
|
case 13: {
|
|
2031
|
-
if (
|
|
2068
|
+
if (_x_115.$tag === 13) {
|
|
2032
2069
|
return true;
|
|
2033
2070
|
} else {
|
|
2034
2071
|
return false;
|
|
2035
2072
|
}
|
|
2036
2073
|
}
|
|
2037
2074
|
case 14: {
|
|
2038
|
-
if (
|
|
2075
|
+
if (_x_115.$tag === 14) {
|
|
2039
2076
|
return true;
|
|
2040
2077
|
} else {
|
|
2041
2078
|
return false;
|
|
2042
2079
|
}
|
|
2043
2080
|
}
|
|
2044
2081
|
case 15: {
|
|
2045
|
-
if (
|
|
2082
|
+
if (_x_115.$tag === 15) {
|
|
2046
2083
|
return true;
|
|
2047
2084
|
} else {
|
|
2048
2085
|
return false;
|
|
2049
2086
|
}
|
|
2050
2087
|
}
|
|
2051
2088
|
case 16: {
|
|
2052
|
-
if (
|
|
2089
|
+
if (_x_115.$tag === 16) {
|
|
2053
2090
|
return true;
|
|
2054
2091
|
} else {
|
|
2055
2092
|
return false;
|
|
2056
2093
|
}
|
|
2057
2094
|
}
|
|
2058
2095
|
case 17: {
|
|
2059
|
-
if (
|
|
2096
|
+
if (_x_115.$tag === 17) {
|
|
2060
2097
|
return true;
|
|
2061
2098
|
} else {
|
|
2062
2099
|
return false;
|
|
2063
2100
|
}
|
|
2064
2101
|
}
|
|
2065
2102
|
case 18: {
|
|
2066
|
-
if (
|
|
2103
|
+
if (_x_115.$tag === 18) {
|
|
2067
2104
|
return true;
|
|
2068
2105
|
} else {
|
|
2069
2106
|
return false;
|
|
2070
2107
|
}
|
|
2071
2108
|
}
|
|
2072
2109
|
case 19: {
|
|
2073
|
-
if (
|
|
2110
|
+
if (_x_115.$tag === 19) {
|
|
2074
2111
|
return true;
|
|
2075
2112
|
} else {
|
|
2076
2113
|
return false;
|
|
2077
2114
|
}
|
|
2078
2115
|
}
|
|
2079
2116
|
case 20: {
|
|
2080
|
-
if (
|
|
2117
|
+
if (_x_115.$tag === 20) {
|
|
2081
2118
|
return true;
|
|
2082
2119
|
} else {
|
|
2083
2120
|
return false;
|
|
2084
2121
|
}
|
|
2085
2122
|
}
|
|
2086
2123
|
case 21: {
|
|
2087
|
-
if (
|
|
2124
|
+
if (_x_115.$tag === 21) {
|
|
2088
2125
|
return true;
|
|
2089
2126
|
} else {
|
|
2090
2127
|
return false;
|
|
2091
2128
|
}
|
|
2092
2129
|
}
|
|
2093
2130
|
case 22: {
|
|
2094
|
-
if (
|
|
2131
|
+
if (_x_115.$tag === 22) {
|
|
2095
2132
|
return true;
|
|
2096
2133
|
} else {
|
|
2097
2134
|
return false;
|
|
2098
2135
|
}
|
|
2099
2136
|
}
|
|
2100
2137
|
case 23: {
|
|
2101
|
-
if (
|
|
2138
|
+
if (_x_115.$tag === 23) {
|
|
2102
2139
|
return true;
|
|
2103
2140
|
} else {
|
|
2104
2141
|
return false;
|
|
2105
2142
|
}
|
|
2106
2143
|
}
|
|
2107
2144
|
case 24: {
|
|
2108
|
-
if (
|
|
2145
|
+
if (_x_115.$tag === 24) {
|
|
2109
2146
|
return true;
|
|
2110
2147
|
} else {
|
|
2111
2148
|
return false;
|
|
2112
2149
|
}
|
|
2113
2150
|
}
|
|
2114
2151
|
case 25: {
|
|
2115
|
-
if (
|
|
2152
|
+
if (_x_115.$tag === 25) {
|
|
2116
2153
|
return true;
|
|
2117
2154
|
} else {
|
|
2118
2155
|
return false;
|
|
2119
2156
|
}
|
|
2120
2157
|
}
|
|
2121
2158
|
case 26: {
|
|
2122
|
-
if (
|
|
2159
|
+
if (_x_115.$tag === 26) {
|
|
2123
2160
|
return true;
|
|
2124
2161
|
} else {
|
|
2125
2162
|
return false;
|
|
2126
2163
|
}
|
|
2127
2164
|
}
|
|
2128
2165
|
case 27: {
|
|
2129
|
-
if (
|
|
2166
|
+
if (_x_115.$tag === 27) {
|
|
2130
2167
|
return true;
|
|
2131
2168
|
} else {
|
|
2132
2169
|
return false;
|
|
2133
2170
|
}
|
|
2134
2171
|
}
|
|
2135
2172
|
case 28: {
|
|
2136
|
-
if (
|
|
2173
|
+
if (_x_115.$tag === 28) {
|
|
2137
2174
|
return true;
|
|
2138
2175
|
} else {
|
|
2139
2176
|
return false;
|
|
2140
2177
|
}
|
|
2141
2178
|
}
|
|
2142
2179
|
case 29: {
|
|
2143
|
-
if (
|
|
2180
|
+
if (_x_115.$tag === 29) {
|
|
2144
2181
|
return true;
|
|
2145
2182
|
} else {
|
|
2146
2183
|
return false;
|
|
2147
2184
|
}
|
|
2148
2185
|
}
|
|
2149
2186
|
case 30: {
|
|
2150
|
-
if (
|
|
2187
|
+
if (_x_115.$tag === 30) {
|
|
2151
2188
|
return true;
|
|
2152
2189
|
} else {
|
|
2153
2190
|
return false;
|
|
2154
2191
|
}
|
|
2155
2192
|
}
|
|
2156
2193
|
case 31: {
|
|
2157
|
-
if (
|
|
2194
|
+
if (_x_115.$tag === 31) {
|
|
2158
2195
|
return true;
|
|
2159
2196
|
} else {
|
|
2160
2197
|
return false;
|
|
2161
2198
|
}
|
|
2162
2199
|
}
|
|
2163
2200
|
case 32: {
|
|
2164
|
-
if (
|
|
2201
|
+
if (_x_115.$tag === 32) {
|
|
2165
2202
|
return true;
|
|
2166
2203
|
} else {
|
|
2167
2204
|
return false;
|
|
2168
2205
|
}
|
|
2169
2206
|
}
|
|
2170
2207
|
case 33: {
|
|
2171
|
-
if (
|
|
2208
|
+
if (_x_115.$tag === 33) {
|
|
2172
2209
|
return true;
|
|
2173
2210
|
} else {
|
|
2174
2211
|
return false;
|
|
2175
2212
|
}
|
|
2176
2213
|
}
|
|
2177
2214
|
case 34: {
|
|
2178
|
-
if (
|
|
2215
|
+
if (_x_115.$tag === 34) {
|
|
2179
2216
|
return true;
|
|
2180
2217
|
} else {
|
|
2181
2218
|
return false;
|
|
2182
2219
|
}
|
|
2183
2220
|
}
|
|
2184
2221
|
case 35: {
|
|
2185
|
-
if (
|
|
2222
|
+
if (_x_115.$tag === 35) {
|
|
2186
2223
|
return true;
|
|
2187
2224
|
} else {
|
|
2188
2225
|
return false;
|
|
2189
2226
|
}
|
|
2190
2227
|
}
|
|
2191
2228
|
case 36: {
|
|
2192
|
-
if (
|
|
2229
|
+
if (_x_115.$tag === 36) {
|
|
2193
2230
|
return true;
|
|
2194
2231
|
} else {
|
|
2195
2232
|
return false;
|
|
2196
2233
|
}
|
|
2197
2234
|
}
|
|
2198
2235
|
case 37: {
|
|
2199
|
-
if (
|
|
2236
|
+
if (_x_115.$tag === 37) {
|
|
2200
2237
|
return true;
|
|
2201
2238
|
} else {
|
|
2202
2239
|
return false;
|
|
2203
2240
|
}
|
|
2204
2241
|
}
|
|
2205
2242
|
case 38: {
|
|
2206
|
-
if (
|
|
2243
|
+
if (_x_115.$tag === 38) {
|
|
2207
2244
|
return true;
|
|
2208
2245
|
} else {
|
|
2209
2246
|
return false;
|
|
2210
2247
|
}
|
|
2211
2248
|
}
|
|
2212
2249
|
case 39: {
|
|
2213
|
-
if (
|
|
2250
|
+
if (_x_115.$tag === 39) {
|
|
2214
2251
|
return true;
|
|
2215
2252
|
} else {
|
|
2216
2253
|
return false;
|
|
2217
2254
|
}
|
|
2218
2255
|
}
|
|
2219
2256
|
case 40: {
|
|
2220
|
-
if (
|
|
2257
|
+
if (_x_115.$tag === 40) {
|
|
2221
2258
|
return true;
|
|
2222
2259
|
} else {
|
|
2223
2260
|
return false;
|
|
2224
2261
|
}
|
|
2225
2262
|
}
|
|
2226
2263
|
case 41: {
|
|
2227
|
-
if (
|
|
2264
|
+
if (_x_115.$tag === 41) {
|
|
2228
2265
|
return true;
|
|
2229
2266
|
} else {
|
|
2230
2267
|
return false;
|
|
2231
2268
|
}
|
|
2232
2269
|
}
|
|
2233
2270
|
case 42: {
|
|
2234
|
-
if (
|
|
2271
|
+
if (_x_115.$tag === 42) {
|
|
2235
2272
|
return true;
|
|
2236
2273
|
} else {
|
|
2237
2274
|
return false;
|
|
2238
2275
|
}
|
|
2239
2276
|
}
|
|
2240
2277
|
case 43: {
|
|
2241
|
-
if (
|
|
2278
|
+
if (_x_115.$tag === 43) {
|
|
2242
2279
|
return true;
|
|
2243
2280
|
} else {
|
|
2244
2281
|
return false;
|
|
2245
2282
|
}
|
|
2246
2283
|
}
|
|
2247
2284
|
case 44: {
|
|
2248
|
-
if (
|
|
2285
|
+
if (_x_115.$tag === 44) {
|
|
2249
2286
|
return true;
|
|
2250
2287
|
} else {
|
|
2251
2288
|
return false;
|
|
2252
2289
|
}
|
|
2253
2290
|
}
|
|
2254
2291
|
case 45: {
|
|
2255
|
-
if (
|
|
2292
|
+
if (_x_115.$tag === 45) {
|
|
2256
2293
|
return true;
|
|
2257
2294
|
} else {
|
|
2258
2295
|
return false;
|
|
2259
2296
|
}
|
|
2260
2297
|
}
|
|
2261
2298
|
case 46: {
|
|
2262
|
-
if (
|
|
2299
|
+
if (_x_115.$tag === 46) {
|
|
2263
2300
|
return true;
|
|
2264
2301
|
} else {
|
|
2265
2302
|
return false;
|
|
2266
2303
|
}
|
|
2267
2304
|
}
|
|
2268
2305
|
case 47: {
|
|
2269
|
-
if (
|
|
2306
|
+
if (_x_115.$tag === 47) {
|
|
2270
2307
|
return true;
|
|
2271
2308
|
} else {
|
|
2272
2309
|
return false;
|
|
2273
2310
|
}
|
|
2274
2311
|
}
|
|
2275
2312
|
case 48: {
|
|
2276
|
-
if (
|
|
2313
|
+
if (_x_115.$tag === 48) {
|
|
2277
2314
|
return true;
|
|
2278
2315
|
} else {
|
|
2279
2316
|
return false;
|
|
2280
2317
|
}
|
|
2281
2318
|
}
|
|
2282
2319
|
case 49: {
|
|
2283
|
-
if (
|
|
2320
|
+
if (_x_115.$tag === 49) {
|
|
2284
2321
|
return true;
|
|
2285
2322
|
} else {
|
|
2286
2323
|
return false;
|
|
2287
2324
|
}
|
|
2288
2325
|
}
|
|
2289
2326
|
case 50: {
|
|
2290
|
-
if (
|
|
2327
|
+
if (_x_115.$tag === 50) {
|
|
2291
2328
|
return true;
|
|
2292
2329
|
} else {
|
|
2293
2330
|
return false;
|
|
2294
2331
|
}
|
|
2295
2332
|
}
|
|
2296
2333
|
case 51: {
|
|
2297
|
-
if (
|
|
2334
|
+
if (_x_115.$tag === 51) {
|
|
2298
2335
|
return true;
|
|
2299
2336
|
} else {
|
|
2300
2337
|
return false;
|
|
2301
2338
|
}
|
|
2302
2339
|
}
|
|
2303
2340
|
case 52: {
|
|
2304
|
-
if (
|
|
2341
|
+
if (_x_115.$tag === 52) {
|
|
2305
2342
|
return true;
|
|
2306
2343
|
} else {
|
|
2307
2344
|
return false;
|
|
2308
2345
|
}
|
|
2309
2346
|
}
|
|
2310
2347
|
case 53: {
|
|
2311
|
-
if (
|
|
2348
|
+
if (_x_115.$tag === 53) {
|
|
2312
2349
|
return true;
|
|
2313
2350
|
} else {
|
|
2314
2351
|
return false;
|
|
2315
2352
|
}
|
|
2316
2353
|
}
|
|
2317
2354
|
case 54: {
|
|
2318
|
-
if (
|
|
2355
|
+
if (_x_115.$tag === 54) {
|
|
2319
2356
|
return true;
|
|
2320
2357
|
} else {
|
|
2321
2358
|
return false;
|
|
2322
2359
|
}
|
|
2323
2360
|
}
|
|
2324
2361
|
case 55: {
|
|
2325
|
-
if (
|
|
2362
|
+
if (_x_115.$tag === 55) {
|
|
2326
2363
|
return true;
|
|
2327
2364
|
} else {
|
|
2328
2365
|
return false;
|
|
2329
2366
|
}
|
|
2330
2367
|
}
|
|
2331
2368
|
case 56: {
|
|
2332
|
-
if (
|
|
2369
|
+
if (_x_115.$tag === 56) {
|
|
2333
2370
|
return true;
|
|
2334
2371
|
} else {
|
|
2335
2372
|
return false;
|
|
2336
2373
|
}
|
|
2337
2374
|
}
|
|
2338
2375
|
case 57: {
|
|
2339
|
-
if (
|
|
2376
|
+
if (_x_115.$tag === 57) {
|
|
2340
2377
|
return true;
|
|
2341
2378
|
} else {
|
|
2342
2379
|
return false;
|
|
2343
2380
|
}
|
|
2344
2381
|
}
|
|
2345
2382
|
case 58: {
|
|
2346
|
-
if (
|
|
2383
|
+
if (_x_115.$tag === 58) {
|
|
2347
2384
|
return true;
|
|
2348
2385
|
} else {
|
|
2349
2386
|
return false;
|
|
2350
2387
|
}
|
|
2351
2388
|
}
|
|
2352
2389
|
case 59: {
|
|
2353
|
-
if (
|
|
2390
|
+
if (_x_115.$tag === 59) {
|
|
2354
2391
|
return true;
|
|
2355
2392
|
} else {
|
|
2356
2393
|
return false;
|
|
2357
2394
|
}
|
|
2358
2395
|
}
|
|
2359
2396
|
case 60: {
|
|
2360
|
-
if (
|
|
2397
|
+
if (_x_115.$tag === 60) {
|
|
2361
2398
|
return true;
|
|
2362
2399
|
} else {
|
|
2363
2400
|
return false;
|
|
2364
2401
|
}
|
|
2365
2402
|
}
|
|
2366
2403
|
case 61: {
|
|
2367
|
-
if (
|
|
2404
|
+
if (_x_115.$tag === 61) {
|
|
2368
2405
|
return true;
|
|
2369
2406
|
} else {
|
|
2370
2407
|
return false;
|
|
2371
2408
|
}
|
|
2372
2409
|
}
|
|
2373
2410
|
case 62: {
|
|
2374
|
-
if (
|
|
2411
|
+
if (_x_115.$tag === 62) {
|
|
2375
2412
|
return true;
|
|
2376
2413
|
} else {
|
|
2377
2414
|
return false;
|
|
2378
2415
|
}
|
|
2379
2416
|
}
|
|
2380
2417
|
case 63: {
|
|
2381
|
-
if (
|
|
2418
|
+
if (_x_115.$tag === 63) {
|
|
2382
2419
|
return true;
|
|
2383
2420
|
} else {
|
|
2384
2421
|
return false;
|
|
2385
2422
|
}
|
|
2386
2423
|
}
|
|
2387
2424
|
case 64: {
|
|
2388
|
-
if (
|
|
2425
|
+
if (_x_115.$tag === 64) {
|
|
2389
2426
|
return true;
|
|
2390
2427
|
} else {
|
|
2391
2428
|
return false;
|
|
2392
2429
|
}
|
|
2393
2430
|
}
|
|
2394
2431
|
case 65: {
|
|
2395
|
-
if (
|
|
2432
|
+
if (_x_115.$tag === 65) {
|
|
2396
2433
|
return true;
|
|
2397
2434
|
} else {
|
|
2398
2435
|
return false;
|
|
2399
2436
|
}
|
|
2400
2437
|
}
|
|
2401
2438
|
case 66: {
|
|
2402
|
-
if (
|
|
2439
|
+
if (_x_115.$tag === 66) {
|
|
2403
2440
|
return true;
|
|
2404
2441
|
} else {
|
|
2405
2442
|
return false;
|
|
2406
2443
|
}
|
|
2407
2444
|
}
|
|
2408
2445
|
case 67: {
|
|
2409
|
-
if (
|
|
2446
|
+
if (_x_115.$tag === 67) {
|
|
2410
2447
|
return true;
|
|
2411
2448
|
} else {
|
|
2412
2449
|
return false;
|
|
2413
2450
|
}
|
|
2414
2451
|
}
|
|
2415
2452
|
case 68: {
|
|
2416
|
-
if (
|
|
2453
|
+
if (_x_115.$tag === 68) {
|
|
2417
2454
|
return true;
|
|
2418
2455
|
} else {
|
|
2419
2456
|
return false;
|
|
2420
2457
|
}
|
|
2421
2458
|
}
|
|
2422
2459
|
case 69: {
|
|
2423
|
-
if (
|
|
2460
|
+
if (_x_115.$tag === 69) {
|
|
2424
2461
|
return true;
|
|
2425
2462
|
} else {
|
|
2426
2463
|
return false;
|
|
2427
2464
|
}
|
|
2428
2465
|
}
|
|
2429
2466
|
case 70: {
|
|
2430
|
-
if (
|
|
2467
|
+
if (_x_115.$tag === 70) {
|
|
2431
2468
|
return true;
|
|
2432
2469
|
} else {
|
|
2433
2470
|
return false;
|
|
2434
2471
|
}
|
|
2435
2472
|
}
|
|
2436
2473
|
case 71: {
|
|
2437
|
-
if (
|
|
2474
|
+
if (_x_115.$tag === 71) {
|
|
2438
2475
|
return true;
|
|
2439
2476
|
} else {
|
|
2440
2477
|
return false;
|
|
2441
2478
|
}
|
|
2442
2479
|
}
|
|
2443
2480
|
case 72: {
|
|
2444
|
-
if (
|
|
2481
|
+
if (_x_115.$tag === 72) {
|
|
2445
2482
|
return true;
|
|
2446
2483
|
} else {
|
|
2447
2484
|
return false;
|
|
2448
2485
|
}
|
|
2449
2486
|
}
|
|
2450
2487
|
case 73: {
|
|
2451
|
-
if (
|
|
2488
|
+
if (_x_115.$tag === 73) {
|
|
2452
2489
|
return true;
|
|
2453
2490
|
} else {
|
|
2454
2491
|
return false;
|
|
2455
2492
|
}
|
|
2456
2493
|
}
|
|
2457
2494
|
case 74: {
|
|
2458
|
-
if (
|
|
2495
|
+
if (_x_115.$tag === 74) {
|
|
2459
2496
|
return true;
|
|
2460
2497
|
} else {
|
|
2461
2498
|
return false;
|
|
2462
2499
|
}
|
|
2463
2500
|
}
|
|
2464
2501
|
case 75: {
|
|
2465
|
-
if (
|
|
2502
|
+
if (_x_115.$tag === 75) {
|
|
2466
2503
|
return true;
|
|
2467
2504
|
} else {
|
|
2468
2505
|
return false;
|
|
2469
2506
|
}
|
|
2470
2507
|
}
|
|
2471
2508
|
case 76: {
|
|
2472
|
-
if (
|
|
2509
|
+
if (_x_115.$tag === 76) {
|
|
2473
2510
|
return true;
|
|
2474
2511
|
} else {
|
|
2475
2512
|
return false;
|
|
2476
2513
|
}
|
|
2477
2514
|
}
|
|
2478
2515
|
case 77: {
|
|
2479
|
-
if (
|
|
2516
|
+
if (_x_115.$tag === 77) {
|
|
2480
2517
|
return true;
|
|
2481
2518
|
} else {
|
|
2482
2519
|
return false;
|
|
2483
2520
|
}
|
|
2484
2521
|
}
|
|
2485
2522
|
case 78: {
|
|
2486
|
-
if (
|
|
2523
|
+
if (_x_115.$tag === 78) {
|
|
2487
2524
|
return true;
|
|
2488
2525
|
} else {
|
|
2489
2526
|
return false;
|
|
2490
2527
|
}
|
|
2491
2528
|
}
|
|
2492
2529
|
case 79: {
|
|
2493
|
-
if (
|
|
2530
|
+
if (_x_115.$tag === 79) {
|
|
2494
2531
|
return true;
|
|
2495
2532
|
} else {
|
|
2496
2533
|
return false;
|
|
2497
2534
|
}
|
|
2498
2535
|
}
|
|
2499
2536
|
case 80: {
|
|
2500
|
-
if (
|
|
2537
|
+
if (_x_115.$tag === 80) {
|
|
2501
2538
|
return true;
|
|
2502
2539
|
} else {
|
|
2503
2540
|
return false;
|
|
2504
2541
|
}
|
|
2505
2542
|
}
|
|
2506
2543
|
case 81: {
|
|
2507
|
-
if (
|
|
2544
|
+
if (_x_115.$tag === 81) {
|
|
2508
2545
|
return true;
|
|
2509
2546
|
} else {
|
|
2510
2547
|
return false;
|
|
2511
2548
|
}
|
|
2512
2549
|
}
|
|
2513
2550
|
case 82: {
|
|
2514
|
-
if (
|
|
2551
|
+
if (_x_115.$tag === 82) {
|
|
2515
2552
|
return true;
|
|
2516
2553
|
} else {
|
|
2517
2554
|
return false;
|
|
2518
2555
|
}
|
|
2519
2556
|
}
|
|
2520
2557
|
case 83: {
|
|
2521
|
-
if (
|
|
2558
|
+
if (_x_115.$tag === 83) {
|
|
2522
2559
|
return true;
|
|
2523
2560
|
} else {
|
|
2524
2561
|
return false;
|
|
2525
2562
|
}
|
|
2526
2563
|
}
|
|
2527
2564
|
case 84: {
|
|
2528
|
-
if (
|
|
2565
|
+
if (_x_115.$tag === 84) {
|
|
2529
2566
|
return true;
|
|
2530
2567
|
} else {
|
|
2531
2568
|
return false;
|
|
2532
2569
|
}
|
|
2533
2570
|
}
|
|
2534
2571
|
case 85: {
|
|
2535
|
-
if (
|
|
2572
|
+
if (_x_115.$tag === 85) {
|
|
2536
2573
|
return true;
|
|
2537
2574
|
} else {
|
|
2538
2575
|
return false;
|
|
2539
2576
|
}
|
|
2540
2577
|
}
|
|
2541
2578
|
case 86: {
|
|
2542
|
-
if (
|
|
2579
|
+
if (_x_115.$tag === 86) {
|
|
2543
2580
|
return true;
|
|
2544
2581
|
} else {
|
|
2545
2582
|
return false;
|
|
2546
2583
|
}
|
|
2547
2584
|
}
|
|
2548
2585
|
case 87: {
|
|
2549
|
-
if (
|
|
2586
|
+
if (_x_115.$tag === 87) {
|
|
2550
2587
|
return true;
|
|
2551
2588
|
} else {
|
|
2552
2589
|
return false;
|
|
2553
2590
|
}
|
|
2554
2591
|
}
|
|
2555
2592
|
case 88: {
|
|
2556
|
-
if (
|
|
2593
|
+
if (_x_115.$tag === 88) {
|
|
2557
2594
|
return true;
|
|
2558
2595
|
} else {
|
|
2559
2596
|
return false;
|
|
2560
2597
|
}
|
|
2561
2598
|
}
|
|
2562
2599
|
case 89: {
|
|
2563
|
-
if (
|
|
2600
|
+
if (_x_115.$tag === 89) {
|
|
2564
2601
|
return true;
|
|
2565
2602
|
} else {
|
|
2566
2603
|
return false;
|
|
2567
2604
|
}
|
|
2568
2605
|
}
|
|
2569
2606
|
case 90: {
|
|
2570
|
-
if (
|
|
2607
|
+
if (_x_115.$tag === 90) {
|
|
2571
2608
|
return true;
|
|
2572
2609
|
} else {
|
|
2573
2610
|
return false;
|
|
2574
2611
|
}
|
|
2575
2612
|
}
|
|
2576
2613
|
case 91: {
|
|
2577
|
-
if (
|
|
2614
|
+
if (_x_115.$tag === 91) {
|
|
2578
2615
|
return true;
|
|
2579
2616
|
} else {
|
|
2580
2617
|
return false;
|
|
2581
2618
|
}
|
|
2582
2619
|
}
|
|
2583
2620
|
case 92: {
|
|
2584
|
-
if (
|
|
2621
|
+
if (_x_115.$tag === 92) {
|
|
2585
2622
|
return true;
|
|
2586
2623
|
} else {
|
|
2587
2624
|
return false;
|
|
2588
2625
|
}
|
|
2589
2626
|
}
|
|
2590
2627
|
case 93: {
|
|
2591
|
-
if (
|
|
2628
|
+
if (_x_115.$tag === 93) {
|
|
2592
2629
|
return true;
|
|
2593
2630
|
} else {
|
|
2594
2631
|
return false;
|
|
2595
2632
|
}
|
|
2596
2633
|
}
|
|
2597
2634
|
case 94: {
|
|
2598
|
-
if (
|
|
2635
|
+
if (_x_115.$tag === 94) {
|
|
2599
2636
|
return true;
|
|
2600
2637
|
} else {
|
|
2601
2638
|
return false;
|
|
2602
2639
|
}
|
|
2603
2640
|
}
|
|
2604
2641
|
case 95: {
|
|
2605
|
-
if (
|
|
2642
|
+
if (_x_115.$tag === 95) {
|
|
2606
2643
|
return true;
|
|
2607
2644
|
} else {
|
|
2608
2645
|
return false;
|
|
2609
2646
|
}
|
|
2610
2647
|
}
|
|
2611
2648
|
case 96: {
|
|
2612
|
-
if (
|
|
2649
|
+
if (_x_115.$tag === 96) {
|
|
2613
2650
|
return true;
|
|
2614
2651
|
} else {
|
|
2615
2652
|
return false;
|
|
2616
2653
|
}
|
|
2617
2654
|
}
|
|
2618
2655
|
case 97: {
|
|
2619
|
-
if (
|
|
2656
|
+
if (_x_115.$tag === 97) {
|
|
2620
2657
|
return true;
|
|
2621
2658
|
} else {
|
|
2622
2659
|
return false;
|
|
2623
2660
|
}
|
|
2624
2661
|
}
|
|
2625
2662
|
case 98: {
|
|
2626
|
-
if (
|
|
2663
|
+
if (_x_115.$tag === 98) {
|
|
2627
2664
|
return true;
|
|
2628
2665
|
} else {
|
|
2629
2666
|
return false;
|
|
2630
2667
|
}
|
|
2631
2668
|
}
|
|
2632
2669
|
case 99: {
|
|
2633
|
-
if (
|
|
2670
|
+
if (_x_115.$tag === 99) {
|
|
2634
2671
|
return true;
|
|
2635
2672
|
} else {
|
|
2636
2673
|
return false;
|
|
2637
2674
|
}
|
|
2638
2675
|
}
|
|
2639
2676
|
case 100: {
|
|
2640
|
-
if (
|
|
2677
|
+
if (_x_115.$tag === 100) {
|
|
2641
2678
|
return true;
|
|
2642
2679
|
} else {
|
|
2643
2680
|
return false;
|
|
2644
2681
|
}
|
|
2645
2682
|
}
|
|
2646
2683
|
case 101: {
|
|
2647
|
-
if (
|
|
2684
|
+
if (_x_115.$tag === 101) {
|
|
2648
2685
|
return true;
|
|
2649
2686
|
} else {
|
|
2650
2687
|
return false;
|
|
2651
2688
|
}
|
|
2652
2689
|
}
|
|
2653
2690
|
case 102: {
|
|
2654
|
-
if (
|
|
2691
|
+
if (_x_115.$tag === 102) {
|
|
2655
2692
|
return true;
|
|
2656
2693
|
} else {
|
|
2657
2694
|
return false;
|
|
2658
2695
|
}
|
|
2659
2696
|
}
|
|
2660
2697
|
case 103: {
|
|
2661
|
-
if (
|
|
2698
|
+
if (_x_115.$tag === 103) {
|
|
2662
2699
|
return true;
|
|
2663
2700
|
} else {
|
|
2664
2701
|
return false;
|
|
2665
2702
|
}
|
|
2666
2703
|
}
|
|
2667
2704
|
case 104: {
|
|
2668
|
-
if (
|
|
2705
|
+
if (_x_115.$tag === 104) {
|
|
2669
2706
|
return true;
|
|
2670
2707
|
} else {
|
|
2671
2708
|
return false;
|
|
2672
2709
|
}
|
|
2673
2710
|
}
|
|
2674
2711
|
case 105: {
|
|
2675
|
-
if (
|
|
2712
|
+
if (_x_115.$tag === 105) {
|
|
2676
2713
|
return true;
|
|
2677
2714
|
} else {
|
|
2678
2715
|
return false;
|
|
2679
2716
|
}
|
|
2680
2717
|
}
|
|
2681
2718
|
case 106: {
|
|
2682
|
-
if (
|
|
2719
|
+
if (_x_115.$tag === 106) {
|
|
2683
2720
|
return true;
|
|
2684
2721
|
} else {
|
|
2685
2722
|
return false;
|
|
2686
2723
|
}
|
|
2687
2724
|
}
|
|
2688
2725
|
case 107: {
|
|
2689
|
-
if (
|
|
2726
|
+
if (_x_115.$tag === 107) {
|
|
2690
2727
|
return true;
|
|
2691
2728
|
} else {
|
|
2692
2729
|
return false;
|
|
2693
2730
|
}
|
|
2694
2731
|
}
|
|
2695
2732
|
case 108: {
|
|
2696
|
-
if (
|
|
2733
|
+
if (_x_115.$tag === 108) {
|
|
2697
2734
|
return true;
|
|
2698
2735
|
} else {
|
|
2699
2736
|
return false;
|
|
2700
2737
|
}
|
|
2701
2738
|
}
|
|
2702
2739
|
case 109: {
|
|
2703
|
-
const _Indent =
|
|
2704
|
-
const _$42$
|
|
2705
|
-
if (
|
|
2706
|
-
const _Indent$2 =
|
|
2707
|
-
const _$42$
|
|
2708
|
-
|
|
2709
|
-
|
|
2740
|
+
const _Indent = _x_114;
|
|
2741
|
+
const _$42$x0_130 = _Indent._0;
|
|
2742
|
+
if (_x_115.$tag === 109) {
|
|
2743
|
+
const _Indent$2 = _x_115;
|
|
2744
|
+
const _$42$y0_131 = _Indent$2._0;
|
|
2745
|
+
_x0_130 = _$42$x0_130;
|
|
2746
|
+
_y0_131 = _$42$y0_131;
|
|
2710
2747
|
break _L$5;
|
|
2711
2748
|
} else {
|
|
2712
2749
|
return false;
|
|
2713
2750
|
}
|
|
2714
2751
|
}
|
|
2715
2752
|
case 110: {
|
|
2716
|
-
const _InterpStr =
|
|
2717
|
-
const _$42$
|
|
2718
|
-
if (
|
|
2719
|
-
const _InterpStr$2 =
|
|
2720
|
-
const _$42$
|
|
2721
|
-
|
|
2722
|
-
|
|
2753
|
+
const _InterpStr = _x_114;
|
|
2754
|
+
const _$42$x0_132 = _InterpStr._0;
|
|
2755
|
+
if (_x_115.$tag === 110) {
|
|
2756
|
+
const _InterpStr$2 = _x_115;
|
|
2757
|
+
const _$42$y0_133 = _InterpStr$2._0;
|
|
2758
|
+
_x0_132 = _$42$x0_132;
|
|
2759
|
+
_y0_133 = _$42$y0_133;
|
|
2723
2760
|
break _L$4;
|
|
2724
2761
|
} else {
|
|
2725
2762
|
return false;
|
|
2726
2763
|
}
|
|
2727
2764
|
}
|
|
2728
2765
|
case 111: {
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
if (_x_103.$tag === 111) {
|
|
2732
|
-
const _Shebang$2 = _x_103;
|
|
2733
|
-
const _$42$y0_123 = _Shebang$2._0;
|
|
2734
|
-
_x0_122 = _$42$x0_122;
|
|
2735
|
-
_y0_123 = _$42$y0_123;
|
|
2736
|
-
break _L$3;
|
|
2766
|
+
if (_x_115.$tag === 111) {
|
|
2767
|
+
return true;
|
|
2737
2768
|
} else {
|
|
2738
2769
|
return false;
|
|
2739
2770
|
}
|
|
2740
2771
|
}
|
|
2741
2772
|
case 112: {
|
|
2742
|
-
const
|
|
2743
|
-
const _$42$
|
|
2744
|
-
if (
|
|
2745
|
-
const
|
|
2746
|
-
const _$42$
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
break _L$
|
|
2773
|
+
const _Shebang = _x_114;
|
|
2774
|
+
const _$42$x0_134 = _Shebang._0;
|
|
2775
|
+
if (_x_115.$tag === 112) {
|
|
2776
|
+
const _Shebang$2 = _x_115;
|
|
2777
|
+
const _$42$y0_135 = _Shebang$2._0;
|
|
2778
|
+
_x0_134 = _$42$x0_134;
|
|
2779
|
+
_y0_135 = _$42$y0_135;
|
|
2780
|
+
break _L$3;
|
|
2750
2781
|
} else {
|
|
2751
2782
|
return false;
|
|
2752
2783
|
}
|
|
2753
2784
|
}
|
|
2754
2785
|
case 113: {
|
|
2755
|
-
const
|
|
2756
|
-
const _$42$
|
|
2757
|
-
if (
|
|
2758
|
-
const
|
|
2759
|
-
const _$42$
|
|
2760
|
-
|
|
2761
|
-
|
|
2786
|
+
const _Comment = _x_114;
|
|
2787
|
+
const _$42$x0_136 = _Comment._0;
|
|
2788
|
+
if (_x_115.$tag === 113) {
|
|
2789
|
+
const _Comment$2 = _x_115;
|
|
2790
|
+
const _$42$y0_137 = _Comment$2._0;
|
|
2791
|
+
_x0_136 = _$42$x0_136;
|
|
2792
|
+
_y0_137 = _$42$y0_137;
|
|
2793
|
+
break _L$2;
|
|
2794
|
+
} else {
|
|
2795
|
+
return false;
|
|
2796
|
+
}
|
|
2797
|
+
}
|
|
2798
|
+
case 114: {
|
|
2799
|
+
const _BlockComment = _x_114;
|
|
2800
|
+
const _$42$x0_138 = _BlockComment._0;
|
|
2801
|
+
if (_x_115.$tag === 114) {
|
|
2802
|
+
const _BlockComment$2 = _x_115;
|
|
2803
|
+
const _$42$y0_139 = _BlockComment$2._0;
|
|
2804
|
+
_x0_138 = _$42$x0_138;
|
|
2805
|
+
_y0_139 = _$42$y0_139;
|
|
2762
2806
|
break _L;
|
|
2763
2807
|
} else {
|
|
2764
2808
|
return false;
|
|
2765
2809
|
}
|
|
2766
2810
|
}
|
|
2767
2811
|
default: {
|
|
2768
|
-
if (
|
|
2812
|
+
if (_x_115.$tag === 115) {
|
|
2769
2813
|
return true;
|
|
2770
2814
|
} else {
|
|
2771
2815
|
return false;
|
|
@@ -2773,27 +2817,27 @@ function _M0IP48username4core3src5lexer9TokenKindPB2Eq5equal(_x_102, _x_103) {
|
|
|
2773
2817
|
}
|
|
2774
2818
|
}
|
|
2775
2819
|
}
|
|
2776
|
-
return
|
|
2820
|
+
return _x0_116 === _y0_117;
|
|
2777
2821
|
}
|
|
2778
|
-
return
|
|
2822
|
+
return _x0_118 === _y0_119;
|
|
2779
2823
|
}
|
|
2780
|
-
return
|
|
2824
|
+
return _x0_120 === _y0_121;
|
|
2781
2825
|
}
|
|
2782
|
-
return
|
|
2826
|
+
return _x0_122 === _y0_123;
|
|
2783
2827
|
}
|
|
2784
|
-
return
|
|
2828
|
+
return _x0_124 === _y0_126 && _x1_125 === _y1_127;
|
|
2785
2829
|
}
|
|
2786
|
-
return
|
|
2830
|
+
return _x0_128 === _y0_129;
|
|
2787
2831
|
}
|
|
2788
|
-
return
|
|
2832
|
+
return _x0_130 === _y0_131;
|
|
2789
2833
|
}
|
|
2790
|
-
return _M0IPC15array5ArrayPB2Eq5equalGsE(
|
|
2834
|
+
return _M0IPC15array5ArrayPB2Eq5equalGsE(_x0_132, _y0_133);
|
|
2791
2835
|
}
|
|
2792
|
-
return
|
|
2836
|
+
return _x0_134 === _y0_135;
|
|
2793
2837
|
}
|
|
2794
|
-
return
|
|
2838
|
+
return _x0_136 === _y0_137;
|
|
2795
2839
|
}
|
|
2796
|
-
return
|
|
2840
|
+
return _x0_138 === _y0_139;
|
|
2797
2841
|
}
|
|
2798
2842
|
function _M0MP48username4core3src5lexer5Lexer3new(source) {
|
|
2799
2843
|
const chars = _M0MPC16string6String9to__array(source);
|
|
@@ -2937,7 +2981,7 @@ function _M0MP48username4core3src5lexer5Lexer20scan__block__comment(self) {
|
|
|
2937
2981
|
_M0MP48username4core3src5lexer5Lexer7advance(self);
|
|
2938
2982
|
_M0MP48username4core3src5lexer5Lexer7advance(self);
|
|
2939
2983
|
_M0MP48username4core3src5lexer5Lexer7advance(self);
|
|
2940
|
-
const buf =
|
|
2984
|
+
const buf = _M0MPB13StringBuilder21StringBuilder_2einner(0);
|
|
2941
2985
|
while (true) {
|
|
2942
2986
|
if (self.pos < self.chars.length) {
|
|
2943
2987
|
if (_M0MP48username4core3src5lexer5Lexer4peek(self) === 45 && (_M0MP48username4core3src5lexer5Lexer8peek__at(self, 1) === 45 && _M0MP48username4core3src5lexer5Lexer8peek__at(self, 2) === 45)) {
|
|
@@ -2957,7 +3001,7 @@ function _M0MP48username4core3src5lexer5Lexer20scan__block__comment(self) {
|
|
|
2957
3001
|
function _M0MP48username4core3src5lexer5Lexer11scan__ident(self) {
|
|
2958
3002
|
const line = self.line;
|
|
2959
3003
|
const col = self.col;
|
|
2960
|
-
const buf =
|
|
3004
|
+
const buf = _M0MPB13StringBuilder21StringBuilder_2einner(0);
|
|
2961
3005
|
_M0IPB13StringBuilderPB6Logger11write__char(buf, _M0MP48username4core3src5lexer5Lexer7advance(self));
|
|
2962
3006
|
while (true) {
|
|
2963
3007
|
if (self.pos < self.chars.length && _M0FP48username4core3src5lexer15is__ident__char(_M0MP48username4core3src5lexer5Lexer4peek(self))) {
|
|
@@ -3350,6 +3394,10 @@ function _M0MP48username4core3src5lexer5Lexer11scan__ident(self) {
|
|
|
3350
3394
|
kind = _M0DTP48username4core3src5lexer9TokenKind5Set____;
|
|
3351
3395
|
break;
|
|
3352
3396
|
}
|
|
3397
|
+
case "blank": {
|
|
3398
|
+
kind = _M0DTP48username4core3src5lexer9TokenKind5Blank__;
|
|
3399
|
+
break;
|
|
3400
|
+
}
|
|
3353
3401
|
default: {
|
|
3354
3402
|
kind = new _M0DTP48username4core3src5lexer9TokenKind5Ident(word);
|
|
3355
3403
|
}
|
|
@@ -3361,7 +3409,7 @@ function _M0MP48username4core3src5lexer5Lexer19scan__line__comment(self) {
|
|
|
3361
3409
|
const col = self.col;
|
|
3362
3410
|
_M0MP48username4core3src5lexer5Lexer7advance(self);
|
|
3363
3411
|
_M0MP48username4core3src5lexer5Lexer7advance(self);
|
|
3364
|
-
const buf =
|
|
3412
|
+
const buf = _M0MPB13StringBuilder21StringBuilder_2einner(0);
|
|
3365
3413
|
while (true) {
|
|
3366
3414
|
if (self.pos < self.chars.length && _M0MP48username4core3src5lexer5Lexer4peek(self) !== 10) {
|
|
3367
3415
|
_M0IPB13StringBuilderPB6Logger11write__char(buf, _M0MP48username4core3src5lexer5Lexer7advance(self));
|
|
@@ -3455,7 +3503,7 @@ function _M0MP48username4core3src5lexer5Lexer12scan__number(self) {
|
|
|
3455
3503
|
_M0MP48username4core3src5lexer5Lexer4emit(self, new _M0DTP48username4core3src5lexer9TokenKind3Int(value.val), line, col);
|
|
3456
3504
|
return undefined;
|
|
3457
3505
|
}
|
|
3458
|
-
const buf =
|
|
3506
|
+
const buf = _M0MPB13StringBuilder21StringBuilder_2einner(0);
|
|
3459
3507
|
if (negative) {
|
|
3460
3508
|
_M0IPB13StringBuilderPB6Logger11write__char(buf, 45);
|
|
3461
3509
|
}
|
|
@@ -3496,7 +3544,7 @@ function _M0MP48username4core3src5lexer5Lexer11scan__regex(self) {
|
|
|
3496
3544
|
const line = self.line;
|
|
3497
3545
|
const col = self.col;
|
|
3498
3546
|
_M0MP48username4core3src5lexer5Lexer7advance(self);
|
|
3499
|
-
const pattern =
|
|
3547
|
+
const pattern = _M0MPB13StringBuilder21StringBuilder_2einner(0);
|
|
3500
3548
|
while (true) {
|
|
3501
3549
|
if (self.pos < self.chars.length && _M0MP48username4core3src5lexer5Lexer4peek(self) !== 47) {
|
|
3502
3550
|
if (_M0MP48username4core3src5lexer5Lexer4peek(self) === 92) {
|
|
@@ -3515,7 +3563,7 @@ function _M0MP48username4core3src5lexer5Lexer11scan__regex(self) {
|
|
|
3515
3563
|
if (self.pos < self.chars.length) {
|
|
3516
3564
|
_M0MP48username4core3src5lexer5Lexer7advance(self);
|
|
3517
3565
|
}
|
|
3518
|
-
const flags =
|
|
3566
|
+
const flags = _M0MPB13StringBuilder21StringBuilder_2einner(0);
|
|
3519
3567
|
while (true) {
|
|
3520
3568
|
if (self.pos < self.chars.length) {
|
|
3521
3569
|
const ch = _M0MP48username4core3src5lexer5Lexer4peek(self);
|
|
@@ -3534,7 +3582,7 @@ function _M0MP48username4core3src5lexer5Lexer11scan__regex(self) {
|
|
|
3534
3582
|
function _M0MP48username4core3src5lexer5Lexer13scan__shebang(self) {
|
|
3535
3583
|
const line = self.line;
|
|
3536
3584
|
const col = self.col;
|
|
3537
|
-
const buf =
|
|
3585
|
+
const buf = _M0MPB13StringBuilder21StringBuilder_2einner(0);
|
|
3538
3586
|
while (true) {
|
|
3539
3587
|
if (self.pos < self.chars.length && _M0MP48username4core3src5lexer5Lexer4peek(self) !== 10) {
|
|
3540
3588
|
_M0IPB13StringBuilderPB6Logger11write__char(buf, _M0MP48username4core3src5lexer5Lexer7advance(self));
|
|
@@ -3559,7 +3607,7 @@ function _M0MP48username4core3src5lexer5Lexer12scan__string(self) {
|
|
|
3559
3607
|
_M0MP48username4core3src5lexer5Lexer7advance(self);
|
|
3560
3608
|
_M0MP48username4core3src5lexer5Lexer7advance(self);
|
|
3561
3609
|
const segments = [];
|
|
3562
|
-
const buf = new _M0TPB8MutLocalGRPB13StringBuilderE(
|
|
3610
|
+
const buf = new _M0TPB8MutLocalGRPB13StringBuilderE(_M0MPB13StringBuilder21StringBuilder_2einner(0));
|
|
3563
3611
|
const has_interp = new _M0TPB8MutLocalGbE(false);
|
|
3564
3612
|
while (true) {
|
|
3565
3613
|
if (self.pos < self.chars.length) {
|
|
@@ -3607,9 +3655,109 @@ function _M0MP48username4core3src5lexer5Lexer12scan__string(self) {
|
|
|
3607
3655
|
if (_M0MP48username4core3src5lexer5Lexer4peek(self) === 91) {
|
|
3608
3656
|
has_interp.val = true;
|
|
3609
3657
|
_M0MPC15array5Array4pushGRP48username4core3src5lexer5TokenE(segments, _M0MPB13StringBuilder10to__string(buf.val));
|
|
3610
|
-
buf.val =
|
|
3658
|
+
buf.val = _M0MPB13StringBuilder21StringBuilder_2einner(0);
|
|
3611
3659
|
_M0MP48username4core3src5lexer5Lexer7advance(self);
|
|
3612
|
-
const expr_buf =
|
|
3660
|
+
const expr_buf = _M0MPB13StringBuilder21StringBuilder_2einner(0);
|
|
3661
|
+
const depth = new _M0TPB8MutLocalGiE(1);
|
|
3662
|
+
while (true) {
|
|
3663
|
+
if (self.pos < self.chars.length && depth.val > 0) {
|
|
3664
|
+
const ch = _M0MP48username4core3src5lexer5Lexer4peek(self);
|
|
3665
|
+
if (ch === 91) {
|
|
3666
|
+
depth.val = depth.val + 1 | 0;
|
|
3667
|
+
}
|
|
3668
|
+
if (ch === 93) {
|
|
3669
|
+
depth.val = depth.val - 1 | 0;
|
|
3670
|
+
if (depth.val === 0) {
|
|
3671
|
+
_M0MP48username4core3src5lexer5Lexer7advance(self);
|
|
3672
|
+
break;
|
|
3673
|
+
}
|
|
3674
|
+
}
|
|
3675
|
+
_M0IPB13StringBuilderPB6Logger11write__char(expr_buf, _M0MP48username4core3src5lexer5Lexer7advance(self));
|
|
3676
|
+
continue;
|
|
3677
|
+
} else {
|
|
3678
|
+
break;
|
|
3679
|
+
}
|
|
3680
|
+
}
|
|
3681
|
+
_M0MPC15array5Array4pushGRP48username4core3src5lexer5TokenE(segments, _M0MPB13StringBuilder10to__string(expr_buf));
|
|
3682
|
+
continue;
|
|
3683
|
+
}
|
|
3684
|
+
_M0IPB13StringBuilderPB6Logger11write__char(buf.val, _M0MP48username4core3src5lexer5Lexer7advance(self));
|
|
3685
|
+
continue;
|
|
3686
|
+
} else {
|
|
3687
|
+
break;
|
|
3688
|
+
}
|
|
3689
|
+
}
|
|
3690
|
+
if (has_interp.val) {
|
|
3691
|
+
_M0MPC15array5Array4pushGRP48username4core3src5lexer5TokenE(segments, _M0MPB13StringBuilder10to__string(buf.val));
|
|
3692
|
+
_M0MP48username4core3src5lexer5Lexer4emit(self, new _M0DTP48username4core3src5lexer9TokenKind9InterpStr(segments), line, col);
|
|
3693
|
+
return;
|
|
3694
|
+
} else {
|
|
3695
|
+
_M0MP48username4core3src5lexer5Lexer4emit(self, new _M0DTP48username4core3src5lexer9TokenKind3Str(_M0MPB13StringBuilder10to__string(buf.val)), line, col);
|
|
3696
|
+
return;
|
|
3697
|
+
}
|
|
3698
|
+
}
|
|
3699
|
+
function _M0MP48username4core3src5lexer5Lexer21scan__string__bracket(self) {
|
|
3700
|
+
const line = self.line;
|
|
3701
|
+
const col = self.col;
|
|
3702
|
+
_M0MP48username4core3src5lexer5Lexer7advance(self);
|
|
3703
|
+
_M0MP48username4core3src5lexer5Lexer7advance(self);
|
|
3704
|
+
_M0MP48username4core3src5lexer5Lexer7advance(self);
|
|
3705
|
+
const segments = [];
|
|
3706
|
+
const buf = new _M0TPB8MutLocalGRPB13StringBuilderE(_M0MPB13StringBuilder21StringBuilder_2einner(0));
|
|
3707
|
+
const has_interp = new _M0TPB8MutLocalGbE(false);
|
|
3708
|
+
while (true) {
|
|
3709
|
+
if (self.pos < self.chars.length) {
|
|
3710
|
+
if (_M0MP48username4core3src5lexer5Lexer4peek(self) === 59 && (_M0MP48username4core3src5lexer5Lexer8peek__at(self, 1) === 47 && _M0MP48username4core3src5lexer5Lexer8peek__at(self, 2) === 47)) {
|
|
3711
|
+
_M0MP48username4core3src5lexer5Lexer7advance(self);
|
|
3712
|
+
_M0MP48username4core3src5lexer5Lexer7advance(self);
|
|
3713
|
+
_M0MP48username4core3src5lexer5Lexer7advance(self);
|
|
3714
|
+
break;
|
|
3715
|
+
}
|
|
3716
|
+
if (_M0MP48username4core3src5lexer5Lexer4peek(self) === 92) {
|
|
3717
|
+
_M0MP48username4core3src5lexer5Lexer7advance(self);
|
|
3718
|
+
const esc = _M0MP48username4core3src5lexer5Lexer7advance(self);
|
|
3719
|
+
switch (esc) {
|
|
3720
|
+
case 110: {
|
|
3721
|
+
_M0IPB13StringBuilderPB6Logger11write__char(buf.val, 10);
|
|
3722
|
+
break;
|
|
3723
|
+
}
|
|
3724
|
+
case 116: {
|
|
3725
|
+
_M0IPB13StringBuilderPB6Logger11write__char(buf.val, 9);
|
|
3726
|
+
break;
|
|
3727
|
+
}
|
|
3728
|
+
case 92: {
|
|
3729
|
+
_M0IPB13StringBuilderPB6Logger11write__char(buf.val, 92);
|
|
3730
|
+
break;
|
|
3731
|
+
}
|
|
3732
|
+
case 47: {
|
|
3733
|
+
_M0IPB13StringBuilderPB6Logger11write__char(buf.val, 47);
|
|
3734
|
+
break;
|
|
3735
|
+
}
|
|
3736
|
+
case 91: {
|
|
3737
|
+
_M0IPB13StringBuilderPB6Logger11write__char(buf.val, 91);
|
|
3738
|
+
break;
|
|
3739
|
+
}
|
|
3740
|
+
case 93: {
|
|
3741
|
+
_M0IPB13StringBuilderPB6Logger11write__char(buf.val, 93);
|
|
3742
|
+
break;
|
|
3743
|
+
}
|
|
3744
|
+
case 59: {
|
|
3745
|
+
_M0IPB13StringBuilderPB6Logger11write__char(buf.val, 59);
|
|
3746
|
+
break;
|
|
3747
|
+
}
|
|
3748
|
+
default: {
|
|
3749
|
+
_M0IPB13StringBuilderPB6Logger11write__char(buf.val, 92);
|
|
3750
|
+
_M0IPB13StringBuilderPB6Logger11write__char(buf.val, esc);
|
|
3751
|
+
}
|
|
3752
|
+
}
|
|
3753
|
+
continue;
|
|
3754
|
+
}
|
|
3755
|
+
if (_M0MP48username4core3src5lexer5Lexer4peek(self) === 91) {
|
|
3756
|
+
has_interp.val = true;
|
|
3757
|
+
_M0MPC15array5Array4pushGRP48username4core3src5lexer5TokenE(segments, _M0MPB13StringBuilder10to__string(buf.val));
|
|
3758
|
+
buf.val = _M0MPB13StringBuilder21StringBuilder_2einner(0);
|
|
3759
|
+
_M0MP48username4core3src5lexer5Lexer7advance(self);
|
|
3760
|
+
const expr_buf = _M0MPB13StringBuilder21StringBuilder_2einner(0);
|
|
3613
3761
|
const depth = new _M0TPB8MutLocalGiE(1);
|
|
3614
3762
|
while (true) {
|
|
3615
3763
|
if (self.pos < self.chars.length && depth.val > 0) {
|
|
@@ -3680,6 +3828,10 @@ function _M0MP48username4core3src5lexer5Lexer8tokenize(self) {
|
|
|
3680
3828
|
_M0MP48username4core3src5lexer5Lexer12scan__string(self);
|
|
3681
3829
|
continue;
|
|
3682
3830
|
}
|
|
3831
|
+
if (ch === 47 && (_M0MP48username4core3src5lexer5Lexer8peek__at(self, 1) === 47 && _M0MP48username4core3src5lexer5Lexer8peek__at(self, 2) === 59)) {
|
|
3832
|
+
_M0MP48username4core3src5lexer5Lexer21scan__string__bracket(self);
|
|
3833
|
+
continue;
|
|
3834
|
+
}
|
|
3683
3835
|
if (ch === 47 && _M0MP48username4core3src5lexer5Lexer8peek__at(self, 1) !== 47) {
|
|
3684
3836
|
_M0MP48username4core3src5lexer5Lexer11scan__regex(self);
|
|
3685
3837
|
continue;
|
|
@@ -3791,10 +3943,10 @@ function _M0MP48username4core3src6parser6Parser17skip__bracket__ws(self) {
|
|
|
3791
3943
|
case 109: {
|
|
3792
3944
|
break _L$2;
|
|
3793
3945
|
}
|
|
3794
|
-
case
|
|
3946
|
+
case 113: {
|
|
3795
3947
|
break _L$2;
|
|
3796
3948
|
}
|
|
3797
|
-
case
|
|
3949
|
+
case 114: {
|
|
3798
3950
|
break _L$2;
|
|
3799
3951
|
}
|
|
3800
3952
|
default: {
|
|
@@ -3822,10 +3974,10 @@ function _M0MP48username4core3src6parser6Parser21is__computed__bracket(self) {
|
|
|
3822
3974
|
case 109: {
|
|
3823
3975
|
break _L;
|
|
3824
3976
|
}
|
|
3825
|
-
case
|
|
3977
|
+
case 113: {
|
|
3826
3978
|
break _L;
|
|
3827
3979
|
}
|
|
3828
|
-
case
|
|
3980
|
+
case 114: {
|
|
3829
3981
|
break _L;
|
|
3830
3982
|
}
|
|
3831
3983
|
case 106: {
|
|
@@ -3939,66 +4091,82 @@ function _M0MP48username4core3src6parser6Parser3new(tokens) {
|
|
|
3939
4091
|
}
|
|
3940
4092
|
function _M0MP48username4core3src6parser6Parser18parse__param__list(self) {
|
|
3941
4093
|
const params = [];
|
|
3942
|
-
while (true) {
|
|
4094
|
+
_L: while (true) {
|
|
3943
4095
|
if (self.pos < self.tokens.length) {
|
|
3944
4096
|
let s;
|
|
3945
|
-
_L: {
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
4097
|
+
_L$2: {
|
|
4098
|
+
_L$3: {
|
|
4099
|
+
const _bind = _M0MP48username4core3src6parser6Parser4peek(self);
|
|
4100
|
+
switch (_bind.$tag) {
|
|
4101
|
+
case 111: {
|
|
4102
|
+
self.pos = self.pos + 1 | 0;
|
|
4103
|
+
_M0MPC15array5Array4pushGRP48username4core3src5lexer5TokenE(params, "blank");
|
|
4104
|
+
if (_M0IP48username4core3src5lexer9TokenKindPB2Eq5equal(_M0MP48username4core3src6parser6Parser4peek(self), _M0DTP48username4core3src5lexer9TokenKind9Semicolon__)) {
|
|
4105
|
+
self.pos = self.pos + 1 | 0;
|
|
4106
|
+
} else {
|
|
4107
|
+
break _L;
|
|
4108
|
+
}
|
|
4109
|
+
break;
|
|
4110
|
+
}
|
|
4111
|
+
case 7: {
|
|
4112
|
+
const _Ident = _bind;
|
|
4113
|
+
const _s = _Ident._0;
|
|
4114
|
+
s = _s;
|
|
4115
|
+
break _L$3;
|
|
4116
|
+
}
|
|
4117
|
+
default: {
|
|
4118
|
+
break _L;
|
|
4119
|
+
}
|
|
4120
|
+
}
|
|
4121
|
+
break _L$2;
|
|
3954
4122
|
}
|
|
3955
|
-
}
|
|
3956
|
-
self.pos = self.pos + 1 | 0;
|
|
3957
|
-
_M0MPC15array5Array4pushGRP48username4core3src5lexer5TokenE(params, s);
|
|
3958
|
-
if (_M0IP48username4core3src5lexer9TokenKindPB2Eq5equal(_M0MP48username4core3src6parser6Parser4peek(self), _M0DTP48username4core3src5lexer9TokenKind2Of__)) {
|
|
3959
4123
|
self.pos = self.pos + 1 | 0;
|
|
3960
|
-
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
|
|
3985
|
-
|
|
4124
|
+
_M0MPC15array5Array4pushGRP48username4core3src5lexer5TokenE(params, s);
|
|
4125
|
+
if (_M0IP48username4core3src5lexer9TokenKindPB2Eq5equal(_M0MP48username4core3src6parser6Parser4peek(self), _M0DTP48username4core3src5lexer9TokenKind2Of__)) {
|
|
4126
|
+
self.pos = self.pos + 1 | 0;
|
|
4127
|
+
while (true) {
|
|
4128
|
+
if (self.pos < self.tokens.length) {
|
|
4129
|
+
_L$4: {
|
|
4130
|
+
_L$5: {
|
|
4131
|
+
const _bind = _M0MP48username4core3src6parser6Parser4peek(self);
|
|
4132
|
+
switch (_bind.$tag) {
|
|
4133
|
+
case 102: {
|
|
4134
|
+
break _L$5;
|
|
4135
|
+
}
|
|
4136
|
+
case 108: {
|
|
4137
|
+
break _L$5;
|
|
4138
|
+
}
|
|
4139
|
+
case 115: {
|
|
4140
|
+
break _L$5;
|
|
4141
|
+
}
|
|
4142
|
+
case 39: {
|
|
4143
|
+
break _L$5;
|
|
4144
|
+
}
|
|
4145
|
+
case 61: {
|
|
4146
|
+
break _L$5;
|
|
4147
|
+
}
|
|
4148
|
+
case 7: {
|
|
4149
|
+
break _L$5;
|
|
4150
|
+
}
|
|
4151
|
+
default: {
|
|
4152
|
+
self.pos = self.pos + 1 | 0;
|
|
4153
|
+
}
|
|
3986
4154
|
}
|
|
4155
|
+
break _L$4;
|
|
3987
4156
|
}
|
|
3988
|
-
break
|
|
4157
|
+
break;
|
|
3989
4158
|
}
|
|
4159
|
+
continue;
|
|
4160
|
+
} else {
|
|
3990
4161
|
break;
|
|
3991
4162
|
}
|
|
3992
|
-
continue;
|
|
3993
|
-
} else {
|
|
3994
|
-
break;
|
|
3995
4163
|
}
|
|
3996
4164
|
}
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
|
|
4165
|
+
if (_M0IP48username4core3src5lexer9TokenKindPB2Eq5equal(_M0MP48username4core3src6parser6Parser4peek(self), _M0DTP48username4core3src5lexer9TokenKind9Semicolon__)) {
|
|
4166
|
+
self.pos = self.pos + 1 | 0;
|
|
4167
|
+
} else {
|
|
4168
|
+
break;
|
|
4169
|
+
}
|
|
4002
4170
|
}
|
|
4003
4171
|
continue;
|
|
4004
4172
|
} else {
|
|
@@ -4020,10 +4188,10 @@ function _M0MP48username4core3src6parser6Parser27skip__newlines__and__indent(sel
|
|
|
4020
4188
|
case 108: {
|
|
4021
4189
|
break _L$4;
|
|
4022
4190
|
}
|
|
4023
|
-
case
|
|
4191
|
+
case 113: {
|
|
4024
4192
|
break _L$4;
|
|
4025
4193
|
}
|
|
4026
|
-
case
|
|
4194
|
+
case 114: {
|
|
4027
4195
|
break _L$4;
|
|
4028
4196
|
}
|
|
4029
4197
|
case 109: {
|
|
@@ -4063,7 +4231,7 @@ function _M0MP48username4core3src6parser6Parser22skip__type__annotation(self) {
|
|
|
4063
4231
|
case 108: {
|
|
4064
4232
|
break _L$2;
|
|
4065
4233
|
}
|
|
4066
|
-
case
|
|
4234
|
+
case 115: {
|
|
4067
4235
|
break _L$2;
|
|
4068
4236
|
}
|
|
4069
4237
|
default: {
|
|
@@ -4175,6 +4343,10 @@ function _M0MP48username4core3src6parser6Parser21parse__match__pattern(self) {
|
|
|
4175
4343
|
case 93: {
|
|
4176
4344
|
break _L$2;
|
|
4177
4345
|
}
|
|
4346
|
+
case 111: {
|
|
4347
|
+
self.pos = self.pos + 1 | 0;
|
|
4348
|
+
return new _M0DTP48username4core3src6parser12MatchPattern7BindPat("blank");
|
|
4349
|
+
}
|
|
4178
4350
|
case 7: {
|
|
4179
4351
|
const _Ident = _bind;
|
|
4180
4352
|
const _s$2 = _Ident._0;
|
|
@@ -4646,7 +4818,7 @@ function _M0MP48username4core3src6parser6Parser12parse__unary(self) {
|
|
|
4646
4818
|
case 108: {
|
|
4647
4819
|
break _L;
|
|
4648
4820
|
}
|
|
4649
|
-
case
|
|
4821
|
+
case 115: {
|
|
4650
4822
|
break _L;
|
|
4651
4823
|
}
|
|
4652
4824
|
case 109: {
|
|
@@ -5161,10 +5333,10 @@ function _M0MP48username4core3src6parser6Parser11parse__stmt(self) {
|
|
|
5161
5333
|
_L$2: {
|
|
5162
5334
|
const _bind = _M0MP48username4core3src6parser6Parser4peek(self);
|
|
5163
5335
|
switch (_bind.$tag) {
|
|
5164
|
-
case
|
|
5336
|
+
case 113: {
|
|
5165
5337
|
break _L$2;
|
|
5166
5338
|
}
|
|
5167
|
-
case
|
|
5339
|
+
case 114: {
|
|
5168
5340
|
break _L$2;
|
|
5169
5341
|
}
|
|
5170
5342
|
case 109: {
|
|
@@ -5228,7 +5400,7 @@ function _M0MP48username4core3src6parser6Parser11parse__stmt(self) {
|
|
|
5228
5400
|
case 108: {
|
|
5229
5401
|
break _L$3;
|
|
5230
5402
|
}
|
|
5231
|
-
case
|
|
5403
|
+
case 115: {
|
|
5232
5404
|
break _L$3;
|
|
5233
5405
|
}
|
|
5234
5406
|
case 109: {
|
|
@@ -6592,6 +6764,9 @@ function _M0MP48username4core3src6parser6Parser5parse(self) {
|
|
|
6592
6764
|
}
|
|
6593
6765
|
return stmts;
|
|
6594
6766
|
}
|
|
6767
|
+
function _M0FP48username4core3src7codegen9is__blank(name) {
|
|
6768
|
+
return name === "blank" || name === "_";
|
|
6769
|
+
}
|
|
6595
6770
|
function _M0FP48username4core3src7codegen18is__alpha__codegen(c) {
|
|
6596
6771
|
return c >= 97 && c <= 122 || c >= 65 && c <= 90;
|
|
6597
6772
|
}
|
|
@@ -6690,7 +6865,7 @@ function _M0FP48username4core3src7codegen9js__binop(op) {
|
|
|
6690
6865
|
}
|
|
6691
6866
|
}
|
|
6692
6867
|
function _M0FP48username4core3src7codegen15js__escape__str(s) {
|
|
6693
|
-
const buf =
|
|
6868
|
+
const buf = _M0MPB13StringBuilder21StringBuilder_2einner(0);
|
|
6694
6869
|
const chars = _M0MPC16string6String9to__array(s);
|
|
6695
6870
|
const _bind = chars.length;
|
|
6696
6871
|
let _tmp = 0;
|
|
@@ -6732,7 +6907,7 @@ function _M0FP48username4core3src7codegen15js__escape__str(s) {
|
|
|
6732
6907
|
return _M0MPB13StringBuilder10to__string(buf);
|
|
6733
6908
|
}
|
|
6734
6909
|
function _M0FP48username4core3src7codegen20js__escape__template(s) {
|
|
6735
|
-
const buf =
|
|
6910
|
+
const buf = _M0MPB13StringBuilder21StringBuilder_2einner(0);
|
|
6736
6911
|
const chars = _M0MPC16string6String9to__array(s);
|
|
6737
6912
|
const _bind = chars.length;
|
|
6738
6913
|
let _tmp = 0;
|
|
@@ -6774,6 +6949,36 @@ function _M0FP48username4core3src7codegen9js__ident(name) {
|
|
|
6774
6949
|
function _M0MP48username4core3src7codegen9JsCodegen5write(self, s) {
|
|
6775
6950
|
_M0IPB13StringBuilderPB6Logger13write__string(self.buf, s);
|
|
6776
6951
|
}
|
|
6952
|
+
function _M0MP48username4core3src7codegen9JsCodegen11gen__params(self, params) {
|
|
6953
|
+
const blank_count = new _M0TPB8MutLocalGiE(0);
|
|
6954
|
+
const first = new _M0TPB8MutLocalGbE(true);
|
|
6955
|
+
const _bind = params.length;
|
|
6956
|
+
let _tmp = 0;
|
|
6957
|
+
while (true) {
|
|
6958
|
+
const _ = _tmp;
|
|
6959
|
+
if (_ < _bind) {
|
|
6960
|
+
const p = params[_];
|
|
6961
|
+
if (!first.val) {
|
|
6962
|
+
_M0MP48username4core3src7codegen9JsCodegen5write(self, ", ");
|
|
6963
|
+
}
|
|
6964
|
+
if (p === "blank") {
|
|
6965
|
+
if (blank_count.val === 0) {
|
|
6966
|
+
_M0MP48username4core3src7codegen9JsCodegen5write(self, "_");
|
|
6967
|
+
} else {
|
|
6968
|
+
_M0MP48username4core3src7codegen9JsCodegen5write(self, `_${_M0MPC13int3Int18to__string_2einner(blank_count.val, 10)}`);
|
|
6969
|
+
}
|
|
6970
|
+
blank_count.val = blank_count.val + 1 | 0;
|
|
6971
|
+
} else {
|
|
6972
|
+
_M0MP48username4core3src7codegen9JsCodegen5write(self, _M0FP48username4core3src7codegen9js__ident(p));
|
|
6973
|
+
}
|
|
6974
|
+
first.val = false;
|
|
6975
|
+
_tmp = _ + 1 | 0;
|
|
6976
|
+
continue;
|
|
6977
|
+
} else {
|
|
6978
|
+
return;
|
|
6979
|
+
}
|
|
6980
|
+
}
|
|
6981
|
+
}
|
|
6777
6982
|
function _M0FP48username4core3src7codegen17compound__op__str(op) {
|
|
6778
6983
|
switch (op) {
|
|
6779
6984
|
case 0: {
|
|
@@ -7862,7 +8067,7 @@ function _M0MP48username4core3src7codegen9JsCodegen9gen__expr(self, expr) {
|
|
|
7862
8067
|
_M0MP48username4core3src7codegen9JsCodegen5write(self$2, "n");
|
|
7863
8068
|
return;
|
|
7864
8069
|
}
|
|
7865
|
-
_M0MP48username4core3src7codegen9JsCodegen5write(self$2,
|
|
8070
|
+
_M0MP48username4core3src7codegen9JsCodegen5write(self$2, String(f));
|
|
7866
8071
|
return;
|
|
7867
8072
|
}
|
|
7868
8073
|
_M0MP48username4core3src7codegen9JsCodegen5write(self$2, "\"");
|
|
@@ -8090,34 +8295,17 @@ function _M0MP48username4core3src7codegen9JsCodegen9gen__expr(self, expr) {
|
|
|
8090
8295
|
continue;
|
|
8091
8296
|
}
|
|
8092
8297
|
_M0MP48username4core3src7codegen9JsCodegen5write(self$2, "(");
|
|
8093
|
-
|
|
8094
|
-
|
|
8298
|
+
_M0MP48username4core3src7codegen9JsCodegen11gen__params(self$2, params$4);
|
|
8299
|
+
_M0MP48username4core3src7codegen9JsCodegen5write(self$2, ") => {\n");
|
|
8300
|
+
self$2.indent_level = self$2.indent_level + 1 | 0;
|
|
8301
|
+
const _bind = body$2.length;
|
|
8095
8302
|
let _tmp$3 = 0;
|
|
8096
8303
|
while (true) {
|
|
8097
8304
|
const _ = _tmp$3;
|
|
8098
8305
|
if (_ < _bind) {
|
|
8099
|
-
const p = params$4[_];
|
|
8100
|
-
if (!first.val) {
|
|
8101
|
-
_M0MP48username4core3src7codegen9JsCodegen5write(self$2, ", ");
|
|
8102
|
-
}
|
|
8103
|
-
_M0MP48username4core3src7codegen9JsCodegen5write(self$2, _M0FP48username4core3src7codegen9js__ident(p));
|
|
8104
|
-
first.val = false;
|
|
8105
|
-
_tmp$3 = _ + 1 | 0;
|
|
8106
|
-
continue;
|
|
8107
|
-
} else {
|
|
8108
|
-
break;
|
|
8109
|
-
}
|
|
8110
|
-
}
|
|
8111
|
-
_M0MP48username4core3src7codegen9JsCodegen5write(self$2, ") => {\n");
|
|
8112
|
-
self$2.indent_level = self$2.indent_level + 1 | 0;
|
|
8113
|
-
const _bind$2 = body$2.length;
|
|
8114
|
-
let _tmp$4 = 0;
|
|
8115
|
-
while (true) {
|
|
8116
|
-
const _ = _tmp$4;
|
|
8117
|
-
if (_ < _bind$2) {
|
|
8118
8306
|
const s = body$2[_];
|
|
8119
8307
|
_M0MP48username4core3src7codegen9JsCodegen9gen__stmt(self$2, s);
|
|
8120
|
-
_tmp$
|
|
8308
|
+
_tmp$3 = _ + 1 | 0;
|
|
8121
8309
|
continue;
|
|
8122
8310
|
} else {
|
|
8123
8311
|
break;
|
|
@@ -8129,24 +8317,7 @@ function _M0MP48username4core3src7codegen9JsCodegen9gen__expr(self, expr) {
|
|
|
8129
8317
|
return;
|
|
8130
8318
|
}
|
|
8131
8319
|
_M0MP48username4core3src7codegen9JsCodegen5write(self$2, "(");
|
|
8132
|
-
|
|
8133
|
-
const _bind = params$3.length;
|
|
8134
|
-
let _tmp$3 = 0;
|
|
8135
|
-
while (true) {
|
|
8136
|
-
const _ = _tmp$3;
|
|
8137
|
-
if (_ < _bind) {
|
|
8138
|
-
const p = params$3[_];
|
|
8139
|
-
if (!first.val) {
|
|
8140
|
-
_M0MP48username4core3src7codegen9JsCodegen5write(self$2, ", ");
|
|
8141
|
-
}
|
|
8142
|
-
_M0MP48username4core3src7codegen9JsCodegen5write(self$2, _M0FP48username4core3src7codegen9js__ident(p));
|
|
8143
|
-
first.val = false;
|
|
8144
|
-
_tmp$3 = _ + 1 | 0;
|
|
8145
|
-
continue;
|
|
8146
|
-
} else {
|
|
8147
|
-
break;
|
|
8148
|
-
}
|
|
8149
|
-
}
|
|
8320
|
+
_M0MP48username4core3src7codegen9JsCodegen11gen__params(self$2, params$3);
|
|
8150
8321
|
_M0MP48username4core3src7codegen9JsCodegen5write(self$2, ") => ");
|
|
8151
8322
|
_tmp$2 = body_expr$2;
|
|
8152
8323
|
continue;
|
|
@@ -8387,7 +8558,7 @@ function _M0MP48username4core3src7codegen9JsCodegen9gen__expr(self, expr) {
|
|
|
8387
8558
|
const _bind$2 = arm.cond;
|
|
8388
8559
|
if (_bind$2 === undefined) {
|
|
8389
8560
|
} else {
|
|
8390
|
-
if (
|
|
8561
|
+
if (!_M0FP48username4core3src7codegen9is__blank(name)) {
|
|
8391
8562
|
_M0MP48username4core3src7codegen9JsCodegen13write__indent(self$2);
|
|
8392
8563
|
_M0MP48username4core3src7codegen9JsCodegen5write(self$2, "const ");
|
|
8393
8564
|
_M0MP48username4core3src7codegen9JsCodegen5write(self$2, _M0FP48username4core3src7codegen9js__ident(name));
|
|
@@ -8451,7 +8622,7 @@ function _M0MP48username4core3src7codegen9JsCodegen9gen__expr(self, expr) {
|
|
|
8451
8622
|
_M0MP48username4core3src7codegen9JsCodegen5write(self$2, ") {\n");
|
|
8452
8623
|
break _L$15;
|
|
8453
8624
|
}
|
|
8454
|
-
if (name
|
|
8625
|
+
if (_M0FP48username4core3src7codegen9is__blank(name)) {
|
|
8455
8626
|
let c;
|
|
8456
8627
|
_L$17: {
|
|
8457
8628
|
_L$18: {
|
|
@@ -8623,34 +8794,17 @@ function _M0MP48username4core3src7codegen9JsCodegen9gen__expr(self, expr) {
|
|
|
8623
8794
|
return;
|
|
8624
8795
|
}
|
|
8625
8796
|
_M0MP48username4core3src7codegen9JsCodegen5write(self$2, "async (");
|
|
8626
|
-
|
|
8627
|
-
|
|
8797
|
+
_M0MP48username4core3src7codegen9JsCodegen11gen__params(self$2, params$2);
|
|
8798
|
+
_M0MP48username4core3src7codegen9JsCodegen5write(self$2, ") => {\n");
|
|
8799
|
+
self$2.indent_level = self$2.indent_level + 1 | 0;
|
|
8800
|
+
const _bind = body.length;
|
|
8628
8801
|
let _tmp$3 = 0;
|
|
8629
8802
|
while (true) {
|
|
8630
8803
|
const _ = _tmp$3;
|
|
8631
8804
|
if (_ < _bind) {
|
|
8632
|
-
const p = params$2[_];
|
|
8633
|
-
if (!first.val) {
|
|
8634
|
-
_M0MP48username4core3src7codegen9JsCodegen5write(self$2, ", ");
|
|
8635
|
-
}
|
|
8636
|
-
_M0MP48username4core3src7codegen9JsCodegen5write(self$2, _M0FP48username4core3src7codegen9js__ident(p));
|
|
8637
|
-
first.val = false;
|
|
8638
|
-
_tmp$3 = _ + 1 | 0;
|
|
8639
|
-
continue;
|
|
8640
|
-
} else {
|
|
8641
|
-
break;
|
|
8642
|
-
}
|
|
8643
|
-
}
|
|
8644
|
-
_M0MP48username4core3src7codegen9JsCodegen5write(self$2, ") => {\n");
|
|
8645
|
-
self$2.indent_level = self$2.indent_level + 1 | 0;
|
|
8646
|
-
const _bind$2 = body.length;
|
|
8647
|
-
let _tmp$4 = 0;
|
|
8648
|
-
while (true) {
|
|
8649
|
-
const _ = _tmp$4;
|
|
8650
|
-
if (_ < _bind$2) {
|
|
8651
8805
|
const s = body[_];
|
|
8652
8806
|
_M0MP48username4core3src7codegen9JsCodegen9gen__stmt(self$2, s);
|
|
8653
|
-
_tmp$
|
|
8807
|
+
_tmp$3 = _ + 1 | 0;
|
|
8654
8808
|
continue;
|
|
8655
8809
|
} else {
|
|
8656
8810
|
break;
|
|
@@ -8662,24 +8816,7 @@ function _M0MP48username4core3src7codegen9JsCodegen9gen__expr(self, expr) {
|
|
|
8662
8816
|
return;
|
|
8663
8817
|
}
|
|
8664
8818
|
_M0MP48username4core3src7codegen9JsCodegen5write(self$2, "async (");
|
|
8665
|
-
|
|
8666
|
-
const _bind = params.length;
|
|
8667
|
-
let _tmp$3 = 0;
|
|
8668
|
-
while (true) {
|
|
8669
|
-
const _ = _tmp$3;
|
|
8670
|
-
if (_ < _bind) {
|
|
8671
|
-
const p = params[_];
|
|
8672
|
-
if (!first.val) {
|
|
8673
|
-
_M0MP48username4core3src7codegen9JsCodegen5write(self$2, ", ");
|
|
8674
|
-
}
|
|
8675
|
-
_M0MP48username4core3src7codegen9JsCodegen5write(self$2, _M0FP48username4core3src7codegen9js__ident(p));
|
|
8676
|
-
first.val = false;
|
|
8677
|
-
_tmp$3 = _ + 1 | 0;
|
|
8678
|
-
continue;
|
|
8679
|
-
} else {
|
|
8680
|
-
break;
|
|
8681
|
-
}
|
|
8682
|
-
}
|
|
8819
|
+
_M0MP48username4core3src7codegen9JsCodegen11gen__params(self$2, params);
|
|
8683
8820
|
_M0MP48username4core3src7codegen9JsCodegen5write(self$2, ") => ");
|
|
8684
8821
|
_tmp$2 = body_expr;
|
|
8685
8822
|
continue;
|
|
@@ -9947,24 +10084,7 @@ function _M0MP48username4core3src7codegen9JsCodegen16gen__class__decl(self, decl
|
|
|
9947
10084
|
}
|
|
9948
10085
|
_M0MP48username4core3src7codegen9JsCodegen13write__indent(self);
|
|
9949
10086
|
_M0MP48username4core3src7codegen9JsCodegen5write(self, "constructor(");
|
|
9950
|
-
|
|
9951
|
-
const _bind$5 = params$2.length;
|
|
9952
|
-
let _tmp$3 = 0;
|
|
9953
|
-
while (true) {
|
|
9954
|
-
const _$2 = _tmp$3;
|
|
9955
|
-
if (_$2 < _bind$5) {
|
|
9956
|
-
const p$2 = params$2[_$2];
|
|
9957
|
-
if (!first.val) {
|
|
9958
|
-
_M0MP48username4core3src7codegen9JsCodegen5write(self, ", ");
|
|
9959
|
-
}
|
|
9960
|
-
_M0MP48username4core3src7codegen9JsCodegen5write(self, _M0FP48username4core3src7codegen9js__ident(p$2));
|
|
9961
|
-
first.val = false;
|
|
9962
|
-
_tmp$3 = _$2 + 1 | 0;
|
|
9963
|
-
continue;
|
|
9964
|
-
} else {
|
|
9965
|
-
break;
|
|
9966
|
-
}
|
|
9967
|
-
}
|
|
10087
|
+
_M0MP48username4core3src7codegen9JsCodegen11gen__params(self, params$2);
|
|
9968
10088
|
_M0MP48username4core3src7codegen9JsCodegen5write(self, ") ");
|
|
9969
10089
|
_M0MP48username4core3src7codegen9JsCodegen16gen__class__body(self, body$4);
|
|
9970
10090
|
}
|
|
@@ -9979,24 +10099,7 @@ function _M0MP48username4core3src7codegen9JsCodegen16gen__class__decl(self, decl
|
|
|
9979
10099
|
}
|
|
9980
10100
|
_M0MP48username4core3src7codegen9JsCodegen5write(self, _M0FP48username4core3src7codegen9js__ident(name$3));
|
|
9981
10101
|
_M0MP48username4core3src7codegen9JsCodegen5write(self, "(");
|
|
9982
|
-
|
|
9983
|
-
const _bind$5 = params.length;
|
|
9984
|
-
let _tmp$3 = 0;
|
|
9985
|
-
while (true) {
|
|
9986
|
-
const _$2 = _tmp$3;
|
|
9987
|
-
if (_$2 < _bind$5) {
|
|
9988
|
-
const p$2 = params[_$2];
|
|
9989
|
-
if (!first.val) {
|
|
9990
|
-
_M0MP48username4core3src7codegen9JsCodegen5write(self, ", ");
|
|
9991
|
-
}
|
|
9992
|
-
_M0MP48username4core3src7codegen9JsCodegen5write(self, _M0FP48username4core3src7codegen9js__ident(p$2));
|
|
9993
|
-
first.val = false;
|
|
9994
|
-
_tmp$3 = _$2 + 1 | 0;
|
|
9995
|
-
continue;
|
|
9996
|
-
} else {
|
|
9997
|
-
break;
|
|
9998
|
-
}
|
|
9999
|
-
}
|
|
10102
|
+
_M0MP48username4core3src7codegen9JsCodegen11gen__params(self, params);
|
|
10000
10103
|
_M0MP48username4core3src7codegen9JsCodegen5write(self, ") ");
|
|
10001
10104
|
_M0MP48username4core3src7codegen9JsCodegen16gen__class__body(self, body$3);
|
|
10002
10105
|
}
|
|
@@ -10111,25 +10214,7 @@ function _M0MP48username4core3src7codegen9JsCodegen13gen__fn__decl(self, decl) {
|
|
|
10111
10214
|
_M0MP48username4core3src7codegen9JsCodegen5write(self, _M0FP48username4core3src7codegen9js__ident(n));
|
|
10112
10215
|
}
|
|
10113
10216
|
_M0MP48username4core3src7codegen9JsCodegen5write(self, "(");
|
|
10114
|
-
|
|
10115
|
-
const _bind = decl.params;
|
|
10116
|
-
const _bind$2 = _bind.length;
|
|
10117
|
-
let _tmp = 0;
|
|
10118
|
-
while (true) {
|
|
10119
|
-
const _ = _tmp;
|
|
10120
|
-
if (_ < _bind$2) {
|
|
10121
|
-
const p = _bind[_];
|
|
10122
|
-
if (!first.val) {
|
|
10123
|
-
_M0MP48username4core3src7codegen9JsCodegen5write(self, ", ");
|
|
10124
|
-
}
|
|
10125
|
-
_M0MP48username4core3src7codegen9JsCodegen5write(self, _M0FP48username4core3src7codegen9js__ident(p));
|
|
10126
|
-
first.val = false;
|
|
10127
|
-
_tmp = _ + 1 | 0;
|
|
10128
|
-
continue;
|
|
10129
|
-
} else {
|
|
10130
|
-
break;
|
|
10131
|
-
}
|
|
10132
|
-
}
|
|
10217
|
+
_M0MP48username4core3src7codegen9JsCodegen11gen__params(self, decl.params);
|
|
10133
10218
|
_M0MP48username4core3src7codegen9JsCodegen5write(self, ") ");
|
|
10134
10219
|
let stmts;
|
|
10135
10220
|
_L$2: {
|
|
@@ -10137,22 +10222,22 @@ function _M0MP48username4core3src7codegen9JsCodegen13gen__fn__decl(self, decl) {
|
|
|
10137
10222
|
_L$3: {
|
|
10138
10223
|
let expr$2;
|
|
10139
10224
|
_L$4: {
|
|
10140
|
-
const _bind
|
|
10141
|
-
switch (_bind
|
|
10225
|
+
const _bind = decl.body;
|
|
10226
|
+
switch (_bind.$tag) {
|
|
10142
10227
|
case 1: {
|
|
10143
|
-
const _ToExpr = _bind
|
|
10228
|
+
const _ToExpr = _bind;
|
|
10144
10229
|
const _expr = _ToExpr._0;
|
|
10145
10230
|
expr$2 = _expr;
|
|
10146
10231
|
break _L$4;
|
|
10147
10232
|
}
|
|
10148
10233
|
case 2: {
|
|
10149
|
-
const _ToReturnExpr = _bind
|
|
10234
|
+
const _ToReturnExpr = _bind;
|
|
10150
10235
|
const _expr$2 = _ToReturnExpr._0;
|
|
10151
10236
|
expr = _expr$2;
|
|
10152
10237
|
break _L$3;
|
|
10153
10238
|
}
|
|
10154
10239
|
default: {
|
|
10155
|
-
const _Block = _bind
|
|
10240
|
+
const _Block = _bind;
|
|
10156
10241
|
const _stmts = _Block._0;
|
|
10157
10242
|
stmts = _stmts;
|
|
10158
10243
|
break _L$2;
|
|
@@ -10171,14 +10256,14 @@ function _M0MP48username4core3src7codegen9JsCodegen13gen__fn__decl(self, decl) {
|
|
|
10171
10256
|
}
|
|
10172
10257
|
_M0MP48username4core3src7codegen9JsCodegen5write(self, "{\n");
|
|
10173
10258
|
self.indent_level = self.indent_level + 1 | 0;
|
|
10174
|
-
const _bind
|
|
10175
|
-
let _tmp
|
|
10259
|
+
const _bind = stmts.length;
|
|
10260
|
+
let _tmp = 0;
|
|
10176
10261
|
while (true) {
|
|
10177
|
-
const _ = _tmp
|
|
10178
|
-
if (_ < _bind
|
|
10262
|
+
const _ = _tmp;
|
|
10263
|
+
if (_ < _bind) {
|
|
10179
10264
|
const s = stmts[_];
|
|
10180
10265
|
_M0MP48username4core3src7codegen9JsCodegen9gen__stmt(self, s);
|
|
10181
|
-
_tmp
|
|
10266
|
+
_tmp = _ + 1 | 0;
|
|
10182
10267
|
continue;
|
|
10183
10268
|
} else {
|
|
10184
10269
|
break;
|
|
@@ -10721,7 +10806,7 @@ function _M0MP48username4core3src7codegen9JsCodegen10gen__match(self, subject, a
|
|
|
10721
10806
|
const _bind$2 = arm.cond;
|
|
10722
10807
|
if (_bind$2 === undefined) {
|
|
10723
10808
|
} else {
|
|
10724
|
-
if (
|
|
10809
|
+
if (!_M0FP48username4core3src7codegen9is__blank(name)) {
|
|
10725
10810
|
has_bind_guard.val = true;
|
|
10726
10811
|
}
|
|
10727
10812
|
}
|
|
@@ -10757,7 +10842,7 @@ function _M0MP48username4core3src7codegen9JsCodegen10gen__match(self, subject, a
|
|
|
10757
10842
|
const _bind$3 = arm.cond;
|
|
10758
10843
|
if (_bind$3 === undefined) {
|
|
10759
10844
|
} else {
|
|
10760
|
-
if (
|
|
10845
|
+
if (!_M0FP48username4core3src7codegen9is__blank(name)) {
|
|
10761
10846
|
_M0MP48username4core3src7codegen9JsCodegen13write__indent(self);
|
|
10762
10847
|
_M0MP48username4core3src7codegen9JsCodegen5write(self, "const ");
|
|
10763
10848
|
_M0MP48username4core3src7codegen9JsCodegen5write(self, _M0FP48username4core3src7codegen9js__ident(name));
|
|
@@ -10826,7 +10911,7 @@ function _M0MP48username4core3src7codegen9JsCodegen10gen__match(self, subject, a
|
|
|
10826
10911
|
_M0MP48username4core3src7codegen9JsCodegen5write(self, ") {\n");
|
|
10827
10912
|
break _L;
|
|
10828
10913
|
}
|
|
10829
|
-
if (name
|
|
10914
|
+
if (_M0FP48username4core3src7codegen9is__blank(name)) {
|
|
10830
10915
|
let c;
|
|
10831
10916
|
_L$3: {
|
|
10832
10917
|
_L$4: {
|
|
@@ -11125,7 +11210,7 @@ function _M0MP48username4core3src7codegen9JsCodegen17gen__stmt__inline(self, stm
|
|
|
11125
11210
|
}
|
|
11126
11211
|
}
|
|
11127
11212
|
function _M0MP48username4core3src7codegen9JsCodegen11new_2einner(cjs) {
|
|
11128
|
-
return new _M0TP48username4core3src7codegen9JsCodegen(
|
|
11213
|
+
return new _M0TP48username4core3src7codegen9JsCodegen(_M0MPB13StringBuilder21StringBuilder_2einner(0), 0, [], [], cjs);
|
|
11129
11214
|
}
|
|
11130
11215
|
function _M0MP48username4core3src7codegen9JsCodegen16generate_2einner(self, stmts, header, shebang, strict) {
|
|
11131
11216
|
if (shebang.length > 0) {
|
|
@@ -11232,7 +11317,7 @@ function _M0FP58username4core3src3cmd4main10cmd__build(args) {
|
|
|
11232
11317
|
_L$2: {
|
|
11233
11318
|
_L$3: {
|
|
11234
11319
|
const _bind = _M0MPC15array5Array2atGsE(tokens, 0).kind;
|
|
11235
|
-
if (_bind.$tag ===
|
|
11320
|
+
if (_bind.$tag === 112) {
|
|
11236
11321
|
const _Shebang = _bind;
|
|
11237
11322
|
const _s = _Shebang._0;
|
|
11238
11323
|
s = _s;
|
|
@@ -11262,7 +11347,7 @@ function _M0FP58username4core3src3cmd4main10cmd__build(args) {
|
|
|
11262
11347
|
}
|
|
11263
11348
|
}
|
|
11264
11349
|
const stmts = _M0MP48username4core3src6parser6Parser5parse(_M0MP48username4core3src6parser6Parser3new(filtered));
|
|
11265
|
-
const header = no_header.val ? "" : "// Generated by Purus 0.
|
|
11350
|
+
const header = no_header.val ? "" : "// Generated by Purus 0.11.0";
|
|
11266
11351
|
const js = _M0MP48username4core3src7codegen9JsCodegen16generate_2einner(_M0MP48username4core3src7codegen9JsCodegen11new_2einner(cjs.val), stmts, header, shebang.val, strict.val);
|
|
11267
11352
|
if (to_stdout.val) {
|
|
11268
11353
|
_M0FPB7printlnGsE(js);
|
|
@@ -11273,7 +11358,7 @@ function _M0FP58username4core3src3cmd4main10cmd__build(args) {
|
|
|
11273
11358
|
const _bind = ".cpurus";
|
|
11274
11359
|
if (_M0MPC16string6String11has__suffix(_tmp, new _M0TPC16string10StringView(_bind, 0, _bind.length))) {
|
|
11275
11360
|
const chars = _M0MPC16string6String9to__array(file.val);
|
|
11276
|
-
const buf =
|
|
11361
|
+
const buf = _M0MPB13StringBuilder21StringBuilder_2einner(0);
|
|
11277
11362
|
const i$2 = new _M0TPB8MutLocalGiE(0);
|
|
11278
11363
|
while (true) {
|
|
11279
11364
|
if (i$2.val < (chars.length - 7 | 0)) {
|
|
@@ -11290,7 +11375,7 @@ function _M0FP58username4core3src3cmd4main10cmd__build(args) {
|
|
|
11290
11375
|
const _bind$2 = ".mpurus";
|
|
11291
11376
|
if (_M0MPC16string6String11has__suffix(_tmp$2, new _M0TPC16string10StringView(_bind$2, 0, _bind$2.length))) {
|
|
11292
11377
|
const chars = _M0MPC16string6String9to__array(file.val);
|
|
11293
|
-
const buf =
|
|
11378
|
+
const buf = _M0MPB13StringBuilder21StringBuilder_2einner(0);
|
|
11294
11379
|
const i$2 = new _M0TPB8MutLocalGiE(0);
|
|
11295
11380
|
while (true) {
|
|
11296
11381
|
if (i$2.val < (chars.length - 7 | 0)) {
|
|
@@ -11307,7 +11392,7 @@ function _M0FP58username4core3src3cmd4main10cmd__build(args) {
|
|
|
11307
11392
|
const _bind$3 = ".purus";
|
|
11308
11393
|
if (_M0MPC16string6String11has__suffix(_tmp$3, new _M0TPC16string10StringView(_bind$3, 0, _bind$3.length))) {
|
|
11309
11394
|
const chars = _M0MPC16string6String9to__array(file.val);
|
|
11310
|
-
const buf =
|
|
11395
|
+
const buf = _M0MPB13StringBuilder21StringBuilder_2einner(0);
|
|
11311
11396
|
const i$2 = new _M0TPB8MutLocalGiE(0);
|
|
11312
11397
|
while (true) {
|
|
11313
11398
|
if (i$2.val < (chars.length - 6 | 0)) {
|
|
@@ -11386,62 +11471,6 @@ function _M0FP58username4core3src3cmd4main10cmd__check(file) {
|
|
|
11386
11471
|
_M0MP48username4core3src6parser6Parser5parse(_M0MP48username4core3src6parser6Parser3new(tokens));
|
|
11387
11472
|
_M0FPB7printlnGsE(`OK: ${file}`);
|
|
11388
11473
|
}
|
|
11389
|
-
function _M0FP58username4core3src3cmd4main9cmd__init() {
|
|
11390
|
-
if (!_M0FP311moonbitlang1x2fs12path__exists("src")) {
|
|
11391
|
-
let _try_err;
|
|
11392
|
-
_L: {
|
|
11393
|
-
_L$2: {
|
|
11394
|
-
const _bind = _M0FP311moonbitlang1x2fs11create__dir("src");
|
|
11395
|
-
if (_bind.$tag === 1) {
|
|
11396
|
-
const _ok = _bind;
|
|
11397
|
-
_ok._0;
|
|
11398
|
-
} else {
|
|
11399
|
-
const _err = _bind;
|
|
11400
|
-
_try_err = _err._0;
|
|
11401
|
-
break _L$2;
|
|
11402
|
-
}
|
|
11403
|
-
break _L;
|
|
11404
|
-
}
|
|
11405
|
-
let msg;
|
|
11406
|
-
_L$3: {
|
|
11407
|
-
const _IOError = _try_err;
|
|
11408
|
-
const _msg = _IOError._0;
|
|
11409
|
-
msg = _msg;
|
|
11410
|
-
break _L$3;
|
|
11411
|
-
}
|
|
11412
|
-
_M0FPB7printlnGsE(`Error: cannot create src directory: ${msg}`);
|
|
11413
|
-
return undefined;
|
|
11414
|
-
}
|
|
11415
|
-
}
|
|
11416
|
-
if (!_M0FP311moonbitlang1x2fs12path__exists("src/main.purus")) {
|
|
11417
|
-
const main_purus = "-- main.purus\n\nconst message be ///Hello, World///\nconsole.log[message]\n";
|
|
11418
|
-
let _try_err;
|
|
11419
|
-
_L: {
|
|
11420
|
-
_L$2: {
|
|
11421
|
-
const _bind = _M0FP311moonbitlang1x2fs31write__string__to__file_2einner("src/main.purus", main_purus, "utf8");
|
|
11422
|
-
if (_bind.$tag === 1) {
|
|
11423
|
-
const _ok = _bind;
|
|
11424
|
-
_ok._0;
|
|
11425
|
-
} else {
|
|
11426
|
-
const _err = _bind;
|
|
11427
|
-
_try_err = _err._0;
|
|
11428
|
-
break _L$2;
|
|
11429
|
-
}
|
|
11430
|
-
break _L;
|
|
11431
|
-
}
|
|
11432
|
-
let msg;
|
|
11433
|
-
_L$3: {
|
|
11434
|
-
const _IOError = _try_err;
|
|
11435
|
-
const _msg = _IOError._0;
|
|
11436
|
-
msg = _msg;
|
|
11437
|
-
break _L$3;
|
|
11438
|
-
}
|
|
11439
|
-
_M0FPB7printlnGsE(`Error: ${msg}`);
|
|
11440
|
-
return undefined;
|
|
11441
|
-
}
|
|
11442
|
-
}
|
|
11443
|
-
_M0FPB7printlnGsE("Initialized purus project in current directory");
|
|
11444
|
-
}
|
|
11445
11474
|
(() => {
|
|
11446
11475
|
const args = _M0FP311moonbitlang1x3sys14get__cli__args();
|
|
11447
11476
|
if (args.length < 2) {
|
|
@@ -11461,10 +11490,6 @@ function _M0FP58username4core3src3cmd4main9cmd__init() {
|
|
|
11461
11490
|
_M0FP58username4core3src3cmd4main10cmd__check(file);
|
|
11462
11491
|
return;
|
|
11463
11492
|
}
|
|
11464
|
-
case "init": {
|
|
11465
|
-
_M0FP58username4core3src3cmd4main9cmd__init();
|
|
11466
|
-
return;
|
|
11467
|
-
}
|
|
11468
11493
|
default: {
|
|
11469
11494
|
_M0FPB7printlnGsE(`Unknown command: ${cmd}`);
|
|
11470
11495
|
return;
|