yyjj 2025.12.0 → 2025.12.2
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/dist/index.cjs +162 -153
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +162 -153
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -2
package/dist/index.mjs
CHANGED
|
@@ -316,23 +316,23 @@ const f4ah6o$yyjj$jsonc$$lex_string$46$constr$47$676 = new $64$f4ah6o$47$yyjj$47
|
|
|
316
316
|
const f4ah6o$yyjj$jsonc$$lex_string$46$constr$47$677 = new $64$f4ah6o$47$yyjj$47$jsonc$46$TokenKind$Invalid("invalid unicode escape");
|
|
317
317
|
const f4ah6o$yyjj$jsonc$$lex_string$46$constr$47$678 = new $64$f4ah6o$47$yyjj$47$jsonc$46$TokenKind$Invalid("control character in string");
|
|
318
318
|
const f4ah6o$yyjj$jsonc$$next_token$46$constr$47$699 = 10;
|
|
319
|
-
const f4ah6o$yyjj$yaml$$lex_alias$46$constr$47$
|
|
320
|
-
const f4ah6o$yyjj$yaml$$lex_anchor$46$constr$47$
|
|
321
|
-
const f4ah6o$yyjj$yaml$$lex_double_quoted$46$constr$47$
|
|
322
|
-
const f4ah6o$yyjj$yaml$$lex_double_quoted$46$constr$47$
|
|
323
|
-
const f4ah6o$yyjj$yaml$$lex_folded_block$46$constr$47$
|
|
324
|
-
const f4ah6o$yyjj$yaml$$lex_folded_block$46$constr$47$
|
|
325
|
-
const f4ah6o$yyjj$yaml$$lex_literal_block$46$constr$47$
|
|
326
|
-
const f4ah6o$yyjj$yaml$$lex_literal_block$46$constr$47$
|
|
327
|
-
const f4ah6o$yyjj$yaml$$lex_single_quoted$46$constr$47$
|
|
328
|
-
const f4ah6o$yyjj$yaml$$lex_single_quoted$46$constr$47$
|
|
329
|
-
const f4ah6o$yyjj$yaml$$next_token$46$constr$47$
|
|
330
|
-
const f4ah6o$yyjj$yaml$$next_token$46$constr$47$
|
|
331
|
-
const f4ah6o$yyjj$yaml$$next_token$46$constr$47$
|
|
332
|
-
const f4ah6o$yyjj$yaml$$next_token$46$constr$47$
|
|
333
|
-
const f4ah6o$yyjj$yaml$$next_token$46$constr$47$
|
|
334
|
-
const f4ah6o$yyjj$yaml$$next_token$46$constr$47$
|
|
335
|
-
const f4ah6o$yyjj$yaml$$next_token$46$constr$47$
|
|
319
|
+
const f4ah6o$yyjj$yaml$$lex_alias$46$constr$47$1059 = new $64$f4ah6o$47$yyjj$47$yaml$46$TokenKind$Invalid("empty alias name");
|
|
320
|
+
const f4ah6o$yyjj$yaml$$lex_anchor$46$constr$47$1064 = new $64$f4ah6o$47$yyjj$47$yaml$46$TokenKind$Invalid("empty anchor name");
|
|
321
|
+
const f4ah6o$yyjj$yaml$$lex_double_quoted$46$constr$47$1070 = new $64$f4ah6o$47$yyjj$47$yaml$46$TokenKind$Invalid("unclosed double-quoted string");
|
|
322
|
+
const f4ah6o$yyjj$yaml$$lex_double_quoted$46$constr$47$1071 = new $64$f4ah6o$47$yyjj$47$yaml$46$TokenKind$Invalid("unclosed double-quoted string");
|
|
323
|
+
const f4ah6o$yyjj$yaml$$lex_folded_block$46$constr$47$1086 = 10;
|
|
324
|
+
const f4ah6o$yyjj$yaml$$lex_folded_block$46$constr$47$1087 = 10;
|
|
325
|
+
const f4ah6o$yyjj$yaml$$lex_literal_block$46$constr$47$1116 = 10;
|
|
326
|
+
const f4ah6o$yyjj$yaml$$lex_literal_block$46$constr$47$1117 = 10;
|
|
327
|
+
const f4ah6o$yyjj$yaml$$lex_single_quoted$46$constr$47$1154 = new $64$f4ah6o$47$yyjj$47$yaml$46$TokenKind$Invalid("unclosed single-quoted string");
|
|
328
|
+
const f4ah6o$yyjj$yaml$$lex_single_quoted$46$constr$47$1155 = 39;
|
|
329
|
+
const f4ah6o$yyjj$yaml$$next_token$46$constr$47$1166 = 10;
|
|
330
|
+
const f4ah6o$yyjj$yaml$$next_token$46$constr$47$1167 = 32;
|
|
331
|
+
const f4ah6o$yyjj$yaml$$next_token$46$constr$47$1168 = 10;
|
|
332
|
+
const f4ah6o$yyjj$yaml$$next_token$46$constr$47$1169 = 45;
|
|
333
|
+
const f4ah6o$yyjj$yaml$$next_token$46$constr$47$1170 = 45;
|
|
334
|
+
const f4ah6o$yyjj$yaml$$next_token$46$constr$47$1171 = 46;
|
|
335
|
+
const f4ah6o$yyjj$yaml$$next_token$46$constr$47$1172 = 46;
|
|
336
336
|
const moonbitlang$core$builtin$$seed = moonbitlang$core$builtin$$random_seed();
|
|
337
337
|
function moonbitlang$core$builtin$$Logger$write_object$2$(self, obj) {
|
|
338
338
|
moonbitlang$core$builtin$$Show$output$2$(obj, self);
|
|
@@ -2328,224 +2328,224 @@ function f4ah6o$yyjj$jsonc$$Parser$parse(self) {
|
|
|
2328
2328
|
function f4ah6o$yyjj$jsonc$$parse(source) {
|
|
2329
2329
|
return f4ah6o$yyjj$jsonc$$Parser$parse(f4ah6o$yyjj$jsonc$$Parser$from_source(source));
|
|
2330
2330
|
}
|
|
2331
|
-
function moonbitlang$core$builtin$$Eq$equal$18$(
|
|
2332
|
-
switch (
|
|
2333
|
-
case 0: if (
|
|
2331
|
+
function moonbitlang$core$builtin$$Eq$equal$18$(_x_390, _x_391) {
|
|
2332
|
+
switch (_x_390.$tag) {
|
|
2333
|
+
case 0: if (_x_391.$tag === 0) return true;
|
|
2334
2334
|
else return false;
|
|
2335
|
-
case 1: if (
|
|
2335
|
+
case 1: if (_x_391.$tag === 1) return true;
|
|
2336
2336
|
else return false;
|
|
2337
|
-
case 2: if (
|
|
2337
|
+
case 2: if (_x_391.$tag === 2) return true;
|
|
2338
2338
|
else return false;
|
|
2339
|
-
case 3: if (
|
|
2339
|
+
case 3: if (_x_391.$tag === 3) return true;
|
|
2340
2340
|
else return false;
|
|
2341
|
-
case 4: if (
|
|
2341
|
+
case 4: if (_x_391.$tag === 4) return true;
|
|
2342
2342
|
else return false;
|
|
2343
|
-
case 5: if (
|
|
2343
|
+
case 5: if (_x_391.$tag === 5) return true;
|
|
2344
2344
|
else return false;
|
|
2345
|
-
case 6: if (
|
|
2345
|
+
case 6: if (_x_391.$tag === 6) return true;
|
|
2346
2346
|
else return false;
|
|
2347
2347
|
case 7: {
|
|
2348
|
-
const _$42$
|
|
2349
|
-
if (
|
|
2348
|
+
const _$42$x0_392 = _x_390._0;
|
|
2349
|
+
if (_x_391.$tag === 7) return _$42$x0_392 === _x_391._0;
|
|
2350
2350
|
else return false;
|
|
2351
2351
|
}
|
|
2352
2352
|
case 8: {
|
|
2353
|
-
const _$42$
|
|
2354
|
-
if (
|
|
2353
|
+
const _$42$x0_394 = _x_390._0;
|
|
2354
|
+
if (_x_391.$tag === 8) return _$42$x0_394 === _x_391._0;
|
|
2355
2355
|
else return false;
|
|
2356
2356
|
}
|
|
2357
2357
|
case 9: {
|
|
2358
|
-
const _$42$
|
|
2359
|
-
if (
|
|
2358
|
+
const _$42$x0_396 = _x_390._0;
|
|
2359
|
+
if (_x_391.$tag === 9) return _$42$x0_396 === _x_391._0;
|
|
2360
2360
|
else return false;
|
|
2361
2361
|
}
|
|
2362
2362
|
case 10: {
|
|
2363
|
-
const _$42$
|
|
2364
|
-
if (
|
|
2363
|
+
const _$42$x0_398 = _x_390._0;
|
|
2364
|
+
if (_x_391.$tag === 10) return _$42$x0_398 === _x_391._0;
|
|
2365
2365
|
else return false;
|
|
2366
2366
|
}
|
|
2367
2367
|
case 11: {
|
|
2368
|
-
const _$42$
|
|
2369
|
-
if (
|
|
2368
|
+
const _$42$x0_400 = _x_390._0;
|
|
2369
|
+
if (_x_391.$tag === 11) return _$42$x0_400 === _x_391._0;
|
|
2370
2370
|
else return false;
|
|
2371
2371
|
}
|
|
2372
2372
|
case 12: {
|
|
2373
|
-
const _$42$
|
|
2374
|
-
if (
|
|
2373
|
+
const _$42$x0_402 = _x_390._0;
|
|
2374
|
+
if (_x_391.$tag === 12) return _$42$x0_402 === _x_391._0;
|
|
2375
2375
|
else return false;
|
|
2376
2376
|
}
|
|
2377
2377
|
case 13: {
|
|
2378
|
-
const _$42$
|
|
2379
|
-
if (
|
|
2378
|
+
const _$42$x0_404 = _x_390._0;
|
|
2379
|
+
if (_x_391.$tag === 13) return _$42$x0_404 === _x_391._0;
|
|
2380
2380
|
else return false;
|
|
2381
2381
|
}
|
|
2382
|
-
case 14: if (
|
|
2382
|
+
case 14: if (_x_391.$tag === 14) return true;
|
|
2383
2383
|
else return false;
|
|
2384
|
-
case 15: if (
|
|
2384
|
+
case 15: if (_x_391.$tag === 15) return true;
|
|
2385
2385
|
else return false;
|
|
2386
|
-
case 16: if (
|
|
2386
|
+
case 16: if (_x_391.$tag === 16) return true;
|
|
2387
2387
|
else return false;
|
|
2388
2388
|
case 17: {
|
|
2389
|
-
const _$42$
|
|
2390
|
-
if (
|
|
2389
|
+
const _$42$x0_406 = _x_390._0;
|
|
2390
|
+
if (_x_391.$tag === 17) return _$42$x0_406 === _x_391._0;
|
|
2391
2391
|
else return false;
|
|
2392
2392
|
}
|
|
2393
2393
|
case 18: {
|
|
2394
|
-
const _$42$
|
|
2395
|
-
if (
|
|
2394
|
+
const _$42$x0_408 = _x_390._0;
|
|
2395
|
+
if (_x_391.$tag === 18) return _$42$x0_408 === _x_391._0;
|
|
2396
2396
|
else return false;
|
|
2397
2397
|
}
|
|
2398
2398
|
case 19: {
|
|
2399
|
-
const _$42$
|
|
2400
|
-
if (
|
|
2399
|
+
const _$42$x0_410 = _x_390._0;
|
|
2400
|
+
if (_x_391.$tag === 19) return _$42$x0_410 === _x_391._0;
|
|
2401
2401
|
else return false;
|
|
2402
2402
|
}
|
|
2403
2403
|
case 20: {
|
|
2404
|
-
const _$42$
|
|
2405
|
-
if (
|
|
2404
|
+
const _$42$x0_412 = _x_390._0;
|
|
2405
|
+
if (_x_391.$tag === 20) return _$42$x0_412 === _x_391._0;
|
|
2406
2406
|
else return false;
|
|
2407
2407
|
}
|
|
2408
|
-
case 21: if (
|
|
2408
|
+
case 21: if (_x_391.$tag === 21) return true;
|
|
2409
2409
|
else return false;
|
|
2410
|
-
case 22: if (
|
|
2410
|
+
case 22: if (_x_391.$tag === 22) return true;
|
|
2411
2411
|
else return false;
|
|
2412
|
-
case 23: if (
|
|
2412
|
+
case 23: if (_x_391.$tag === 23) return true;
|
|
2413
2413
|
else return false;
|
|
2414
|
-
case 24: if (
|
|
2414
|
+
case 24: if (_x_391.$tag === 24) return true;
|
|
2415
2415
|
else return false;
|
|
2416
2416
|
default: {
|
|
2417
|
-
const _$42$
|
|
2418
|
-
if (
|
|
2417
|
+
const _$42$x0_414 = _x_390._0;
|
|
2418
|
+
if (_x_391.$tag === 25) return _$42$x0_414 === _x_391._0;
|
|
2419
2419
|
else return false;
|
|
2420
2420
|
}
|
|
2421
2421
|
}
|
|
2422
2422
|
}
|
|
2423
|
-
function moonbitlang$core$builtin$$Show$output$18$(
|
|
2424
|
-
switch (
|
|
2423
|
+
function moonbitlang$core$builtin$$Show$output$18$(_x_362, _x_363) {
|
|
2424
|
+
switch (_x_362.$tag) {
|
|
2425
2425
|
case 0:
|
|
2426
|
-
|
|
2426
|
+
_x_363.method_table.method_0(_x_363.self, "Colon");
|
|
2427
2427
|
return;
|
|
2428
2428
|
case 1:
|
|
2429
|
-
|
|
2429
|
+
_x_363.method_table.method_0(_x_363.self, "Dash");
|
|
2430
2430
|
return;
|
|
2431
2431
|
case 2:
|
|
2432
|
-
|
|
2432
|
+
_x_363.method_table.method_0(_x_363.self, "Comma");
|
|
2433
2433
|
return;
|
|
2434
2434
|
case 3:
|
|
2435
|
-
|
|
2435
|
+
_x_363.method_table.method_0(_x_363.self, "LBrace");
|
|
2436
2436
|
return;
|
|
2437
2437
|
case 4:
|
|
2438
|
-
|
|
2438
|
+
_x_363.method_table.method_0(_x_363.self, "RBrace");
|
|
2439
2439
|
return;
|
|
2440
2440
|
case 5:
|
|
2441
|
-
|
|
2441
|
+
_x_363.method_table.method_0(_x_363.self, "LBracket");
|
|
2442
2442
|
return;
|
|
2443
2443
|
case 6:
|
|
2444
|
-
|
|
2444
|
+
_x_363.method_table.method_0(_x_363.self, "RBracket");
|
|
2445
2445
|
return;
|
|
2446
2446
|
case 7: {
|
|
2447
|
-
const _$42$
|
|
2448
|
-
|
|
2449
|
-
moonbitlang$core$builtin$$Logger$write_object$2$(
|
|
2450
|
-
|
|
2447
|
+
const _$42$arg_364 = _x_362._0;
|
|
2448
|
+
_x_363.method_table.method_0(_x_363.self, "Indent(");
|
|
2449
|
+
moonbitlang$core$builtin$$Logger$write_object$2$(_x_363, _$42$arg_364);
|
|
2450
|
+
_x_363.method_table.method_0(_x_363.self, ")");
|
|
2451
2451
|
return;
|
|
2452
2452
|
}
|
|
2453
2453
|
case 8: {
|
|
2454
|
-
const _$42$
|
|
2455
|
-
|
|
2456
|
-
moonbitlang$core$builtin$$Logger$write_object$2$(
|
|
2457
|
-
|
|
2454
|
+
const _$42$arg_365 = _x_362._0;
|
|
2455
|
+
_x_363.method_table.method_0(_x_363.self, "Dedent(");
|
|
2456
|
+
moonbitlang$core$builtin$$Logger$write_object$2$(_x_363, _$42$arg_365);
|
|
2457
|
+
_x_363.method_table.method_0(_x_363.self, ")");
|
|
2458
2458
|
return;
|
|
2459
2459
|
}
|
|
2460
2460
|
case 9: {
|
|
2461
|
-
const _$42$
|
|
2462
|
-
|
|
2463
|
-
moonbitlang$core$builtin$$Logger$write_object$3$(
|
|
2464
|
-
|
|
2461
|
+
const _$42$arg_366 = _x_362._0;
|
|
2462
|
+
_x_363.method_table.method_0(_x_363.self, "PlainScalar(");
|
|
2463
|
+
moonbitlang$core$builtin$$Logger$write_object$3$(_x_363, _$42$arg_366);
|
|
2464
|
+
_x_363.method_table.method_0(_x_363.self, ")");
|
|
2465
2465
|
return;
|
|
2466
2466
|
}
|
|
2467
2467
|
case 10: {
|
|
2468
|
-
const _$42$
|
|
2469
|
-
|
|
2470
|
-
moonbitlang$core$builtin$$Logger$write_object$3$(
|
|
2471
|
-
|
|
2468
|
+
const _$42$arg_367 = _x_362._0;
|
|
2469
|
+
_x_363.method_table.method_0(_x_363.self, "SingleQuotedScalar(");
|
|
2470
|
+
moonbitlang$core$builtin$$Logger$write_object$3$(_x_363, _$42$arg_367);
|
|
2471
|
+
_x_363.method_table.method_0(_x_363.self, ")");
|
|
2472
2472
|
return;
|
|
2473
2473
|
}
|
|
2474
2474
|
case 11: {
|
|
2475
|
-
const _$42$
|
|
2476
|
-
|
|
2477
|
-
moonbitlang$core$builtin$$Logger$write_object$3$(
|
|
2478
|
-
|
|
2475
|
+
const _$42$arg_368 = _x_362._0;
|
|
2476
|
+
_x_363.method_table.method_0(_x_363.self, "DoubleQuotedScalar(");
|
|
2477
|
+
moonbitlang$core$builtin$$Logger$write_object$3$(_x_363, _$42$arg_368);
|
|
2478
|
+
_x_363.method_table.method_0(_x_363.self, ")");
|
|
2479
2479
|
return;
|
|
2480
2480
|
}
|
|
2481
2481
|
case 12: {
|
|
2482
|
-
const _$42$
|
|
2483
|
-
|
|
2484
|
-
moonbitlang$core$builtin$$Logger$write_object$3$(
|
|
2485
|
-
|
|
2482
|
+
const _$42$arg_369 = _x_362._0;
|
|
2483
|
+
_x_363.method_table.method_0(_x_363.self, "LiteralBlock(");
|
|
2484
|
+
moonbitlang$core$builtin$$Logger$write_object$3$(_x_363, _$42$arg_369);
|
|
2485
|
+
_x_363.method_table.method_0(_x_363.self, ")");
|
|
2486
2486
|
return;
|
|
2487
2487
|
}
|
|
2488
2488
|
case 13: {
|
|
2489
|
-
const _$42$
|
|
2490
|
-
|
|
2491
|
-
moonbitlang$core$builtin$$Logger$write_object$3$(
|
|
2492
|
-
|
|
2489
|
+
const _$42$arg_370 = _x_362._0;
|
|
2490
|
+
_x_363.method_table.method_0(_x_363.self, "FoldedBlock(");
|
|
2491
|
+
moonbitlang$core$builtin$$Logger$write_object$3$(_x_363, _$42$arg_370);
|
|
2492
|
+
_x_363.method_table.method_0(_x_363.self, ")");
|
|
2493
2493
|
return;
|
|
2494
2494
|
}
|
|
2495
2495
|
case 14:
|
|
2496
|
-
|
|
2496
|
+
_x_363.method_table.method_0(_x_363.self, "NullValue");
|
|
2497
2497
|
return;
|
|
2498
2498
|
case 15:
|
|
2499
|
-
|
|
2499
|
+
_x_363.method_table.method_0(_x_363.self, "TrueValue");
|
|
2500
2500
|
return;
|
|
2501
2501
|
case 16:
|
|
2502
|
-
|
|
2502
|
+
_x_363.method_table.method_0(_x_363.self, "FalseValue");
|
|
2503
2503
|
return;
|
|
2504
2504
|
case 17: {
|
|
2505
|
-
const _$42$
|
|
2506
|
-
|
|
2507
|
-
moonbitlang$core$builtin$$Logger$write_object$3$(
|
|
2508
|
-
|
|
2505
|
+
const _$42$arg_371 = _x_362._0;
|
|
2506
|
+
_x_363.method_table.method_0(_x_363.self, "Anchor(");
|
|
2507
|
+
moonbitlang$core$builtin$$Logger$write_object$3$(_x_363, _$42$arg_371);
|
|
2508
|
+
_x_363.method_table.method_0(_x_363.self, ")");
|
|
2509
2509
|
return;
|
|
2510
2510
|
}
|
|
2511
2511
|
case 18: {
|
|
2512
|
-
const _$42$
|
|
2513
|
-
|
|
2514
|
-
moonbitlang$core$builtin$$Logger$write_object$3$(
|
|
2515
|
-
|
|
2512
|
+
const _$42$arg_372 = _x_362._0;
|
|
2513
|
+
_x_363.method_table.method_0(_x_363.self, "Alias(");
|
|
2514
|
+
moonbitlang$core$builtin$$Logger$write_object$3$(_x_363, _$42$arg_372);
|
|
2515
|
+
_x_363.method_table.method_0(_x_363.self, ")");
|
|
2516
2516
|
return;
|
|
2517
2517
|
}
|
|
2518
2518
|
case 19: {
|
|
2519
|
-
const _$42$
|
|
2520
|
-
|
|
2521
|
-
moonbitlang$core$builtin$$Logger$write_object$3$(
|
|
2522
|
-
|
|
2519
|
+
const _$42$arg_373 = _x_362._0;
|
|
2520
|
+
_x_363.method_table.method_0(_x_363.self, "Comment(");
|
|
2521
|
+
moonbitlang$core$builtin$$Logger$write_object$3$(_x_363, _$42$arg_373);
|
|
2522
|
+
_x_363.method_table.method_0(_x_363.self, ")");
|
|
2523
2523
|
return;
|
|
2524
2524
|
}
|
|
2525
2525
|
case 20: {
|
|
2526
|
-
const _$42$
|
|
2527
|
-
|
|
2528
|
-
moonbitlang$core$builtin$$Logger$write_object$3$(
|
|
2529
|
-
|
|
2526
|
+
const _$42$arg_374 = _x_362._0;
|
|
2527
|
+
_x_363.method_table.method_0(_x_363.self, "Whitespace(");
|
|
2528
|
+
moonbitlang$core$builtin$$Logger$write_object$3$(_x_363, _$42$arg_374);
|
|
2529
|
+
_x_363.method_table.method_0(_x_363.self, ")");
|
|
2530
2530
|
return;
|
|
2531
2531
|
}
|
|
2532
2532
|
case 21:
|
|
2533
|
-
|
|
2533
|
+
_x_363.method_table.method_0(_x_363.self, "Newline");
|
|
2534
2534
|
return;
|
|
2535
2535
|
case 22:
|
|
2536
|
-
|
|
2536
|
+
_x_363.method_table.method_0(_x_363.self, "DocumentStart");
|
|
2537
2537
|
return;
|
|
2538
2538
|
case 23:
|
|
2539
|
-
|
|
2539
|
+
_x_363.method_table.method_0(_x_363.self, "DocumentEnd");
|
|
2540
2540
|
return;
|
|
2541
2541
|
case 24:
|
|
2542
|
-
|
|
2542
|
+
_x_363.method_table.method_0(_x_363.self, "Eof");
|
|
2543
2543
|
return;
|
|
2544
2544
|
default: {
|
|
2545
|
-
const _$42$
|
|
2546
|
-
|
|
2547
|
-
moonbitlang$core$builtin$$Logger$write_object$3$(
|
|
2548
|
-
|
|
2545
|
+
const _$42$arg_375 = _x_362._0;
|
|
2546
|
+
_x_363.method_table.method_0(_x_363.self, "Invalid(");
|
|
2547
|
+
moonbitlang$core$builtin$$Logger$write_object$3$(_x_363, _$42$arg_375);
|
|
2548
|
+
_x_363.method_table.method_0(_x_363.self, ")");
|
|
2549
2549
|
return;
|
|
2550
2550
|
}
|
|
2551
2551
|
}
|
|
@@ -2556,6 +2556,22 @@ function f4ah6o$yyjj$yaml$$Token$new(kind, span) {
|
|
|
2556
2556
|
span
|
|
2557
2557
|
};
|
|
2558
2558
|
}
|
|
2559
|
+
function f4ah6o$yyjj$yaml$$trivia_to_doc(comments, is_leading) {
|
|
2560
|
+
if (comments.length === 0) return $64$f4ah6o$47$yyjj$47$pretty$46$Doc$Nil;
|
|
2561
|
+
const docs = [];
|
|
2562
|
+
let _tmp = 0;
|
|
2563
|
+
while (true) {
|
|
2564
|
+
const i = _tmp;
|
|
2565
|
+
if (i < comments.length) {
|
|
2566
|
+
const text = `#${moonbitlang$core$array$$Array$at$9$(comments, i).content}`;
|
|
2567
|
+
if (is_leading) moonbitlang$core$array$$Array$push$12$(docs, f4ah6o$yyjj$pretty$$concat([new $64$f4ah6o$47$yyjj$47$pretty$46$Doc$Text(text), $64$f4ah6o$47$yyjj$47$pretty$46$Doc$HardLine]));
|
|
2568
|
+
else moonbitlang$core$array$$Array$push$12$(docs, f4ah6o$yyjj$pretty$$concat([new $64$f4ah6o$47$yyjj$47$pretty$46$Doc$Text(" "), new $64$f4ah6o$47$yyjj$47$pretty$46$Doc$Text(text)]));
|
|
2569
|
+
_tmp = i + 1 | 0;
|
|
2570
|
+
continue;
|
|
2571
|
+
} else break;
|
|
2572
|
+
}
|
|
2573
|
+
return f4ah6o$yyjj$pretty$$concat(docs);
|
|
2574
|
+
}
|
|
2559
2575
|
function f4ah6o$yyjj$yaml$$escape_double_quoted(s) {
|
|
2560
2576
|
const buf = moonbitlang$core$builtin$$StringBuilder$new$46$inner(0);
|
|
2561
2577
|
let _tmp = 0;
|
|
@@ -2627,20 +2643,6 @@ function f4ah6o$yyjj$yaml$$string_to_doc(s, style) {
|
|
|
2627
2643
|
default: return f4ah6o$yyjj$yaml$$folded_block_to_doc(s);
|
|
2628
2644
|
}
|
|
2629
2645
|
}
|
|
2630
|
-
function f4ah6o$yyjj$yaml$$trivia_to_doc(comments) {
|
|
2631
|
-
if (comments.length === 0) return $64$f4ah6o$47$yyjj$47$pretty$46$Doc$Nil;
|
|
2632
|
-
const docs = [];
|
|
2633
|
-
let _tmp = 0;
|
|
2634
|
-
while (true) {
|
|
2635
|
-
const i = _tmp;
|
|
2636
|
-
if (i < comments.length) {
|
|
2637
|
-
moonbitlang$core$array$$Array$push$12$(docs, new $64$f4ah6o$47$yyjj$47$pretty$46$Doc$Text(` #${moonbitlang$core$array$$Array$at$9$(comments, i).content}`));
|
|
2638
|
-
_tmp = i + 1 | 0;
|
|
2639
|
-
continue;
|
|
2640
|
-
} else break;
|
|
2641
|
-
}
|
|
2642
|
-
return f4ah6o$yyjj$pretty$$concat(docs);
|
|
2643
|
-
}
|
|
2644
2646
|
function f4ah6o$yyjj$yaml$$YamlNode$trivia(self) {
|
|
2645
2647
|
let _tmp = self;
|
|
2646
2648
|
_L: while (true) {
|
|
@@ -2661,8 +2663,8 @@ function f4ah6o$yyjj$yaml$$YamlNode$trivia(self) {
|
|
|
2661
2663
|
}
|
|
2662
2664
|
function f4ah6o$yyjj$yaml$$node_to_doc(node, indent) {
|
|
2663
2665
|
const trivia = f4ah6o$yyjj$yaml$$YamlNode$trivia(node);
|
|
2664
|
-
const leading = f4ah6o$yyjj$yaml$$trivia_to_doc(trivia.leading);
|
|
2665
|
-
const trailing = f4ah6o$yyjj$yaml$$trivia_to_doc(trivia.trailing);
|
|
2666
|
+
const leading = f4ah6o$yyjj$yaml$$trivia_to_doc(trivia.leading, true);
|
|
2667
|
+
const trailing = f4ah6o$yyjj$yaml$$trivia_to_doc(trivia.trailing, false);
|
|
2666
2668
|
let content;
|
|
2667
2669
|
switch (node.$tag) {
|
|
2668
2670
|
case 0:
|
|
@@ -2718,8 +2720,10 @@ function f4ah6o$yyjj$yaml$$mapping_to_doc(pairs, indent) {
|
|
|
2718
2720
|
const i = _tmp;
|
|
2719
2721
|
if (i < pairs.length) {
|
|
2720
2722
|
const pair = moonbitlang$core$array$$Array$at$11$(pairs, i);
|
|
2723
|
+
const key_leading = f4ah6o$yyjj$yaml$$trivia_to_doc(pair.key_trivia.leading, true);
|
|
2721
2724
|
const key_doc = f4ah6o$yyjj$yaml$$node_to_doc(pair.key, indent);
|
|
2722
2725
|
const value_doc = f4ah6o$yyjj$yaml$$node_to_doc(pair.value, indent + 2 | 0);
|
|
2726
|
+
const key_trailing = f4ah6o$yyjj$yaml$$trivia_to_doc(pair.key_trivia.trailing, false);
|
|
2723
2727
|
const _bind = pair.value;
|
|
2724
2728
|
let is_nested;
|
|
2725
2729
|
switch (_bind.$tag) {
|
|
@@ -2732,14 +2736,19 @@ function f4ah6o$yyjj$yaml$$mapping_to_doc(pairs, indent) {
|
|
|
2732
2736
|
default: is_nested = false;
|
|
2733
2737
|
}
|
|
2734
2738
|
if (is_nested) moonbitlang$core$array$$Array$push$12$(docs, f4ah6o$yyjj$pretty$$concat([
|
|
2739
|
+
key_leading,
|
|
2735
2740
|
key_doc,
|
|
2736
2741
|
new $64$f4ah6o$47$yyjj$47$pretty$46$Doc$Text(":"),
|
|
2742
|
+
key_trailing,
|
|
2737
2743
|
$64$f4ah6o$47$yyjj$47$pretty$46$Doc$HardLine,
|
|
2738
2744
|
new $64$f4ah6o$47$yyjj$47$pretty$46$Doc$Nest(2, value_doc)
|
|
2739
2745
|
]));
|
|
2740
2746
|
else moonbitlang$core$array$$Array$push$12$(docs, f4ah6o$yyjj$pretty$$concat([
|
|
2747
|
+
key_leading,
|
|
2741
2748
|
key_doc,
|
|
2742
|
-
new $64$f4ah6o$47$yyjj$47$pretty$46$Doc$Text(":
|
|
2749
|
+
new $64$f4ah6o$47$yyjj$47$pretty$46$Doc$Text(":"),
|
|
2750
|
+
key_trailing,
|
|
2751
|
+
new $64$f4ah6o$47$yyjj$47$pretty$46$Doc$Text(" "),
|
|
2743
2752
|
value_doc
|
|
2744
2753
|
]));
|
|
2745
2754
|
_tmp = i + 1 | 0;
|
|
@@ -2894,12 +2903,12 @@ function f4ah6o$yyjj$yaml$$Lexer$skip_while(self, pred) {
|
|
|
2894
2903
|
function f4ah6o$yyjj$yaml$$Lexer$lex_alias(self, start) {
|
|
2895
2904
|
f4ah6o$yyjj$yaml$$Lexer$advance(self);
|
|
2896
2905
|
const name = f4ah6o$yyjj$yaml$$Lexer$skip_while(self, (c) => f4ah6o$yyjj$yaml$$is_anchor_char(c));
|
|
2897
|
-
return name.length === 0 ? f4ah6o$yyjj$yaml$$Token$new(f4ah6o$yyjj$yaml$$lex_alias$46$constr$47$
|
|
2906
|
+
return name.length === 0 ? f4ah6o$yyjj$yaml$$Token$new(f4ah6o$yyjj$yaml$$lex_alias$46$constr$47$1059, f4ah6o$yyjj$common$$Span$new(start, f4ah6o$yyjj$yaml$$Lexer$current_pos(self))) : f4ah6o$yyjj$yaml$$Token$new(new $64$f4ah6o$47$yyjj$47$yaml$46$TokenKind$Alias(name), f4ah6o$yyjj$common$$Span$new(start, f4ah6o$yyjj$yaml$$Lexer$current_pos(self)));
|
|
2898
2907
|
}
|
|
2899
2908
|
function f4ah6o$yyjj$yaml$$Lexer$lex_anchor(self, start) {
|
|
2900
2909
|
f4ah6o$yyjj$yaml$$Lexer$advance(self);
|
|
2901
2910
|
const name = f4ah6o$yyjj$yaml$$Lexer$skip_while(self, (c) => f4ah6o$yyjj$yaml$$is_anchor_char(c));
|
|
2902
|
-
return name.length === 0 ? f4ah6o$yyjj$yaml$$Token$new(f4ah6o$yyjj$yaml$$lex_anchor$46$constr$47$
|
|
2911
|
+
return name.length === 0 ? f4ah6o$yyjj$yaml$$Token$new(f4ah6o$yyjj$yaml$$lex_anchor$46$constr$47$1064, f4ah6o$yyjj$common$$Span$new(start, f4ah6o$yyjj$yaml$$Lexer$current_pos(self))) : f4ah6o$yyjj$yaml$$Token$new(new $64$f4ah6o$47$yyjj$47$yaml$46$TokenKind$Anchor(name), f4ah6o$yyjj$common$$Span$new(start, f4ah6o$yyjj$yaml$$Lexer$current_pos(self)));
|
|
2903
2912
|
}
|
|
2904
2913
|
function f4ah6o$yyjj$yaml$$Lexer$peek(self) {
|
|
2905
2914
|
if (self.pos >= self.source.length) return -1;
|
|
@@ -2915,7 +2924,7 @@ function f4ah6o$yyjj$yaml$$Lexer$lex_double_quoted(self, start) {
|
|
|
2915
2924
|
const buf = moonbitlang$core$builtin$$StringBuilder$new$46$inner(0);
|
|
2916
2925
|
_L: while (true) {
|
|
2917
2926
|
const _bind = f4ah6o$yyjj$yaml$$Lexer$peek(self);
|
|
2918
|
-
if (_bind === -1) return f4ah6o$yyjj$yaml$$Token$new(f4ah6o$yyjj$yaml$$lex_double_quoted$46$constr$47$
|
|
2927
|
+
if (_bind === -1) return f4ah6o$yyjj$yaml$$Token$new(f4ah6o$yyjj$yaml$$lex_double_quoted$46$constr$47$1070, f4ah6o$yyjj$common$$Span$new(start, f4ah6o$yyjj$yaml$$Lexer$current_pos(self)));
|
|
2919
2928
|
else {
|
|
2920
2929
|
const _x = _bind;
|
|
2921
2930
|
switch (_x) {
|
|
@@ -2925,7 +2934,7 @@ function f4ah6o$yyjj$yaml$$Lexer$lex_double_quoted(self, start) {
|
|
|
2925
2934
|
case 92: {
|
|
2926
2935
|
f4ah6o$yyjj$yaml$$Lexer$advance(self);
|
|
2927
2936
|
const _bind$2 = f4ah6o$yyjj$yaml$$Lexer$peek(self);
|
|
2928
|
-
if (_bind$2 === -1) return f4ah6o$yyjj$yaml$$Token$new(f4ah6o$yyjj$yaml$$lex_double_quoted$46$constr$47$
|
|
2937
|
+
if (_bind$2 === -1) return f4ah6o$yyjj$yaml$$Token$new(f4ah6o$yyjj$yaml$$lex_double_quoted$46$constr$47$1071, f4ah6o$yyjj$common$$Span$new(start, f4ah6o$yyjj$yaml$$Lexer$current_pos(self)));
|
|
2929
2938
|
else {
|
|
2930
2939
|
const _esc = _bind$2;
|
|
2931
2940
|
f4ah6o$yyjj$yaml$$Lexer$advance(self);
|
|
@@ -3002,7 +3011,7 @@ function f4ah6o$yyjj$yaml$$Lexer$lex_folded_block(self, start) {
|
|
|
3002
3011
|
break _L;
|
|
3003
3012
|
}
|
|
3004
3013
|
f4ah6o$yyjj$yaml$$Lexer$advance(self);
|
|
3005
|
-
if (moonbitlang$core$builtin$$Eq$equal$25$(f4ah6o$yyjj$yaml$$Lexer$peek(self), f4ah6o$yyjj$yaml$$lex_folded_block$46$constr$47$
|
|
3014
|
+
if (moonbitlang$core$builtin$$Eq$equal$25$(f4ah6o$yyjj$yaml$$Lexer$peek(self), f4ah6o$yyjj$yaml$$lex_folded_block$46$constr$47$1086)) f4ah6o$yyjj$yaml$$Lexer$advance(self);
|
|
3006
3015
|
}
|
|
3007
3016
|
const block_indent = f4ah6o$yyjj$yaml$$Lexer$current_indent(self) + 2 | 0;
|
|
3008
3017
|
const buf = moonbitlang$core$builtin$$StringBuilder$new$46$inner(0);
|
|
@@ -3048,7 +3057,7 @@ function f4ah6o$yyjj$yaml$$Lexer$lex_folded_block(self, start) {
|
|
|
3048
3057
|
break _L$2;
|
|
3049
3058
|
}
|
|
3050
3059
|
f4ah6o$yyjj$yaml$$Lexer$advance(self);
|
|
3051
|
-
if (moonbitlang$core$builtin$$Eq$equal$25$(f4ah6o$yyjj$yaml$$Lexer$peek(self), f4ah6o$yyjj$yaml$$lex_folded_block$46$constr$47$
|
|
3060
|
+
if (moonbitlang$core$builtin$$Eq$equal$25$(f4ah6o$yyjj$yaml$$Lexer$peek(self), f4ah6o$yyjj$yaml$$lex_folded_block$46$constr$47$1087)) f4ah6o$yyjj$yaml$$Lexer$advance(self);
|
|
3052
3061
|
}
|
|
3053
3062
|
continue;
|
|
3054
3063
|
} else break;
|
|
@@ -3078,7 +3087,7 @@ function f4ah6o$yyjj$yaml$$Lexer$lex_literal_block(self, start) {
|
|
|
3078
3087
|
break _L;
|
|
3079
3088
|
}
|
|
3080
3089
|
f4ah6o$yyjj$yaml$$Lexer$advance(self);
|
|
3081
|
-
if (moonbitlang$core$builtin$$Eq$equal$25$(f4ah6o$yyjj$yaml$$Lexer$peek(self), f4ah6o$yyjj$yaml$$lex_literal_block$46$constr$47$
|
|
3090
|
+
if (moonbitlang$core$builtin$$Eq$equal$25$(f4ah6o$yyjj$yaml$$Lexer$peek(self), f4ah6o$yyjj$yaml$$lex_literal_block$46$constr$47$1116)) f4ah6o$yyjj$yaml$$Lexer$advance(self);
|
|
3082
3091
|
}
|
|
3083
3092
|
const block_indent = f4ah6o$yyjj$yaml$$Lexer$current_indent(self) + 2 | 0;
|
|
3084
3093
|
const buf = moonbitlang$core$builtin$$StringBuilder$new$46$inner(0);
|
|
@@ -3122,7 +3131,7 @@ function f4ah6o$yyjj$yaml$$Lexer$lex_literal_block(self, start) {
|
|
|
3122
3131
|
break _L$2;
|
|
3123
3132
|
}
|
|
3124
3133
|
f4ah6o$yyjj$yaml$$Lexer$advance(self);
|
|
3125
|
-
if (moonbitlang$core$builtin$$Eq$equal$25$(f4ah6o$yyjj$yaml$$Lexer$peek(self), f4ah6o$yyjj$yaml$$lex_literal_block$46$constr$47$
|
|
3134
|
+
if (moonbitlang$core$builtin$$Eq$equal$25$(f4ah6o$yyjj$yaml$$Lexer$peek(self), f4ah6o$yyjj$yaml$$lex_literal_block$46$constr$47$1117)) f4ah6o$yyjj$yaml$$Lexer$advance(self);
|
|
3126
3135
|
}
|
|
3127
3136
|
continue;
|
|
3128
3137
|
} else break;
|
|
@@ -3184,12 +3193,12 @@ function f4ah6o$yyjj$yaml$$Lexer$lex_single_quoted(self, start) {
|
|
|
3184
3193
|
const buf = moonbitlang$core$builtin$$StringBuilder$new$46$inner(0);
|
|
3185
3194
|
while (true) {
|
|
3186
3195
|
const _bind = f4ah6o$yyjj$yaml$$Lexer$peek(self);
|
|
3187
|
-
if (_bind === -1) return f4ah6o$yyjj$yaml$$Token$new(f4ah6o$yyjj$yaml$$lex_single_quoted$46$constr$47$
|
|
3196
|
+
if (_bind === -1) return f4ah6o$yyjj$yaml$$Token$new(f4ah6o$yyjj$yaml$$lex_single_quoted$46$constr$47$1154, f4ah6o$yyjj$common$$Span$new(start, f4ah6o$yyjj$yaml$$Lexer$current_pos(self)));
|
|
3188
3197
|
else {
|
|
3189
3198
|
const _x = _bind;
|
|
3190
3199
|
if (_x === 39) {
|
|
3191
3200
|
f4ah6o$yyjj$yaml$$Lexer$advance(self);
|
|
3192
|
-
if (moonbitlang$core$builtin$$Eq$equal$25$(f4ah6o$yyjj$yaml$$Lexer$peek(self), f4ah6o$yyjj$yaml$$lex_single_quoted$46$constr$47$
|
|
3201
|
+
if (moonbitlang$core$builtin$$Eq$equal$25$(f4ah6o$yyjj$yaml$$Lexer$peek(self), f4ah6o$yyjj$yaml$$lex_single_quoted$46$constr$47$1155)) {
|
|
3193
3202
|
f4ah6o$yyjj$yaml$$Lexer$advance(self);
|
|
3194
3203
|
moonbitlang$core$builtin$$Logger$write_char$0$(buf, 39);
|
|
3195
3204
|
} else break;
|
|
@@ -3230,7 +3239,7 @@ function f4ah6o$yyjj$yaml$$Lexer$next_token(self) {
|
|
|
3230
3239
|
return f4ah6o$yyjj$yaml$$Token$new($64$f4ah6o$47$yyjj$47$yaml$46$TokenKind$Newline, f4ah6o$yyjj$common$$Span$new(start, f4ah6o$yyjj$yaml$$Lexer$current_pos(self)));
|
|
3231
3240
|
case 13:
|
|
3232
3241
|
f4ah6o$yyjj$yaml$$Lexer$advance(self);
|
|
3233
|
-
if (moonbitlang$core$builtin$$Eq$equal$25$(f4ah6o$yyjj$yaml$$Lexer$peek(self), f4ah6o$yyjj$yaml$$next_token$46$constr$47$
|
|
3242
|
+
if (moonbitlang$core$builtin$$Eq$equal$25$(f4ah6o$yyjj$yaml$$Lexer$peek(self), f4ah6o$yyjj$yaml$$next_token$46$constr$47$1166)) f4ah6o$yyjj$yaml$$Lexer$advance(self);
|
|
3234
3243
|
return f4ah6o$yyjj$yaml$$Token$new($64$f4ah6o$47$yyjj$47$yaml$46$TokenKind$Newline, f4ah6o$yyjj$common$$Span$new(start, f4ah6o$yyjj$yaml$$Lexer$current_pos(self)));
|
|
3235
3244
|
case 32: break _L;
|
|
3236
3245
|
case 9: break _L;
|
|
@@ -3241,10 +3250,10 @@ function f4ah6o$yyjj$yaml$$Lexer$next_token(self) {
|
|
|
3241
3250
|
f4ah6o$yyjj$yaml$$Lexer$advance(self);
|
|
3242
3251
|
return f4ah6o$yyjj$yaml$$Token$new($64$f4ah6o$47$yyjj$47$yaml$46$TokenKind$Colon, f4ah6o$yyjj$common$$Span$new(start, f4ah6o$yyjj$yaml$$Lexer$current_pos(self)));
|
|
3243
3252
|
case 45:
|
|
3244
|
-
_L$2: if (moonbitlang$core$builtin$$Eq$equal$25$(f4ah6o$yyjj$yaml$$Lexer$peek_at(self, 1), f4ah6o$yyjj$yaml$$next_token$46$constr$47$
|
|
3245
|
-
else if (moonbitlang$core$builtin$$Eq$equal$25$(f4ah6o$yyjj$yaml$$Lexer$peek_at(self, 1), f4ah6o$yyjj$yaml$$next_token$46$constr$47$
|
|
3253
|
+
_L$2: if (moonbitlang$core$builtin$$Eq$equal$25$(f4ah6o$yyjj$yaml$$Lexer$peek_at(self, 1), f4ah6o$yyjj$yaml$$next_token$46$constr$47$1167)) break _L$2;
|
|
3254
|
+
else if (moonbitlang$core$builtin$$Eq$equal$25$(f4ah6o$yyjj$yaml$$Lexer$peek_at(self, 1), f4ah6o$yyjj$yaml$$next_token$46$constr$47$1168)) break _L$2;
|
|
3246
3255
|
else if (f4ah6o$yyjj$yaml$$Lexer$peek_at(self, 1) === -1) break _L$2;
|
|
3247
|
-
else if (moonbitlang$core$builtin$$Eq$equal$25$(f4ah6o$yyjj$yaml$$Lexer$peek_at(self, 1), f4ah6o$yyjj$yaml$$next_token$46$constr$47$
|
|
3256
|
+
else if (moonbitlang$core$builtin$$Eq$equal$25$(f4ah6o$yyjj$yaml$$Lexer$peek_at(self, 1), f4ah6o$yyjj$yaml$$next_token$46$constr$47$1169) && moonbitlang$core$builtin$$Eq$equal$25$(f4ah6o$yyjj$yaml$$Lexer$peek_at(self, 2), f4ah6o$yyjj$yaml$$next_token$46$constr$47$1170)) {
|
|
3248
3257
|
f4ah6o$yyjj$yaml$$Lexer$advance(self);
|
|
3249
3258
|
f4ah6o$yyjj$yaml$$Lexer$advance(self);
|
|
3250
3259
|
f4ah6o$yyjj$yaml$$Lexer$advance(self);
|
|
@@ -3252,7 +3261,7 @@ function f4ah6o$yyjj$yaml$$Lexer$next_token(self) {
|
|
|
3252
3261
|
} else return f4ah6o$yyjj$yaml$$Lexer$lex_plain_scalar(self, start);
|
|
3253
3262
|
f4ah6o$yyjj$yaml$$Lexer$advance(self);
|
|
3254
3263
|
return f4ah6o$yyjj$yaml$$Token$new($64$f4ah6o$47$yyjj$47$yaml$46$TokenKind$Dash, f4ah6o$yyjj$common$$Span$new(start, f4ah6o$yyjj$yaml$$Lexer$current_pos(self)));
|
|
3255
|
-
case 46: if (moonbitlang$core$builtin$$Eq$equal$25$(f4ah6o$yyjj$yaml$$Lexer$peek_at(self, 1), f4ah6o$yyjj$yaml$$next_token$46$constr$47$
|
|
3264
|
+
case 46: if (moonbitlang$core$builtin$$Eq$equal$25$(f4ah6o$yyjj$yaml$$Lexer$peek_at(self, 1), f4ah6o$yyjj$yaml$$next_token$46$constr$47$1171) && moonbitlang$core$builtin$$Eq$equal$25$(f4ah6o$yyjj$yaml$$Lexer$peek_at(self, 2), f4ah6o$yyjj$yaml$$next_token$46$constr$47$1172)) {
|
|
3256
3265
|
f4ah6o$yyjj$yaml$$Lexer$advance(self);
|
|
3257
3266
|
f4ah6o$yyjj$yaml$$Lexer$advance(self);
|
|
3258
3267
|
f4ah6o$yyjj$yaml$$Lexer$advance(self);
|