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