purus 0.0.3 → 0.1.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 +2 -2
- package/README.md +1 -1
- package/lib/purus-compiler.js +264 -199
- package/package.json +1 -1
package/README-ja.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
|
|
3
|
-
[](https://purus.work)
|
|
4
4
|
|
|
5
5
|
[English](https://raw.githubusercontent.com/otoneko1102/purus/refs/heads/main/README.md) | **日本語**
|
|
6
6
|
|
|
@@ -55,4 +55,4 @@ otoneko. https://github.com/otoneko1102
|
|
|
55
55
|
|
|
56
56
|
## ライセンス
|
|
57
57
|
|
|
58
|
-
Apache 2.0 ライセンスに基づいて配布されます。詳細については、[LICENSE](
|
|
58
|
+
Apache 2.0 ライセンスに基づいて配布されます。詳細については、[LICENSE](https://raw.githubusercontent.com/otoneko1102/purus/refs/heads/main/LICENSE) を参照してください。
|
package/README.md
CHANGED
|
@@ -55,4 +55,4 @@ otoneko. https://github.com/otoneko1102
|
|
|
55
55
|
|
|
56
56
|
## License
|
|
57
57
|
|
|
58
|
-
Distributed under the Apache 2.0 License. See [LICENSE](
|
|
58
|
+
Distributed under the Apache 2.0 License. See [LICENSE](https://raw.githubusercontent.com/otoneko1102/purus/refs/heads/main/LICENSE) for more information.
|
package/lib/purus-compiler.js
CHANGED
|
@@ -2061,685 +2061,685 @@ function _M0FP511moonbitlang1x3sys8internal3ffi14get__cli__args() {
|
|
|
2061
2061
|
function _M0FP311moonbitlang1x3sys14get__cli__args() {
|
|
2062
2062
|
return _M0FP511moonbitlang1x3sys8internal3ffi14get__cli__args();
|
|
2063
2063
|
}
|
|
2064
|
-
function _M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(
|
|
2065
|
-
let
|
|
2066
|
-
let
|
|
2064
|
+
function _M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_x_714, _x_715) {
|
|
2065
|
+
let _x0_734;
|
|
2066
|
+
let _y0_735;
|
|
2067
2067
|
_L: {
|
|
2068
|
-
let
|
|
2069
|
-
let
|
|
2068
|
+
let _x0_732;
|
|
2069
|
+
let _y0_733;
|
|
2070
2070
|
_L$2: {
|
|
2071
|
-
let
|
|
2072
|
-
let
|
|
2071
|
+
let _x0_730;
|
|
2072
|
+
let _y0_731;
|
|
2073
2073
|
_L$3: {
|
|
2074
|
-
let
|
|
2075
|
-
let
|
|
2074
|
+
let _x0_728;
|
|
2075
|
+
let _y0_729;
|
|
2076
2076
|
_L$4: {
|
|
2077
|
-
let
|
|
2078
|
-
let
|
|
2077
|
+
let _x0_726;
|
|
2078
|
+
let _y0_727;
|
|
2079
2079
|
_L$5: {
|
|
2080
|
-
let
|
|
2081
|
-
let
|
|
2082
|
-
let
|
|
2083
|
-
let
|
|
2080
|
+
let _x1_723;
|
|
2081
|
+
let _x0_722;
|
|
2082
|
+
let _y0_724;
|
|
2083
|
+
let _y1_725;
|
|
2084
2084
|
_L$6: {
|
|
2085
|
-
let
|
|
2086
|
-
let
|
|
2085
|
+
let _x0_720;
|
|
2086
|
+
let _y0_721;
|
|
2087
2087
|
_L$7: {
|
|
2088
|
-
let
|
|
2089
|
-
let
|
|
2088
|
+
let _x0_718;
|
|
2089
|
+
let _y0_719;
|
|
2090
2090
|
_L$8: {
|
|
2091
|
-
let
|
|
2092
|
-
let
|
|
2091
|
+
let _x0_716;
|
|
2092
|
+
let _y0_717;
|
|
2093
2093
|
_L$9: {
|
|
2094
|
-
switch (
|
|
2094
|
+
switch (_x_714.$tag) {
|
|
2095
2095
|
case 0: {
|
|
2096
|
-
const _Int =
|
|
2097
|
-
const _$42$
|
|
2098
|
-
if (
|
|
2099
|
-
const _Int$2 =
|
|
2100
|
-
const _$42$
|
|
2101
|
-
|
|
2102
|
-
|
|
2096
|
+
const _Int = _x_714;
|
|
2097
|
+
const _$42$x0_716 = _Int._0;
|
|
2098
|
+
if (_x_715.$tag === 0) {
|
|
2099
|
+
const _Int$2 = _x_715;
|
|
2100
|
+
const _$42$y0_717 = _Int$2._0;
|
|
2101
|
+
_x0_716 = _$42$x0_716;
|
|
2102
|
+
_y0_717 = _$42$y0_717;
|
|
2103
2103
|
break _L$9;
|
|
2104
2104
|
} else {
|
|
2105
2105
|
return false;
|
|
2106
2106
|
}
|
|
2107
2107
|
}
|
|
2108
2108
|
case 1: {
|
|
2109
|
-
const _Float =
|
|
2110
|
-
const _$42$
|
|
2111
|
-
if (
|
|
2112
|
-
const _Float$2 =
|
|
2113
|
-
const _$42$
|
|
2114
|
-
|
|
2115
|
-
|
|
2109
|
+
const _Float = _x_714;
|
|
2110
|
+
const _$42$x0_718 = _Float._0;
|
|
2111
|
+
if (_x_715.$tag === 1) {
|
|
2112
|
+
const _Float$2 = _x_715;
|
|
2113
|
+
const _$42$y0_719 = _Float$2._0;
|
|
2114
|
+
_x0_718 = _$42$x0_718;
|
|
2115
|
+
_y0_719 = _$42$y0_719;
|
|
2116
2116
|
break _L$8;
|
|
2117
2117
|
} else {
|
|
2118
2118
|
return false;
|
|
2119
2119
|
}
|
|
2120
2120
|
}
|
|
2121
2121
|
case 2: {
|
|
2122
|
-
const _Str =
|
|
2123
|
-
const _$42$
|
|
2124
|
-
if (
|
|
2125
|
-
const _Str$2 =
|
|
2126
|
-
const _$42$
|
|
2127
|
-
|
|
2128
|
-
|
|
2122
|
+
const _Str = _x_714;
|
|
2123
|
+
const _$42$x0_720 = _Str._0;
|
|
2124
|
+
if (_x_715.$tag === 2) {
|
|
2125
|
+
const _Str$2 = _x_715;
|
|
2126
|
+
const _$42$y0_721 = _Str$2._0;
|
|
2127
|
+
_x0_720 = _$42$x0_720;
|
|
2128
|
+
_y0_721 = _$42$y0_721;
|
|
2129
2129
|
break _L$7;
|
|
2130
2130
|
} else {
|
|
2131
2131
|
return false;
|
|
2132
2132
|
}
|
|
2133
2133
|
}
|
|
2134
2134
|
case 3: {
|
|
2135
|
-
const _Regex =
|
|
2136
|
-
const _$42$
|
|
2137
|
-
const _$42$
|
|
2138
|
-
if (
|
|
2139
|
-
const _Regex$2 =
|
|
2140
|
-
const _$42$
|
|
2141
|
-
const _$42$
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2135
|
+
const _Regex = _x_714;
|
|
2136
|
+
const _$42$x0_722 = _Regex._0;
|
|
2137
|
+
const _$42$x1_723 = _Regex._1;
|
|
2138
|
+
if (_x_715.$tag === 3) {
|
|
2139
|
+
const _Regex$2 = _x_715;
|
|
2140
|
+
const _$42$y0_724 = _Regex$2._0;
|
|
2141
|
+
const _$42$y1_725 = _Regex$2._1;
|
|
2142
|
+
_x1_723 = _$42$x1_723;
|
|
2143
|
+
_x0_722 = _$42$x0_722;
|
|
2144
|
+
_y0_724 = _$42$y0_724;
|
|
2145
|
+
_y1_725 = _$42$y1_725;
|
|
2146
2146
|
break _L$6;
|
|
2147
2147
|
} else {
|
|
2148
2148
|
return false;
|
|
2149
2149
|
}
|
|
2150
2150
|
}
|
|
2151
2151
|
case 4: {
|
|
2152
|
-
if (
|
|
2152
|
+
if (_x_715.$tag === 4) {
|
|
2153
2153
|
return true;
|
|
2154
2154
|
} else {
|
|
2155
2155
|
return false;
|
|
2156
2156
|
}
|
|
2157
2157
|
}
|
|
2158
2158
|
case 5: {
|
|
2159
|
-
if (
|
|
2159
|
+
if (_x_715.$tag === 5) {
|
|
2160
2160
|
return true;
|
|
2161
2161
|
} else {
|
|
2162
2162
|
return false;
|
|
2163
2163
|
}
|
|
2164
2164
|
}
|
|
2165
2165
|
case 6: {
|
|
2166
|
-
const _Ident =
|
|
2167
|
-
const _$42$
|
|
2168
|
-
if (
|
|
2169
|
-
const _Ident$2 =
|
|
2170
|
-
const _$42$
|
|
2171
|
-
|
|
2172
|
-
|
|
2166
|
+
const _Ident = _x_714;
|
|
2167
|
+
const _$42$x0_726 = _Ident._0;
|
|
2168
|
+
if (_x_715.$tag === 6) {
|
|
2169
|
+
const _Ident$2 = _x_715;
|
|
2170
|
+
const _$42$y0_727 = _Ident$2._0;
|
|
2171
|
+
_x0_726 = _$42$x0_726;
|
|
2172
|
+
_y0_727 = _$42$y0_727;
|
|
2173
2173
|
break _L$5;
|
|
2174
2174
|
} else {
|
|
2175
2175
|
return false;
|
|
2176
2176
|
}
|
|
2177
2177
|
}
|
|
2178
2178
|
case 7: {
|
|
2179
|
-
if (
|
|
2179
|
+
if (_x_715.$tag === 7) {
|
|
2180
2180
|
return true;
|
|
2181
2181
|
} else {
|
|
2182
2182
|
return false;
|
|
2183
2183
|
}
|
|
2184
2184
|
}
|
|
2185
2185
|
case 8: {
|
|
2186
|
-
if (
|
|
2186
|
+
if (_x_715.$tag === 8) {
|
|
2187
2187
|
return true;
|
|
2188
2188
|
} else {
|
|
2189
2189
|
return false;
|
|
2190
2190
|
}
|
|
2191
2191
|
}
|
|
2192
2192
|
case 9: {
|
|
2193
|
-
if (
|
|
2193
|
+
if (_x_715.$tag === 9) {
|
|
2194
2194
|
return true;
|
|
2195
2195
|
} else {
|
|
2196
2196
|
return false;
|
|
2197
2197
|
}
|
|
2198
2198
|
}
|
|
2199
2199
|
case 10: {
|
|
2200
|
-
if (
|
|
2200
|
+
if (_x_715.$tag === 10) {
|
|
2201
2201
|
return true;
|
|
2202
2202
|
} else {
|
|
2203
2203
|
return false;
|
|
2204
2204
|
}
|
|
2205
2205
|
}
|
|
2206
2206
|
case 11: {
|
|
2207
|
-
if (
|
|
2207
|
+
if (_x_715.$tag === 11) {
|
|
2208
2208
|
return true;
|
|
2209
2209
|
} else {
|
|
2210
2210
|
return false;
|
|
2211
2211
|
}
|
|
2212
2212
|
}
|
|
2213
2213
|
case 12: {
|
|
2214
|
-
if (
|
|
2214
|
+
if (_x_715.$tag === 12) {
|
|
2215
2215
|
return true;
|
|
2216
2216
|
} else {
|
|
2217
2217
|
return false;
|
|
2218
2218
|
}
|
|
2219
2219
|
}
|
|
2220
2220
|
case 13: {
|
|
2221
|
-
if (
|
|
2221
|
+
if (_x_715.$tag === 13) {
|
|
2222
2222
|
return true;
|
|
2223
2223
|
} else {
|
|
2224
2224
|
return false;
|
|
2225
2225
|
}
|
|
2226
2226
|
}
|
|
2227
2227
|
case 14: {
|
|
2228
|
-
if (
|
|
2228
|
+
if (_x_715.$tag === 14) {
|
|
2229
2229
|
return true;
|
|
2230
2230
|
} else {
|
|
2231
2231
|
return false;
|
|
2232
2232
|
}
|
|
2233
2233
|
}
|
|
2234
2234
|
case 15: {
|
|
2235
|
-
if (
|
|
2235
|
+
if (_x_715.$tag === 15) {
|
|
2236
2236
|
return true;
|
|
2237
2237
|
} else {
|
|
2238
2238
|
return false;
|
|
2239
2239
|
}
|
|
2240
2240
|
}
|
|
2241
2241
|
case 16: {
|
|
2242
|
-
if (
|
|
2242
|
+
if (_x_715.$tag === 16) {
|
|
2243
2243
|
return true;
|
|
2244
2244
|
} else {
|
|
2245
2245
|
return false;
|
|
2246
2246
|
}
|
|
2247
2247
|
}
|
|
2248
2248
|
case 17: {
|
|
2249
|
-
if (
|
|
2249
|
+
if (_x_715.$tag === 17) {
|
|
2250
2250
|
return true;
|
|
2251
2251
|
} else {
|
|
2252
2252
|
return false;
|
|
2253
2253
|
}
|
|
2254
2254
|
}
|
|
2255
2255
|
case 18: {
|
|
2256
|
-
if (
|
|
2256
|
+
if (_x_715.$tag === 18) {
|
|
2257
2257
|
return true;
|
|
2258
2258
|
} else {
|
|
2259
2259
|
return false;
|
|
2260
2260
|
}
|
|
2261
2261
|
}
|
|
2262
2262
|
case 19: {
|
|
2263
|
-
if (
|
|
2263
|
+
if (_x_715.$tag === 19) {
|
|
2264
2264
|
return true;
|
|
2265
2265
|
} else {
|
|
2266
2266
|
return false;
|
|
2267
2267
|
}
|
|
2268
2268
|
}
|
|
2269
2269
|
case 20: {
|
|
2270
|
-
if (
|
|
2270
|
+
if (_x_715.$tag === 20) {
|
|
2271
2271
|
return true;
|
|
2272
2272
|
} else {
|
|
2273
2273
|
return false;
|
|
2274
2274
|
}
|
|
2275
2275
|
}
|
|
2276
2276
|
case 21: {
|
|
2277
|
-
if (
|
|
2277
|
+
if (_x_715.$tag === 21) {
|
|
2278
2278
|
return true;
|
|
2279
2279
|
} else {
|
|
2280
2280
|
return false;
|
|
2281
2281
|
}
|
|
2282
2282
|
}
|
|
2283
2283
|
case 22: {
|
|
2284
|
-
if (
|
|
2284
|
+
if (_x_715.$tag === 22) {
|
|
2285
2285
|
return true;
|
|
2286
2286
|
} else {
|
|
2287
2287
|
return false;
|
|
2288
2288
|
}
|
|
2289
2289
|
}
|
|
2290
2290
|
case 23: {
|
|
2291
|
-
if (
|
|
2291
|
+
if (_x_715.$tag === 23) {
|
|
2292
2292
|
return true;
|
|
2293
2293
|
} else {
|
|
2294
2294
|
return false;
|
|
2295
2295
|
}
|
|
2296
2296
|
}
|
|
2297
2297
|
case 24: {
|
|
2298
|
-
if (
|
|
2298
|
+
if (_x_715.$tag === 24) {
|
|
2299
2299
|
return true;
|
|
2300
2300
|
} else {
|
|
2301
2301
|
return false;
|
|
2302
2302
|
}
|
|
2303
2303
|
}
|
|
2304
2304
|
case 25: {
|
|
2305
|
-
if (
|
|
2305
|
+
if (_x_715.$tag === 25) {
|
|
2306
2306
|
return true;
|
|
2307
2307
|
} else {
|
|
2308
2308
|
return false;
|
|
2309
2309
|
}
|
|
2310
2310
|
}
|
|
2311
2311
|
case 26: {
|
|
2312
|
-
if (
|
|
2312
|
+
if (_x_715.$tag === 26) {
|
|
2313
2313
|
return true;
|
|
2314
2314
|
} else {
|
|
2315
2315
|
return false;
|
|
2316
2316
|
}
|
|
2317
2317
|
}
|
|
2318
2318
|
case 27: {
|
|
2319
|
-
if (
|
|
2319
|
+
if (_x_715.$tag === 27) {
|
|
2320
2320
|
return true;
|
|
2321
2321
|
} else {
|
|
2322
2322
|
return false;
|
|
2323
2323
|
}
|
|
2324
2324
|
}
|
|
2325
2325
|
case 28: {
|
|
2326
|
-
if (
|
|
2326
|
+
if (_x_715.$tag === 28) {
|
|
2327
2327
|
return true;
|
|
2328
2328
|
} else {
|
|
2329
2329
|
return false;
|
|
2330
2330
|
}
|
|
2331
2331
|
}
|
|
2332
2332
|
case 29: {
|
|
2333
|
-
if (
|
|
2333
|
+
if (_x_715.$tag === 29) {
|
|
2334
2334
|
return true;
|
|
2335
2335
|
} else {
|
|
2336
2336
|
return false;
|
|
2337
2337
|
}
|
|
2338
2338
|
}
|
|
2339
2339
|
case 30: {
|
|
2340
|
-
if (
|
|
2340
|
+
if (_x_715.$tag === 30) {
|
|
2341
2341
|
return true;
|
|
2342
2342
|
} else {
|
|
2343
2343
|
return false;
|
|
2344
2344
|
}
|
|
2345
2345
|
}
|
|
2346
2346
|
case 31: {
|
|
2347
|
-
if (
|
|
2347
|
+
if (_x_715.$tag === 31) {
|
|
2348
2348
|
return true;
|
|
2349
2349
|
} else {
|
|
2350
2350
|
return false;
|
|
2351
2351
|
}
|
|
2352
2352
|
}
|
|
2353
2353
|
case 32: {
|
|
2354
|
-
if (
|
|
2354
|
+
if (_x_715.$tag === 32) {
|
|
2355
2355
|
return true;
|
|
2356
2356
|
} else {
|
|
2357
2357
|
return false;
|
|
2358
2358
|
}
|
|
2359
2359
|
}
|
|
2360
2360
|
case 33: {
|
|
2361
|
-
if (
|
|
2361
|
+
if (_x_715.$tag === 33) {
|
|
2362
2362
|
return true;
|
|
2363
2363
|
} else {
|
|
2364
2364
|
return false;
|
|
2365
2365
|
}
|
|
2366
2366
|
}
|
|
2367
2367
|
case 34: {
|
|
2368
|
-
if (
|
|
2368
|
+
if (_x_715.$tag === 34) {
|
|
2369
2369
|
return true;
|
|
2370
2370
|
} else {
|
|
2371
2371
|
return false;
|
|
2372
2372
|
}
|
|
2373
2373
|
}
|
|
2374
2374
|
case 35: {
|
|
2375
|
-
if (
|
|
2375
|
+
if (_x_715.$tag === 35) {
|
|
2376
2376
|
return true;
|
|
2377
2377
|
} else {
|
|
2378
2378
|
return false;
|
|
2379
2379
|
}
|
|
2380
2380
|
}
|
|
2381
2381
|
case 36: {
|
|
2382
|
-
if (
|
|
2382
|
+
if (_x_715.$tag === 36) {
|
|
2383
2383
|
return true;
|
|
2384
2384
|
} else {
|
|
2385
2385
|
return false;
|
|
2386
2386
|
}
|
|
2387
2387
|
}
|
|
2388
2388
|
case 37: {
|
|
2389
|
-
if (
|
|
2389
|
+
if (_x_715.$tag === 37) {
|
|
2390
2390
|
return true;
|
|
2391
2391
|
} else {
|
|
2392
2392
|
return false;
|
|
2393
2393
|
}
|
|
2394
2394
|
}
|
|
2395
2395
|
case 38: {
|
|
2396
|
-
if (
|
|
2396
|
+
if (_x_715.$tag === 38) {
|
|
2397
2397
|
return true;
|
|
2398
2398
|
} else {
|
|
2399
2399
|
return false;
|
|
2400
2400
|
}
|
|
2401
2401
|
}
|
|
2402
2402
|
case 39: {
|
|
2403
|
-
if (
|
|
2403
|
+
if (_x_715.$tag === 39) {
|
|
2404
2404
|
return true;
|
|
2405
2405
|
} else {
|
|
2406
2406
|
return false;
|
|
2407
2407
|
}
|
|
2408
2408
|
}
|
|
2409
2409
|
case 40: {
|
|
2410
|
-
if (
|
|
2410
|
+
if (_x_715.$tag === 40) {
|
|
2411
2411
|
return true;
|
|
2412
2412
|
} else {
|
|
2413
2413
|
return false;
|
|
2414
2414
|
}
|
|
2415
2415
|
}
|
|
2416
2416
|
case 41: {
|
|
2417
|
-
if (
|
|
2417
|
+
if (_x_715.$tag === 41) {
|
|
2418
2418
|
return true;
|
|
2419
2419
|
} else {
|
|
2420
2420
|
return false;
|
|
2421
2421
|
}
|
|
2422
2422
|
}
|
|
2423
2423
|
case 42: {
|
|
2424
|
-
if (
|
|
2424
|
+
if (_x_715.$tag === 42) {
|
|
2425
2425
|
return true;
|
|
2426
2426
|
} else {
|
|
2427
2427
|
return false;
|
|
2428
2428
|
}
|
|
2429
2429
|
}
|
|
2430
2430
|
case 43: {
|
|
2431
|
-
if (
|
|
2431
|
+
if (_x_715.$tag === 43) {
|
|
2432
2432
|
return true;
|
|
2433
2433
|
} else {
|
|
2434
2434
|
return false;
|
|
2435
2435
|
}
|
|
2436
2436
|
}
|
|
2437
2437
|
case 44: {
|
|
2438
|
-
if (
|
|
2438
|
+
if (_x_715.$tag === 44) {
|
|
2439
2439
|
return true;
|
|
2440
2440
|
} else {
|
|
2441
2441
|
return false;
|
|
2442
2442
|
}
|
|
2443
2443
|
}
|
|
2444
2444
|
case 45: {
|
|
2445
|
-
if (
|
|
2445
|
+
if (_x_715.$tag === 45) {
|
|
2446
2446
|
return true;
|
|
2447
2447
|
} else {
|
|
2448
2448
|
return false;
|
|
2449
2449
|
}
|
|
2450
2450
|
}
|
|
2451
2451
|
case 46: {
|
|
2452
|
-
if (
|
|
2452
|
+
if (_x_715.$tag === 46) {
|
|
2453
2453
|
return true;
|
|
2454
2454
|
} else {
|
|
2455
2455
|
return false;
|
|
2456
2456
|
}
|
|
2457
2457
|
}
|
|
2458
2458
|
case 47: {
|
|
2459
|
-
if (
|
|
2459
|
+
if (_x_715.$tag === 47) {
|
|
2460
2460
|
return true;
|
|
2461
2461
|
} else {
|
|
2462
2462
|
return false;
|
|
2463
2463
|
}
|
|
2464
2464
|
}
|
|
2465
2465
|
case 48: {
|
|
2466
|
-
if (
|
|
2466
|
+
if (_x_715.$tag === 48) {
|
|
2467
2467
|
return true;
|
|
2468
2468
|
} else {
|
|
2469
2469
|
return false;
|
|
2470
2470
|
}
|
|
2471
2471
|
}
|
|
2472
2472
|
case 49: {
|
|
2473
|
-
if (
|
|
2473
|
+
if (_x_715.$tag === 49) {
|
|
2474
2474
|
return true;
|
|
2475
2475
|
} else {
|
|
2476
2476
|
return false;
|
|
2477
2477
|
}
|
|
2478
2478
|
}
|
|
2479
2479
|
case 50: {
|
|
2480
|
-
if (
|
|
2480
|
+
if (_x_715.$tag === 50) {
|
|
2481
2481
|
return true;
|
|
2482
2482
|
} else {
|
|
2483
2483
|
return false;
|
|
2484
2484
|
}
|
|
2485
2485
|
}
|
|
2486
2486
|
case 51: {
|
|
2487
|
-
if (
|
|
2487
|
+
if (_x_715.$tag === 51) {
|
|
2488
2488
|
return true;
|
|
2489
2489
|
} else {
|
|
2490
2490
|
return false;
|
|
2491
2491
|
}
|
|
2492
2492
|
}
|
|
2493
2493
|
case 52: {
|
|
2494
|
-
if (
|
|
2494
|
+
if (_x_715.$tag === 52) {
|
|
2495
2495
|
return true;
|
|
2496
2496
|
} else {
|
|
2497
2497
|
return false;
|
|
2498
2498
|
}
|
|
2499
2499
|
}
|
|
2500
2500
|
case 53: {
|
|
2501
|
-
if (
|
|
2501
|
+
if (_x_715.$tag === 53) {
|
|
2502
2502
|
return true;
|
|
2503
2503
|
} else {
|
|
2504
2504
|
return false;
|
|
2505
2505
|
}
|
|
2506
2506
|
}
|
|
2507
2507
|
case 54: {
|
|
2508
|
-
if (
|
|
2508
|
+
if (_x_715.$tag === 54) {
|
|
2509
2509
|
return true;
|
|
2510
2510
|
} else {
|
|
2511
2511
|
return false;
|
|
2512
2512
|
}
|
|
2513
2513
|
}
|
|
2514
2514
|
case 55: {
|
|
2515
|
-
if (
|
|
2515
|
+
if (_x_715.$tag === 55) {
|
|
2516
2516
|
return true;
|
|
2517
2517
|
} else {
|
|
2518
2518
|
return false;
|
|
2519
2519
|
}
|
|
2520
2520
|
}
|
|
2521
2521
|
case 56: {
|
|
2522
|
-
if (
|
|
2522
|
+
if (_x_715.$tag === 56) {
|
|
2523
2523
|
return true;
|
|
2524
2524
|
} else {
|
|
2525
2525
|
return false;
|
|
2526
2526
|
}
|
|
2527
2527
|
}
|
|
2528
2528
|
case 57: {
|
|
2529
|
-
if (
|
|
2529
|
+
if (_x_715.$tag === 57) {
|
|
2530
2530
|
return true;
|
|
2531
2531
|
} else {
|
|
2532
2532
|
return false;
|
|
2533
2533
|
}
|
|
2534
2534
|
}
|
|
2535
2535
|
case 58: {
|
|
2536
|
-
if (
|
|
2536
|
+
if (_x_715.$tag === 58) {
|
|
2537
2537
|
return true;
|
|
2538
2538
|
} else {
|
|
2539
2539
|
return false;
|
|
2540
2540
|
}
|
|
2541
2541
|
}
|
|
2542
2542
|
case 59: {
|
|
2543
|
-
if (
|
|
2543
|
+
if (_x_715.$tag === 59) {
|
|
2544
2544
|
return true;
|
|
2545
2545
|
} else {
|
|
2546
2546
|
return false;
|
|
2547
2547
|
}
|
|
2548
2548
|
}
|
|
2549
2549
|
case 60: {
|
|
2550
|
-
if (
|
|
2550
|
+
if (_x_715.$tag === 60) {
|
|
2551
2551
|
return true;
|
|
2552
2552
|
} else {
|
|
2553
2553
|
return false;
|
|
2554
2554
|
}
|
|
2555
2555
|
}
|
|
2556
2556
|
case 61: {
|
|
2557
|
-
if (
|
|
2557
|
+
if (_x_715.$tag === 61) {
|
|
2558
2558
|
return true;
|
|
2559
2559
|
} else {
|
|
2560
2560
|
return false;
|
|
2561
2561
|
}
|
|
2562
2562
|
}
|
|
2563
2563
|
case 62: {
|
|
2564
|
-
if (
|
|
2564
|
+
if (_x_715.$tag === 62) {
|
|
2565
2565
|
return true;
|
|
2566
2566
|
} else {
|
|
2567
2567
|
return false;
|
|
2568
2568
|
}
|
|
2569
2569
|
}
|
|
2570
2570
|
case 63: {
|
|
2571
|
-
if (
|
|
2571
|
+
if (_x_715.$tag === 63) {
|
|
2572
2572
|
return true;
|
|
2573
2573
|
} else {
|
|
2574
2574
|
return false;
|
|
2575
2575
|
}
|
|
2576
2576
|
}
|
|
2577
2577
|
case 64: {
|
|
2578
|
-
if (
|
|
2578
|
+
if (_x_715.$tag === 64) {
|
|
2579
2579
|
return true;
|
|
2580
2580
|
} else {
|
|
2581
2581
|
return false;
|
|
2582
2582
|
}
|
|
2583
2583
|
}
|
|
2584
2584
|
case 65: {
|
|
2585
|
-
if (
|
|
2585
|
+
if (_x_715.$tag === 65) {
|
|
2586
2586
|
return true;
|
|
2587
2587
|
} else {
|
|
2588
2588
|
return false;
|
|
2589
2589
|
}
|
|
2590
2590
|
}
|
|
2591
2591
|
case 66: {
|
|
2592
|
-
if (
|
|
2592
|
+
if (_x_715.$tag === 66) {
|
|
2593
2593
|
return true;
|
|
2594
2594
|
} else {
|
|
2595
2595
|
return false;
|
|
2596
2596
|
}
|
|
2597
2597
|
}
|
|
2598
2598
|
case 67: {
|
|
2599
|
-
if (
|
|
2599
|
+
if (_x_715.$tag === 67) {
|
|
2600
2600
|
return true;
|
|
2601
2601
|
} else {
|
|
2602
2602
|
return false;
|
|
2603
2603
|
}
|
|
2604
2604
|
}
|
|
2605
2605
|
case 68: {
|
|
2606
|
-
if (
|
|
2606
|
+
if (_x_715.$tag === 68) {
|
|
2607
2607
|
return true;
|
|
2608
2608
|
} else {
|
|
2609
2609
|
return false;
|
|
2610
2610
|
}
|
|
2611
2611
|
}
|
|
2612
2612
|
case 69: {
|
|
2613
|
-
if (
|
|
2613
|
+
if (_x_715.$tag === 69) {
|
|
2614
2614
|
return true;
|
|
2615
2615
|
} else {
|
|
2616
2616
|
return false;
|
|
2617
2617
|
}
|
|
2618
2618
|
}
|
|
2619
2619
|
case 70: {
|
|
2620
|
-
if (
|
|
2620
|
+
if (_x_715.$tag === 70) {
|
|
2621
2621
|
return true;
|
|
2622
2622
|
} else {
|
|
2623
2623
|
return false;
|
|
2624
2624
|
}
|
|
2625
2625
|
}
|
|
2626
2626
|
case 71: {
|
|
2627
|
-
if (
|
|
2627
|
+
if (_x_715.$tag === 71) {
|
|
2628
2628
|
return true;
|
|
2629
2629
|
} else {
|
|
2630
2630
|
return false;
|
|
2631
2631
|
}
|
|
2632
2632
|
}
|
|
2633
2633
|
case 72: {
|
|
2634
|
-
if (
|
|
2634
|
+
if (_x_715.$tag === 72) {
|
|
2635
2635
|
return true;
|
|
2636
2636
|
} else {
|
|
2637
2637
|
return false;
|
|
2638
2638
|
}
|
|
2639
2639
|
}
|
|
2640
2640
|
case 73: {
|
|
2641
|
-
if (
|
|
2641
|
+
if (_x_715.$tag === 73) {
|
|
2642
2642
|
return true;
|
|
2643
2643
|
} else {
|
|
2644
2644
|
return false;
|
|
2645
2645
|
}
|
|
2646
2646
|
}
|
|
2647
2647
|
case 74: {
|
|
2648
|
-
if (
|
|
2648
|
+
if (_x_715.$tag === 74) {
|
|
2649
2649
|
return true;
|
|
2650
2650
|
} else {
|
|
2651
2651
|
return false;
|
|
2652
2652
|
}
|
|
2653
2653
|
}
|
|
2654
2654
|
case 75: {
|
|
2655
|
-
if (
|
|
2655
|
+
if (_x_715.$tag === 75) {
|
|
2656
2656
|
return true;
|
|
2657
2657
|
} else {
|
|
2658
2658
|
return false;
|
|
2659
2659
|
}
|
|
2660
2660
|
}
|
|
2661
2661
|
case 76: {
|
|
2662
|
-
if (
|
|
2662
|
+
if (_x_715.$tag === 76) {
|
|
2663
2663
|
return true;
|
|
2664
2664
|
} else {
|
|
2665
2665
|
return false;
|
|
2666
2666
|
}
|
|
2667
2667
|
}
|
|
2668
2668
|
case 77: {
|
|
2669
|
-
if (
|
|
2669
|
+
if (_x_715.$tag === 77) {
|
|
2670
2670
|
return true;
|
|
2671
2671
|
} else {
|
|
2672
2672
|
return false;
|
|
2673
2673
|
}
|
|
2674
2674
|
}
|
|
2675
2675
|
case 78: {
|
|
2676
|
-
if (
|
|
2676
|
+
if (_x_715.$tag === 78) {
|
|
2677
2677
|
return true;
|
|
2678
2678
|
} else {
|
|
2679
2679
|
return false;
|
|
2680
2680
|
}
|
|
2681
2681
|
}
|
|
2682
2682
|
case 79: {
|
|
2683
|
-
if (
|
|
2683
|
+
if (_x_715.$tag === 79) {
|
|
2684
2684
|
return true;
|
|
2685
2685
|
} else {
|
|
2686
2686
|
return false;
|
|
2687
2687
|
}
|
|
2688
2688
|
}
|
|
2689
2689
|
case 80: {
|
|
2690
|
-
const _Indent =
|
|
2691
|
-
const _$42$
|
|
2692
|
-
if (
|
|
2693
|
-
const _Indent$2 =
|
|
2694
|
-
const _$42$
|
|
2695
|
-
|
|
2696
|
-
|
|
2690
|
+
const _Indent = _x_714;
|
|
2691
|
+
const _$42$x0_728 = _Indent._0;
|
|
2692
|
+
if (_x_715.$tag === 80) {
|
|
2693
|
+
const _Indent$2 = _x_715;
|
|
2694
|
+
const _$42$y0_729 = _Indent$2._0;
|
|
2695
|
+
_x0_728 = _$42$x0_728;
|
|
2696
|
+
_y0_729 = _$42$y0_729;
|
|
2697
2697
|
break _L$4;
|
|
2698
2698
|
} else {
|
|
2699
2699
|
return false;
|
|
2700
2700
|
}
|
|
2701
2701
|
}
|
|
2702
2702
|
case 81: {
|
|
2703
|
-
const _Shebang =
|
|
2704
|
-
const _$42$
|
|
2705
|
-
if (
|
|
2706
|
-
const _Shebang$2 =
|
|
2707
|
-
const _$42$
|
|
2708
|
-
|
|
2709
|
-
|
|
2703
|
+
const _Shebang = _x_714;
|
|
2704
|
+
const _$42$x0_730 = _Shebang._0;
|
|
2705
|
+
if (_x_715.$tag === 81) {
|
|
2706
|
+
const _Shebang$2 = _x_715;
|
|
2707
|
+
const _$42$y0_731 = _Shebang$2._0;
|
|
2708
|
+
_x0_730 = _$42$x0_730;
|
|
2709
|
+
_y0_731 = _$42$y0_731;
|
|
2710
2710
|
break _L$3;
|
|
2711
2711
|
} else {
|
|
2712
2712
|
return false;
|
|
2713
2713
|
}
|
|
2714
2714
|
}
|
|
2715
2715
|
case 82: {
|
|
2716
|
-
const _Comment =
|
|
2717
|
-
const _$42$
|
|
2718
|
-
if (
|
|
2719
|
-
const _Comment$2 =
|
|
2720
|
-
const _$42$
|
|
2721
|
-
|
|
2722
|
-
|
|
2716
|
+
const _Comment = _x_714;
|
|
2717
|
+
const _$42$x0_732 = _Comment._0;
|
|
2718
|
+
if (_x_715.$tag === 82) {
|
|
2719
|
+
const _Comment$2 = _x_715;
|
|
2720
|
+
const _$42$y0_733 = _Comment$2._0;
|
|
2721
|
+
_x0_732 = _$42$x0_732;
|
|
2722
|
+
_y0_733 = _$42$y0_733;
|
|
2723
2723
|
break _L$2;
|
|
2724
2724
|
} else {
|
|
2725
2725
|
return false;
|
|
2726
2726
|
}
|
|
2727
2727
|
}
|
|
2728
2728
|
case 83: {
|
|
2729
|
-
const _BlockComment =
|
|
2730
|
-
const _$42$
|
|
2731
|
-
if (
|
|
2732
|
-
const _BlockComment$2 =
|
|
2733
|
-
const _$42$
|
|
2734
|
-
|
|
2735
|
-
|
|
2729
|
+
const _BlockComment = _x_714;
|
|
2730
|
+
const _$42$x0_734 = _BlockComment._0;
|
|
2731
|
+
if (_x_715.$tag === 83) {
|
|
2732
|
+
const _BlockComment$2 = _x_715;
|
|
2733
|
+
const _$42$y0_735 = _BlockComment$2._0;
|
|
2734
|
+
_x0_734 = _$42$x0_734;
|
|
2735
|
+
_y0_735 = _$42$y0_735;
|
|
2736
2736
|
break _L;
|
|
2737
2737
|
} else {
|
|
2738
2738
|
return false;
|
|
2739
2739
|
}
|
|
2740
2740
|
}
|
|
2741
2741
|
default: {
|
|
2742
|
-
if (
|
|
2742
|
+
if (_x_715.$tag === 84) {
|
|
2743
2743
|
return true;
|
|
2744
2744
|
} else {
|
|
2745
2745
|
return false;
|
|
@@ -2747,27 +2747,85 @@ function _M0IP28username4core9TokenKindP311moonbitlang4core7builtin2Eq5equal(_x_
|
|
|
2747
2747
|
}
|
|
2748
2748
|
}
|
|
2749
2749
|
}
|
|
2750
|
-
return
|
|
2750
|
+
return _x0_716 === _y0_717;
|
|
2751
2751
|
}
|
|
2752
|
-
return
|
|
2752
|
+
return _x0_718 === _y0_719;
|
|
2753
2753
|
}
|
|
2754
|
-
return
|
|
2754
|
+
return _x0_720 === _y0_721;
|
|
2755
2755
|
}
|
|
2756
|
-
return
|
|
2756
|
+
return _x0_722 === _y0_724 && _x1_723 === _y1_725;
|
|
2757
2757
|
}
|
|
2758
|
-
return
|
|
2758
|
+
return _x0_726 === _y0_727;
|
|
2759
2759
|
}
|
|
2760
|
-
return
|
|
2760
|
+
return _x0_728 === _y0_729;
|
|
2761
2761
|
}
|
|
2762
|
-
return
|
|
2762
|
+
return _x0_730 === _y0_731;
|
|
2763
2763
|
}
|
|
2764
|
-
return
|
|
2764
|
+
return _x0_732 === _y0_733;
|
|
2765
2765
|
}
|
|
2766
|
-
return
|
|
2766
|
+
return _x0_734 === _y0_735;
|
|
2767
2767
|
}
|
|
2768
2768
|
function _M0MP28username4core6Parser4peek(self) {
|
|
2769
2769
|
return self.pos >= self.tokens.length ? $64$username$47$core$46$TokenKind$Eof : _M0MP311moonbitlang4core5array5Array2atGRP28username4core5TokenE(self.tokens, self.pos).kind;
|
|
2770
2770
|
}
|
|
2771
|
+
function _M0MP28username4core6Parser14is__type__name(self) {
|
|
2772
|
+
let s;
|
|
2773
|
+
_L: {
|
|
2774
|
+
const _bind = _M0MP28username4core6Parser4peek(self);
|
|
2775
|
+
if (_bind.$tag === 6) {
|
|
2776
|
+
const _Ident = _bind;
|
|
2777
|
+
const _s = _Ident._0;
|
|
2778
|
+
s = _s;
|
|
2779
|
+
break _L;
|
|
2780
|
+
} else {
|
|
2781
|
+
return false;
|
|
2782
|
+
}
|
|
2783
|
+
}
|
|
2784
|
+
switch (s) {
|
|
2785
|
+
case "string": {
|
|
2786
|
+
return true;
|
|
2787
|
+
}
|
|
2788
|
+
case "number": {
|
|
2789
|
+
return true;
|
|
2790
|
+
}
|
|
2791
|
+
case "boolean": {
|
|
2792
|
+
return true;
|
|
2793
|
+
}
|
|
2794
|
+
case "undefined": {
|
|
2795
|
+
return true;
|
|
2796
|
+
}
|
|
2797
|
+
case "function": {
|
|
2798
|
+
return true;
|
|
2799
|
+
}
|
|
2800
|
+
case "symbol": {
|
|
2801
|
+
return true;
|
|
2802
|
+
}
|
|
2803
|
+
case "bigint": {
|
|
2804
|
+
return true;
|
|
2805
|
+
}
|
|
2806
|
+
case "null": {
|
|
2807
|
+
return true;
|
|
2808
|
+
}
|
|
2809
|
+
case "object": {
|
|
2810
|
+
return true;
|
|
2811
|
+
}
|
|
2812
|
+
default: {
|
|
2813
|
+
if (s.length > 0) {
|
|
2814
|
+
let _tmp;
|
|
2815
|
+
$bound_check(s, 0);
|
|
2816
|
+
if (_M0IP016_24default__implP311moonbitlang4core7builtin7Compare6op__geGkE(s.charCodeAt(0), 65)) {
|
|
2817
|
+
$bound_check(s, 0);
|
|
2818
|
+
_tmp = _M0IP016_24default__implP311moonbitlang4core7builtin7Compare6op__leGkE(s.charCodeAt(0), 90);
|
|
2819
|
+
} else {
|
|
2820
|
+
_tmp = false;
|
|
2821
|
+
}
|
|
2822
|
+
return _tmp;
|
|
2823
|
+
} else {
|
|
2824
|
+
return false;
|
|
2825
|
+
}
|
|
2826
|
+
}
|
|
2827
|
+
}
|
|
2828
|
+
}
|
|
2771
2829
|
function _M0MP28username4core6Parser7advance(self) {
|
|
2772
2830
|
const tok = _M0MP28username4core6Parser4peek(self);
|
|
2773
2831
|
self.pos = self.pos + 1 | 0;
|
|
@@ -3211,34 +3269,41 @@ function _M0MP28username4core6Parser15parse__equality(self) {
|
|
|
3211
3269
|
const left = { val: _M0MP28username4core6Parser17parse__comparison(self) };
|
|
3212
3270
|
_L: while (true) {
|
|
3213
3271
|
if (self.pos < self.tokens.length) {
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3272
|
+
_L$2: {
|
|
3273
|
+
_L$3: {
|
|
3274
|
+
const _bind = _M0MP28username4core6Parser4peek(self);
|
|
3275
|
+
switch (_bind.$tag) {
|
|
3276
|
+
case 17: {
|
|
3277
|
+
break _L$3;
|
|
3278
|
+
}
|
|
3279
|
+
case 44: {
|
|
3280
|
+
break _L$3;
|
|
3281
|
+
}
|
|
3282
|
+
case 18: {
|
|
3283
|
+
self.pos = self.pos + 1 | 0;
|
|
3284
|
+
const right = _M0MP28username4core6Parser17parse__comparison(self);
|
|
3285
|
+
left.val = new $64$username$47$core$46$Expr$BinOp(6, left.val, right);
|
|
3286
|
+
break;
|
|
3287
|
+
}
|
|
3288
|
+
case 49: {
|
|
3289
|
+
self.pos = self.pos + 1 | 0;
|
|
3290
|
+
const right$2 = _M0MP28username4core6Parser17parse__comparison(self);
|
|
3291
|
+
left.val = new $64$username$47$core$46$Expr$Instanceof(left.val, right$2);
|
|
3292
|
+
break;
|
|
3293
|
+
}
|
|
3294
|
+
default: {
|
|
3295
|
+
break _L;
|
|
3296
|
+
}
|
|
3297
|
+
}
|
|
3298
|
+
break _L$2;
|
|
3227
3299
|
}
|
|
3228
|
-
|
|
3229
|
-
|
|
3300
|
+
self.pos = self.pos + 1 | 0;
|
|
3301
|
+
if (_M0MP28username4core6Parser14is__type__name(self)) {
|
|
3230
3302
|
const type_name = _M0MP28username4core6Parser18parse__ident__name(self);
|
|
3231
3303
|
left.val = new $64$username$47$core$46$Expr$IsCheck(left.val, type_name);
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
self.pos = self.pos + 1 | 0;
|
|
3236
|
-
const right$3 = _M0MP28username4core6Parser17parse__comparison(self);
|
|
3237
|
-
left.val = new $64$username$47$core$46$Expr$Instanceof(left.val, right$3);
|
|
3238
|
-
break;
|
|
3239
|
-
}
|
|
3240
|
-
default: {
|
|
3241
|
-
break _L;
|
|
3304
|
+
} else {
|
|
3305
|
+
const right = _M0MP28username4core6Parser17parse__comparison(self);
|
|
3306
|
+
left.val = new $64$username$47$core$46$Expr$BinOp(5, left.val, right);
|
|
3242
3307
|
}
|
|
3243
3308
|
}
|
|
3244
3309
|
continue;
|