yyjj 2025.12.0 → 2025.12.3

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.mjs CHANGED
@@ -302,37 +302,37 @@ const f4ah6o$yyjj$common$$zero$46$record$47$413 = {
302
302
  offset: 0
303
303
  };
304
304
  const f4ah6o$yyjj$jsonc$$int_to_hex4$46$hex_chars$124$192 = "0123456789abcdef";
305
- const f4ah6o$yyjj$jsonc$$lex_comment_or_invalid$46$constr$47$594 = new $64$f4ah6o$47$yyjj$47$jsonc$46$TokenKind$Invalid("unexpected character: /");
306
- const f4ah6o$yyjj$jsonc$$lex_comment_or_invalid$46$constr$47$595 = new $64$f4ah6o$47$yyjj$47$jsonc$46$TokenKind$Invalid("unclosed block comment");
307
- const f4ah6o$yyjj$jsonc$$lex_comment_or_invalid$46$constr$47$596 = 47;
308
- const f4ah6o$yyjj$jsonc$$lex_number$46$constr$47$628 = 45;
309
- const f4ah6o$yyjj$jsonc$$lex_number$46$constr$47$629 = new $64$f4ah6o$47$yyjj$47$jsonc$46$TokenKind$Invalid("invalid number");
310
- const f4ah6o$yyjj$jsonc$$lex_number$46$constr$47$630 = 46;
311
- const f4ah6o$yyjj$jsonc$$lex_number$46$constr$47$631 = new $64$f4ah6o$47$yyjj$47$jsonc$46$TokenKind$Invalid("invalid number: expected digit after decimal point");
312
- const f4ah6o$yyjj$jsonc$$lex_number$46$constr$47$632 = new $64$f4ah6o$47$yyjj$47$jsonc$46$TokenKind$Invalid("invalid number: expected digit in exponent");
313
- const f4ah6o$yyjj$jsonc$$lex_string$46$constr$47$674 = new $64$f4ah6o$47$yyjj$47$jsonc$46$TokenKind$Invalid("unclosed string");
314
- const f4ah6o$yyjj$jsonc$$lex_string$46$constr$47$675 = new $64$f4ah6o$47$yyjj$47$jsonc$46$TokenKind$Invalid("unclosed string");
315
- const f4ah6o$yyjj$jsonc$$lex_string$46$constr$47$676 = new $64$f4ah6o$47$yyjj$47$jsonc$46$TokenKind$Invalid("invalid unicode escape");
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
- 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
- const f4ah6o$yyjj$jsonc$$next_token$46$constr$47$699 = 10;
319
- const f4ah6o$yyjj$yaml$$lex_alias$46$constr$47$1055 = new $64$f4ah6o$47$yyjj$47$yaml$46$TokenKind$Invalid("empty alias name");
320
- const f4ah6o$yyjj$yaml$$lex_anchor$46$constr$47$1060 = new $64$f4ah6o$47$yyjj$47$yaml$46$TokenKind$Invalid("empty anchor name");
321
- 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");
322
- 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");
323
- const f4ah6o$yyjj$yaml$$lex_folded_block$46$constr$47$1082 = 10;
324
- const f4ah6o$yyjj$yaml$$lex_folded_block$46$constr$47$1083 = 10;
325
- const f4ah6o$yyjj$yaml$$lex_literal_block$46$constr$47$1112 = 10;
326
- const f4ah6o$yyjj$yaml$$lex_literal_block$46$constr$47$1113 = 10;
327
- 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");
328
- const f4ah6o$yyjj$yaml$$lex_single_quoted$46$constr$47$1151 = 39;
329
- const f4ah6o$yyjj$yaml$$next_token$46$constr$47$1162 = 10;
330
- const f4ah6o$yyjj$yaml$$next_token$46$constr$47$1163 = 32;
331
- const f4ah6o$yyjj$yaml$$next_token$46$constr$47$1164 = 10;
332
- const f4ah6o$yyjj$yaml$$next_token$46$constr$47$1165 = 45;
333
- const f4ah6o$yyjj$yaml$$next_token$46$constr$47$1166 = 45;
334
- const f4ah6o$yyjj$yaml$$next_token$46$constr$47$1167 = 46;
335
- const f4ah6o$yyjj$yaml$$next_token$46$constr$47$1168 = 46;
305
+ const f4ah6o$yyjj$jsonc$$lex_comment_or_invalid$46$constr$47$596 = new $64$f4ah6o$47$yyjj$47$jsonc$46$TokenKind$Invalid("unexpected character: /");
306
+ const f4ah6o$yyjj$jsonc$$lex_comment_or_invalid$46$constr$47$597 = new $64$f4ah6o$47$yyjj$47$jsonc$46$TokenKind$Invalid("unclosed block comment");
307
+ const f4ah6o$yyjj$jsonc$$lex_comment_or_invalid$46$constr$47$598 = 47;
308
+ const f4ah6o$yyjj$jsonc$$lex_number$46$constr$47$630 = 45;
309
+ const f4ah6o$yyjj$jsonc$$lex_number$46$constr$47$631 = new $64$f4ah6o$47$yyjj$47$jsonc$46$TokenKind$Invalid("invalid number");
310
+ const f4ah6o$yyjj$jsonc$$lex_number$46$constr$47$632 = 46;
311
+ const f4ah6o$yyjj$jsonc$$lex_number$46$constr$47$633 = new $64$f4ah6o$47$yyjj$47$jsonc$46$TokenKind$Invalid("invalid number: expected digit after decimal point");
312
+ const f4ah6o$yyjj$jsonc$$lex_number$46$constr$47$634 = new $64$f4ah6o$47$yyjj$47$jsonc$46$TokenKind$Invalid("invalid number: expected digit in exponent");
313
+ const f4ah6o$yyjj$jsonc$$lex_string$46$constr$47$676 = new $64$f4ah6o$47$yyjj$47$jsonc$46$TokenKind$Invalid("unclosed string");
314
+ const f4ah6o$yyjj$jsonc$$lex_string$46$constr$47$677 = new $64$f4ah6o$47$yyjj$47$jsonc$46$TokenKind$Invalid("unclosed string");
315
+ const f4ah6o$yyjj$jsonc$$lex_string$46$constr$47$678 = new $64$f4ah6o$47$yyjj$47$jsonc$46$TokenKind$Invalid("invalid unicode escape");
316
+ const f4ah6o$yyjj$jsonc$$lex_string$46$constr$47$679 = new $64$f4ah6o$47$yyjj$47$jsonc$46$TokenKind$Invalid("invalid unicode escape");
317
+ const f4ah6o$yyjj$jsonc$$lex_string$46$constr$47$680 = new $64$f4ah6o$47$yyjj$47$jsonc$46$TokenKind$Invalid("control character in string");
318
+ const f4ah6o$yyjj$jsonc$$next_token$46$constr$47$701 = 10;
319
+ const f4ah6o$yyjj$yaml$$lex_alias$46$constr$47$1061 = new $64$f4ah6o$47$yyjj$47$yaml$46$TokenKind$Invalid("empty alias name");
320
+ const f4ah6o$yyjj$yaml$$lex_anchor$46$constr$47$1066 = new $64$f4ah6o$47$yyjj$47$yaml$46$TokenKind$Invalid("empty anchor name");
321
+ const f4ah6o$yyjj$yaml$$lex_double_quoted$46$constr$47$1072 = 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$1073 = 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$1088 = 10;
324
+ const f4ah6o$yyjj$yaml$$lex_folded_block$46$constr$47$1089 = 10;
325
+ const f4ah6o$yyjj$yaml$$lex_literal_block$46$constr$47$1118 = 10;
326
+ const f4ah6o$yyjj$yaml$$lex_literal_block$46$constr$47$1119 = 10;
327
+ const f4ah6o$yyjj$yaml$$lex_single_quoted$46$constr$47$1156 = 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$1157 = 39;
329
+ const f4ah6o$yyjj$yaml$$next_token$46$constr$47$1168 = 10;
330
+ const f4ah6o$yyjj$yaml$$next_token$46$constr$47$1169 = 32;
331
+ const f4ah6o$yyjj$yaml$$next_token$46$constr$47$1170 = 10;
332
+ const f4ah6o$yyjj$yaml$$next_token$46$constr$47$1171 = 45;
333
+ const f4ah6o$yyjj$yaml$$next_token$46$constr$47$1172 = 45;
334
+ const f4ah6o$yyjj$yaml$$next_token$46$constr$47$1173 = 46;
335
+ const f4ah6o$yyjj$yaml$$next_token$46$constr$47$1174 = 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);
@@ -1298,58 +1298,58 @@ function f4ah6o$yyjj$pretty$$join(docs, sep) {
1298
1298
  }
1299
1299
  return result;
1300
1300
  }
1301
- function moonbitlang$core$builtin$$Eq$equal$24$(_x_269, _x_270) {
1302
- switch (_x_269.$tag) {
1303
- case 0: if (_x_270.$tag === 0) return true;
1301
+ function moonbitlang$core$builtin$$Eq$equal$24$(_x_271, _x_272) {
1302
+ switch (_x_271.$tag) {
1303
+ case 0: if (_x_272.$tag === 0) return true;
1304
1304
  else return false;
1305
- case 1: if (_x_270.$tag === 1) return true;
1305
+ case 1: if (_x_272.$tag === 1) return true;
1306
1306
  else return false;
1307
- case 2: if (_x_270.$tag === 2) return true;
1307
+ case 2: if (_x_272.$tag === 2) return true;
1308
1308
  else return false;
1309
- case 3: if (_x_270.$tag === 3) return true;
1309
+ case 3: if (_x_272.$tag === 3) return true;
1310
1310
  else return false;
1311
- case 4: if (_x_270.$tag === 4) return true;
1311
+ case 4: if (_x_272.$tag === 4) return true;
1312
1312
  else return false;
1313
- case 5: if (_x_270.$tag === 5) return true;
1313
+ case 5: if (_x_272.$tag === 5) return true;
1314
1314
  else return false;
1315
1315
  case 6: {
1316
- const _$42$x0_271 = _x_269._0;
1317
- if (_x_270.$tag === 6) return _$42$x0_271 === _x_270._0;
1316
+ const _$42$x0_273 = _x_271._0;
1317
+ if (_x_272.$tag === 6) return _$42$x0_273 === _x_272._0;
1318
1318
  else return false;
1319
1319
  }
1320
1320
  case 7: {
1321
- const _$42$x0_273 = _x_269._0;
1322
- if (_x_270.$tag === 7) return _$42$x0_273 === _x_270._0;
1321
+ const _$42$x0_275 = _x_271._0;
1322
+ if (_x_272.$tag === 7) return _$42$x0_275 === _x_272._0;
1323
1323
  else return false;
1324
1324
  }
1325
- case 8: if (_x_270.$tag === 8) return true;
1325
+ case 8: if (_x_272.$tag === 8) return true;
1326
1326
  else return false;
1327
- case 9: if (_x_270.$tag === 9) return true;
1327
+ case 9: if (_x_272.$tag === 9) return true;
1328
1328
  else return false;
1329
- case 10: if (_x_270.$tag === 10) return true;
1329
+ case 10: if (_x_272.$tag === 10) return true;
1330
1330
  else return false;
1331
1331
  case 11: {
1332
- const _$42$x0_275 = _x_269._0;
1333
- if (_x_270.$tag === 11) return _$42$x0_275 === _x_270._0;
1332
+ const _$42$x0_277 = _x_271._0;
1333
+ if (_x_272.$tag === 11) return _$42$x0_277 === _x_272._0;
1334
1334
  else return false;
1335
1335
  }
1336
1336
  case 12: {
1337
- const _$42$x0_277 = _x_269._0;
1338
- if (_x_270.$tag === 12) return _$42$x0_277 === _x_270._0;
1337
+ const _$42$x0_279 = _x_271._0;
1338
+ if (_x_272.$tag === 12) return _$42$x0_279 === _x_272._0;
1339
1339
  else return false;
1340
1340
  }
1341
1341
  case 13: {
1342
- const _$42$x0_279 = _x_269._0;
1343
- if (_x_270.$tag === 13) return _$42$x0_279 === _x_270._0;
1342
+ const _$42$x0_281 = _x_271._0;
1343
+ if (_x_272.$tag === 13) return _$42$x0_281 === _x_272._0;
1344
1344
  else return false;
1345
1345
  }
1346
- case 14: if (_x_270.$tag === 14) return true;
1346
+ case 14: if (_x_272.$tag === 14) return true;
1347
1347
  else return false;
1348
- case 15: if (_x_270.$tag === 15) return true;
1348
+ case 15: if (_x_272.$tag === 15) return true;
1349
1349
  else return false;
1350
1350
  default: {
1351
- const _$42$x0_281 = _x_269._0;
1352
- if (_x_270.$tag === 16) return _$42$x0_281 === _x_270._0;
1351
+ const _$42$x0_283 = _x_271._0;
1352
+ if (_x_272.$tag === 16) return _$42$x0_283 === _x_272._0;
1353
1353
  else return false;
1354
1354
  }
1355
1355
  }
@@ -1510,10 +1510,14 @@ function f4ah6o$yyjj$jsonc$$object_to_doc(props) {
1510
1510
  const i = _tmp;
1511
1511
  if (i < props.length) {
1512
1512
  const prop = moonbitlang$core$array$$Array$at$14$(props, i);
1513
+ const key_leading = f4ah6o$yyjj$jsonc$$trivia_to_doc(prop.key_trivia.leading, true);
1513
1514
  const key_doc = new $64$f4ah6o$47$yyjj$47$pretty$46$Doc$Text(f4ah6o$yyjj$jsonc$$escape_json_string(prop.key));
1515
+ const key_trailing = f4ah6o$yyjj$jsonc$$trivia_to_doc(prop.key_trivia.trailing, false);
1514
1516
  const value_doc = f4ah6o$yyjj$jsonc$$to_doc_with_trivia(prop.value);
1515
1517
  const prop_doc = f4ah6o$yyjj$pretty$$concat([
1518
+ key_leading,
1516
1519
  key_doc,
1520
+ key_trailing,
1517
1521
  new $64$f4ah6o$47$yyjj$47$pretty$46$Doc$Text(": "),
1518
1522
  value_doc
1519
1523
  ]);
@@ -1604,12 +1608,12 @@ function f4ah6o$yyjj$jsonc$$Lexer$lex_comment_or_invalid(self, start) {
1604
1608
  const buf = moonbitlang$core$builtin$$StringBuilder$new$46$inner(0);
1605
1609
  while (true) {
1606
1610
  const _bind$2 = f4ah6o$yyjj$jsonc$$Lexer$peek(self);
1607
- if (_bind$2 === -1) return f4ah6o$yyjj$jsonc$$Token$new(f4ah6o$yyjj$jsonc$$lex_comment_or_invalid$46$constr$47$595, f4ah6o$yyjj$common$$Span$new(start, f4ah6o$yyjj$jsonc$$Lexer$current_pos(self)));
1611
+ if (_bind$2 === -1) return f4ah6o$yyjj$jsonc$$Token$new(f4ah6o$yyjj$jsonc$$lex_comment_or_invalid$46$constr$47$597, f4ah6o$yyjj$common$$Span$new(start, f4ah6o$yyjj$jsonc$$Lexer$current_pos(self)));
1608
1612
  else {
1609
1613
  const _x$2 = _bind$2;
1610
1614
  if (_x$2 === 42) {
1611
1615
  f4ah6o$yyjj$jsonc$$Lexer$advance(self);
1612
- if (moonbitlang$core$builtin$$Eq$equal$25$(f4ah6o$yyjj$jsonc$$Lexer$peek(self), f4ah6o$yyjj$jsonc$$lex_comment_or_invalid$46$constr$47$596)) {
1616
+ if (moonbitlang$core$builtin$$Eq$equal$25$(f4ah6o$yyjj$jsonc$$Lexer$peek(self), f4ah6o$yyjj$jsonc$$lex_comment_or_invalid$46$constr$47$598)) {
1613
1617
  f4ah6o$yyjj$jsonc$$Lexer$advance(self);
1614
1618
  break;
1615
1619
  } else moonbitlang$core$builtin$$Logger$write_char$0$(buf, 42);
@@ -1625,7 +1629,7 @@ function f4ah6o$yyjj$jsonc$$Lexer$lex_comment_or_invalid(self, start) {
1625
1629
  default: break _L;
1626
1630
  }
1627
1631
  }
1628
- return f4ah6o$yyjj$jsonc$$Token$new(f4ah6o$yyjj$jsonc$$lex_comment_or_invalid$46$constr$47$594, f4ah6o$yyjj$common$$Span$new(start, f4ah6o$yyjj$jsonc$$Lexer$current_pos(self)));
1632
+ return f4ah6o$yyjj$jsonc$$Token$new(f4ah6o$yyjj$jsonc$$lex_comment_or_invalid$46$constr$47$596, f4ah6o$yyjj$common$$Span$new(start, f4ah6o$yyjj$jsonc$$Lexer$current_pos(self)));
1629
1633
  }
1630
1634
  function f4ah6o$yyjj$jsonc$$is_ident_char(c) {
1631
1635
  return c >= 97 && c <= 122 || c >= 65 && c <= 90 || c >= 48 && c <= 57 || c === 95;
@@ -1660,7 +1664,7 @@ function f4ah6o$yyjj$jsonc$$Lexer$lex_keyword(self, expected, kind, start) {
1660
1664
  }
1661
1665
  function f4ah6o$yyjj$jsonc$$Lexer$lex_number(self, start) {
1662
1666
  const num_start = self.pos;
1663
- if (moonbitlang$core$builtin$$Eq$equal$25$(f4ah6o$yyjj$jsonc$$Lexer$peek(self), f4ah6o$yyjj$jsonc$$lex_number$46$constr$47$628)) f4ah6o$yyjj$jsonc$$Lexer$advance(self);
1667
+ if (moonbitlang$core$builtin$$Eq$equal$25$(f4ah6o$yyjj$jsonc$$Lexer$peek(self), f4ah6o$yyjj$jsonc$$lex_number$46$constr$47$630)) f4ah6o$yyjj$jsonc$$Lexer$advance(self);
1664
1668
  _L: {
1665
1669
  _L$2: {
1666
1670
  const _bind$1 = f4ah6o$yyjj$jsonc$$Lexer$peek(self);
@@ -1686,9 +1690,9 @@ function f4ah6o$yyjj$jsonc$$Lexer$lex_number(self, start) {
1686
1690
  }
1687
1691
  break _L;
1688
1692
  }
1689
- return f4ah6o$yyjj$jsonc$$Token$new(f4ah6o$yyjj$jsonc$$lex_number$46$constr$47$629, f4ah6o$yyjj$common$$Span$new(start, f4ah6o$yyjj$jsonc$$Lexer$current_pos(self)));
1693
+ return f4ah6o$yyjj$jsonc$$Token$new(f4ah6o$yyjj$jsonc$$lex_number$46$constr$47$631, f4ah6o$yyjj$common$$Span$new(start, f4ah6o$yyjj$jsonc$$Lexer$current_pos(self)));
1690
1694
  }
1691
- if (moonbitlang$core$builtin$$Eq$equal$25$(f4ah6o$yyjj$jsonc$$Lexer$peek(self), f4ah6o$yyjj$jsonc$$lex_number$46$constr$47$630)) {
1695
+ if (moonbitlang$core$builtin$$Eq$equal$25$(f4ah6o$yyjj$jsonc$$Lexer$peek(self), f4ah6o$yyjj$jsonc$$lex_number$46$constr$47$632)) {
1692
1696
  f4ah6o$yyjj$jsonc$$Lexer$advance(self);
1693
1697
  const _bind$1 = f4ah6o$yyjj$jsonc$$Lexer$peek(self);
1694
1698
  let _tmp;
@@ -1697,7 +1701,7 @@ function f4ah6o$yyjj$jsonc$$Lexer$lex_number(self, start) {
1697
1701
  const _d = _bind$1;
1698
1702
  _tmp = _d >= 48 && _d <= 57;
1699
1703
  }
1700
- if (!_tmp) return f4ah6o$yyjj$jsonc$$Token$new(f4ah6o$yyjj$jsonc$$lex_number$46$constr$47$631, f4ah6o$yyjj$common$$Span$new(start, f4ah6o$yyjj$jsonc$$Lexer$current_pos(self)));
1704
+ if (!_tmp) return f4ah6o$yyjj$jsonc$$Token$new(f4ah6o$yyjj$jsonc$$lex_number$46$constr$47$633, f4ah6o$yyjj$common$$Span$new(start, f4ah6o$yyjj$jsonc$$Lexer$current_pos(self)));
1701
1705
  while (true) {
1702
1706
  const _bind$2 = f4ah6o$yyjj$jsonc$$Lexer$peek(self);
1703
1707
  if (_bind$2 === -1) break;
@@ -1740,7 +1744,7 @@ function f4ah6o$yyjj$jsonc$$Lexer$lex_number(self, start) {
1740
1744
  const _d = _bind$3;
1741
1745
  _tmp = _d >= 48 && _d <= 57;
1742
1746
  }
1743
- if (!_tmp) return f4ah6o$yyjj$jsonc$$Token$new(f4ah6o$yyjj$jsonc$$lex_number$46$constr$47$632, f4ah6o$yyjj$common$$Span$new(start, f4ah6o$yyjj$jsonc$$Lexer$current_pos(self)));
1747
+ if (!_tmp) return f4ah6o$yyjj$jsonc$$Token$new(f4ah6o$yyjj$jsonc$$lex_number$46$constr$47$634, f4ah6o$yyjj$common$$Span$new(start, f4ah6o$yyjj$jsonc$$Lexer$current_pos(self)));
1744
1748
  while (true) {
1745
1749
  const _bind$4 = f4ah6o$yyjj$jsonc$$Lexer$peek(self);
1746
1750
  if (_bind$4 === -1) break;
@@ -1785,7 +1789,7 @@ function f4ah6o$yyjj$jsonc$$Lexer$lex_string(self, start) {
1785
1789
  const buf = moonbitlang$core$builtin$$StringBuilder$new$46$inner(0);
1786
1790
  _L: while (true) {
1787
1791
  const _bind = f4ah6o$yyjj$jsonc$$Lexer$peek(self);
1788
- if (_bind === -1) return f4ah6o$yyjj$jsonc$$Token$new(f4ah6o$yyjj$jsonc$$lex_string$46$constr$47$674, f4ah6o$yyjj$common$$Span$new(start, f4ah6o$yyjj$jsonc$$Lexer$current_pos(self)));
1792
+ if (_bind === -1) return f4ah6o$yyjj$jsonc$$Token$new(f4ah6o$yyjj$jsonc$$lex_string$46$constr$47$676, f4ah6o$yyjj$common$$Span$new(start, f4ah6o$yyjj$jsonc$$Lexer$current_pos(self)));
1789
1793
  else {
1790
1794
  const _x = _bind;
1791
1795
  switch (_x) {
@@ -1795,7 +1799,7 @@ function f4ah6o$yyjj$jsonc$$Lexer$lex_string(self, start) {
1795
1799
  case 92: {
1796
1800
  f4ah6o$yyjj$jsonc$$Lexer$advance(self);
1797
1801
  const _bind$2 = f4ah6o$yyjj$jsonc$$Lexer$peek(self);
1798
- if (_bind$2 === -1) return f4ah6o$yyjj$jsonc$$Token$new(f4ah6o$yyjj$jsonc$$lex_string$46$constr$47$675, f4ah6o$yyjj$common$$Span$new(start, f4ah6o$yyjj$jsonc$$Lexer$current_pos(self)));
1802
+ if (_bind$2 === -1) return f4ah6o$yyjj$jsonc$$Token$new(f4ah6o$yyjj$jsonc$$lex_string$46$constr$47$677, f4ah6o$yyjj$common$$Span$new(start, f4ah6o$yyjj$jsonc$$Lexer$current_pos(self)));
1799
1803
  else {
1800
1804
  const _esc = _bind$2;
1801
1805
  f4ah6o$yyjj$jsonc$$Lexer$advance(self);
@@ -1843,14 +1847,14 @@ function f4ah6o$yyjj$jsonc$$Lexer$lex_string(self, start) {
1843
1847
  }
1844
1848
  break _L$2;
1845
1849
  }
1846
- return f4ah6o$yyjj$jsonc$$Token$new(f4ah6o$yyjj$jsonc$$lex_string$46$constr$47$676, f4ah6o$yyjj$common$$Span$new(start, f4ah6o$yyjj$jsonc$$Lexer$current_pos(self)));
1850
+ return f4ah6o$yyjj$jsonc$$Token$new(f4ah6o$yyjj$jsonc$$lex_string$46$constr$47$678, f4ah6o$yyjj$common$$Span$new(start, f4ah6o$yyjj$jsonc$$Lexer$current_pos(self)));
1847
1851
  }
1848
1852
  _tmp = i + 1 | 0;
1849
1853
  continue;
1850
1854
  } else break;
1851
1855
  }
1852
1856
  const _bind$3 = f4ah6o$yyjj$jsonc$$parse_hex(hex);
1853
- if (_bind$3 === void 0) return f4ah6o$yyjj$jsonc$$Token$new(f4ah6o$yyjj$jsonc$$lex_string$46$constr$47$677, f4ah6o$yyjj$common$$Span$new(start, f4ah6o$yyjj$jsonc$$Lexer$current_pos(self)));
1857
+ if (_bind$3 === void 0) return f4ah6o$yyjj$jsonc$$Token$new(f4ah6o$yyjj$jsonc$$lex_string$46$constr$47$679, f4ah6o$yyjj$common$$Span$new(start, f4ah6o$yyjj$jsonc$$Lexer$current_pos(self)));
1854
1858
  else moonbitlang$core$builtin$$Logger$write_char$0$(buf, _bind$3);
1855
1859
  break;
1856
1860
  }
@@ -1859,7 +1863,7 @@ function f4ah6o$yyjj$jsonc$$Lexer$lex_string(self, start) {
1859
1863
  }
1860
1864
  break;
1861
1865
  }
1862
- default: if (_x < 32) return f4ah6o$yyjj$jsonc$$Token$new(f4ah6o$yyjj$jsonc$$lex_string$46$constr$47$678, f4ah6o$yyjj$common$$Span$new(start, f4ah6o$yyjj$jsonc$$Lexer$current_pos(self)));
1866
+ default: if (_x < 32) return f4ah6o$yyjj$jsonc$$Token$new(f4ah6o$yyjj$jsonc$$lex_string$46$constr$47$680, f4ah6o$yyjj$common$$Span$new(start, f4ah6o$yyjj$jsonc$$Lexer$current_pos(self)));
1863
1867
  else {
1864
1868
  f4ah6o$yyjj$jsonc$$Lexer$advance(self);
1865
1869
  moonbitlang$core$builtin$$Logger$write_char$0$(buf, _x);
@@ -1904,7 +1908,7 @@ function f4ah6o$yyjj$jsonc$$Lexer$next_token(self) {
1904
1908
  return f4ah6o$yyjj$jsonc$$Token$new($64$f4ah6o$47$yyjj$47$jsonc$46$TokenKind$Newline, f4ah6o$yyjj$common$$Span$new(start, f4ah6o$yyjj$jsonc$$Lexer$current_pos(self)));
1905
1909
  case 13:
1906
1910
  f4ah6o$yyjj$jsonc$$Lexer$advance(self);
1907
- if (moonbitlang$core$builtin$$Eq$equal$25$(f4ah6o$yyjj$jsonc$$Lexer$peek(self), f4ah6o$yyjj$jsonc$$next_token$46$constr$47$699)) f4ah6o$yyjj$jsonc$$Lexer$advance(self);
1911
+ if (moonbitlang$core$builtin$$Eq$equal$25$(f4ah6o$yyjj$jsonc$$Lexer$peek(self), f4ah6o$yyjj$jsonc$$next_token$46$constr$47$701)) f4ah6o$yyjj$jsonc$$Lexer$advance(self);
1908
1912
  return f4ah6o$yyjj$jsonc$$Token$new($64$f4ah6o$47$yyjj$47$jsonc$46$TokenKind$Newline, f4ah6o$yyjj$common$$Span$new(start, f4ah6o$yyjj$jsonc$$Lexer$current_pos(self)));
1909
1913
  case 47: return f4ah6o$yyjj$jsonc$$Lexer$lex_comment_or_invalid(self, start);
1910
1914
  case 45: break _L;
@@ -2328,224 +2332,224 @@ function f4ah6o$yyjj$jsonc$$Parser$parse(self) {
2328
2332
  function f4ah6o$yyjj$jsonc$$parse(source) {
2329
2333
  return f4ah6o$yyjj$jsonc$$Parser$parse(f4ah6o$yyjj$jsonc$$Parser$from_source(source));
2330
2334
  }
2331
- function moonbitlang$core$builtin$$Eq$equal$18$(_x_386, _x_387) {
2332
- switch (_x_386.$tag) {
2333
- case 0: if (_x_387.$tag === 0) return true;
2335
+ function moonbitlang$core$builtin$$Eq$equal$18$(_x_390, _x_391) {
2336
+ switch (_x_390.$tag) {
2337
+ case 0: if (_x_391.$tag === 0) return true;
2334
2338
  else return false;
2335
- case 1: if (_x_387.$tag === 1) return true;
2339
+ case 1: if (_x_391.$tag === 1) return true;
2336
2340
  else return false;
2337
- case 2: if (_x_387.$tag === 2) return true;
2341
+ case 2: if (_x_391.$tag === 2) return true;
2338
2342
  else return false;
2339
- case 3: if (_x_387.$tag === 3) return true;
2343
+ case 3: if (_x_391.$tag === 3) return true;
2340
2344
  else return false;
2341
- case 4: if (_x_387.$tag === 4) return true;
2345
+ case 4: if (_x_391.$tag === 4) return true;
2342
2346
  else return false;
2343
- case 5: if (_x_387.$tag === 5) return true;
2347
+ case 5: if (_x_391.$tag === 5) return true;
2344
2348
  else return false;
2345
- case 6: if (_x_387.$tag === 6) return true;
2349
+ case 6: if (_x_391.$tag === 6) return true;
2346
2350
  else return false;
2347
2351
  case 7: {
2348
- const _$42$x0_388 = _x_386._0;
2349
- if (_x_387.$tag === 7) return _$42$x0_388 === _x_387._0;
2352
+ const _$42$x0_392 = _x_390._0;
2353
+ if (_x_391.$tag === 7) return _$42$x0_392 === _x_391._0;
2350
2354
  else return false;
2351
2355
  }
2352
2356
  case 8: {
2353
- const _$42$x0_390 = _x_386._0;
2354
- if (_x_387.$tag === 8) return _$42$x0_390 === _x_387._0;
2357
+ const _$42$x0_394 = _x_390._0;
2358
+ if (_x_391.$tag === 8) return _$42$x0_394 === _x_391._0;
2355
2359
  else return false;
2356
2360
  }
2357
2361
  case 9: {
2358
- const _$42$x0_392 = _x_386._0;
2359
- if (_x_387.$tag === 9) return _$42$x0_392 === _x_387._0;
2362
+ const _$42$x0_396 = _x_390._0;
2363
+ if (_x_391.$tag === 9) return _$42$x0_396 === _x_391._0;
2360
2364
  else return false;
2361
2365
  }
2362
2366
  case 10: {
2363
- const _$42$x0_394 = _x_386._0;
2364
- if (_x_387.$tag === 10) return _$42$x0_394 === _x_387._0;
2367
+ const _$42$x0_398 = _x_390._0;
2368
+ if (_x_391.$tag === 10) return _$42$x0_398 === _x_391._0;
2365
2369
  else return false;
2366
2370
  }
2367
2371
  case 11: {
2368
- const _$42$x0_396 = _x_386._0;
2369
- if (_x_387.$tag === 11) return _$42$x0_396 === _x_387._0;
2372
+ const _$42$x0_400 = _x_390._0;
2373
+ if (_x_391.$tag === 11) return _$42$x0_400 === _x_391._0;
2370
2374
  else return false;
2371
2375
  }
2372
2376
  case 12: {
2373
- const _$42$x0_398 = _x_386._0;
2374
- if (_x_387.$tag === 12) return _$42$x0_398 === _x_387._0;
2377
+ const _$42$x0_402 = _x_390._0;
2378
+ if (_x_391.$tag === 12) return _$42$x0_402 === _x_391._0;
2375
2379
  else return false;
2376
2380
  }
2377
2381
  case 13: {
2378
- const _$42$x0_400 = _x_386._0;
2379
- if (_x_387.$tag === 13) return _$42$x0_400 === _x_387._0;
2382
+ const _$42$x0_404 = _x_390._0;
2383
+ if (_x_391.$tag === 13) return _$42$x0_404 === _x_391._0;
2380
2384
  else return false;
2381
2385
  }
2382
- case 14: if (_x_387.$tag === 14) return true;
2386
+ case 14: if (_x_391.$tag === 14) return true;
2383
2387
  else return false;
2384
- case 15: if (_x_387.$tag === 15) return true;
2388
+ case 15: if (_x_391.$tag === 15) return true;
2385
2389
  else return false;
2386
- case 16: if (_x_387.$tag === 16) return true;
2390
+ case 16: if (_x_391.$tag === 16) return true;
2387
2391
  else return false;
2388
2392
  case 17: {
2389
- const _$42$x0_402 = _x_386._0;
2390
- if (_x_387.$tag === 17) return _$42$x0_402 === _x_387._0;
2393
+ const _$42$x0_406 = _x_390._0;
2394
+ if (_x_391.$tag === 17) return _$42$x0_406 === _x_391._0;
2391
2395
  else return false;
2392
2396
  }
2393
2397
  case 18: {
2394
- const _$42$x0_404 = _x_386._0;
2395
- if (_x_387.$tag === 18) return _$42$x0_404 === _x_387._0;
2398
+ const _$42$x0_408 = _x_390._0;
2399
+ if (_x_391.$tag === 18) return _$42$x0_408 === _x_391._0;
2396
2400
  else return false;
2397
2401
  }
2398
2402
  case 19: {
2399
- const _$42$x0_406 = _x_386._0;
2400
- if (_x_387.$tag === 19) return _$42$x0_406 === _x_387._0;
2403
+ const _$42$x0_410 = _x_390._0;
2404
+ if (_x_391.$tag === 19) return _$42$x0_410 === _x_391._0;
2401
2405
  else return false;
2402
2406
  }
2403
2407
  case 20: {
2404
- const _$42$x0_408 = _x_386._0;
2405
- if (_x_387.$tag === 20) return _$42$x0_408 === _x_387._0;
2408
+ const _$42$x0_412 = _x_390._0;
2409
+ if (_x_391.$tag === 20) return _$42$x0_412 === _x_391._0;
2406
2410
  else return false;
2407
2411
  }
2408
- case 21: if (_x_387.$tag === 21) return true;
2412
+ case 21: if (_x_391.$tag === 21) return true;
2409
2413
  else return false;
2410
- case 22: if (_x_387.$tag === 22) return true;
2414
+ case 22: if (_x_391.$tag === 22) return true;
2411
2415
  else return false;
2412
- case 23: if (_x_387.$tag === 23) return true;
2416
+ case 23: if (_x_391.$tag === 23) return true;
2413
2417
  else return false;
2414
- case 24: if (_x_387.$tag === 24) return true;
2418
+ case 24: if (_x_391.$tag === 24) return true;
2415
2419
  else return false;
2416
2420
  default: {
2417
- const _$42$x0_410 = _x_386._0;
2418
- if (_x_387.$tag === 25) return _$42$x0_410 === _x_387._0;
2421
+ const _$42$x0_414 = _x_390._0;
2422
+ if (_x_391.$tag === 25) return _$42$x0_414 === _x_391._0;
2419
2423
  else return false;
2420
2424
  }
2421
2425
  }
2422
2426
  }
2423
- function moonbitlang$core$builtin$$Show$output$18$(_x_358, _x_359) {
2424
- switch (_x_358.$tag) {
2427
+ function moonbitlang$core$builtin$$Show$output$18$(_x_362, _x_363) {
2428
+ switch (_x_362.$tag) {
2425
2429
  case 0:
2426
- _x_359.method_table.method_0(_x_359.self, "Colon");
2430
+ _x_363.method_table.method_0(_x_363.self, "Colon");
2427
2431
  return;
2428
2432
  case 1:
2429
- _x_359.method_table.method_0(_x_359.self, "Dash");
2433
+ _x_363.method_table.method_0(_x_363.self, "Dash");
2430
2434
  return;
2431
2435
  case 2:
2432
- _x_359.method_table.method_0(_x_359.self, "Comma");
2436
+ _x_363.method_table.method_0(_x_363.self, "Comma");
2433
2437
  return;
2434
2438
  case 3:
2435
- _x_359.method_table.method_0(_x_359.self, "LBrace");
2439
+ _x_363.method_table.method_0(_x_363.self, "LBrace");
2436
2440
  return;
2437
2441
  case 4:
2438
- _x_359.method_table.method_0(_x_359.self, "RBrace");
2442
+ _x_363.method_table.method_0(_x_363.self, "RBrace");
2439
2443
  return;
2440
2444
  case 5:
2441
- _x_359.method_table.method_0(_x_359.self, "LBracket");
2445
+ _x_363.method_table.method_0(_x_363.self, "LBracket");
2442
2446
  return;
2443
2447
  case 6:
2444
- _x_359.method_table.method_0(_x_359.self, "RBracket");
2448
+ _x_363.method_table.method_0(_x_363.self, "RBracket");
2445
2449
  return;
2446
2450
  case 7: {
2447
- const _$42$arg_360 = _x_358._0;
2448
- _x_359.method_table.method_0(_x_359.self, "Indent(");
2449
- moonbitlang$core$builtin$$Logger$write_object$2$(_x_359, _$42$arg_360);
2450
- _x_359.method_table.method_0(_x_359.self, ")");
2451
+ const _$42$arg_364 = _x_362._0;
2452
+ _x_363.method_table.method_0(_x_363.self, "Indent(");
2453
+ moonbitlang$core$builtin$$Logger$write_object$2$(_x_363, _$42$arg_364);
2454
+ _x_363.method_table.method_0(_x_363.self, ")");
2451
2455
  return;
2452
2456
  }
2453
2457
  case 8: {
2454
- const _$42$arg_361 = _x_358._0;
2455
- _x_359.method_table.method_0(_x_359.self, "Dedent(");
2456
- moonbitlang$core$builtin$$Logger$write_object$2$(_x_359, _$42$arg_361);
2457
- _x_359.method_table.method_0(_x_359.self, ")");
2458
+ const _$42$arg_365 = _x_362._0;
2459
+ _x_363.method_table.method_0(_x_363.self, "Dedent(");
2460
+ moonbitlang$core$builtin$$Logger$write_object$2$(_x_363, _$42$arg_365);
2461
+ _x_363.method_table.method_0(_x_363.self, ")");
2458
2462
  return;
2459
2463
  }
2460
2464
  case 9: {
2461
- const _$42$arg_362 = _x_358._0;
2462
- _x_359.method_table.method_0(_x_359.self, "PlainScalar(");
2463
- moonbitlang$core$builtin$$Logger$write_object$3$(_x_359, _$42$arg_362);
2464
- _x_359.method_table.method_0(_x_359.self, ")");
2465
+ const _$42$arg_366 = _x_362._0;
2466
+ _x_363.method_table.method_0(_x_363.self, "PlainScalar(");
2467
+ moonbitlang$core$builtin$$Logger$write_object$3$(_x_363, _$42$arg_366);
2468
+ _x_363.method_table.method_0(_x_363.self, ")");
2465
2469
  return;
2466
2470
  }
2467
2471
  case 10: {
2468
- const _$42$arg_363 = _x_358._0;
2469
- _x_359.method_table.method_0(_x_359.self, "SingleQuotedScalar(");
2470
- moonbitlang$core$builtin$$Logger$write_object$3$(_x_359, _$42$arg_363);
2471
- _x_359.method_table.method_0(_x_359.self, ")");
2472
+ const _$42$arg_367 = _x_362._0;
2473
+ _x_363.method_table.method_0(_x_363.self, "SingleQuotedScalar(");
2474
+ moonbitlang$core$builtin$$Logger$write_object$3$(_x_363, _$42$arg_367);
2475
+ _x_363.method_table.method_0(_x_363.self, ")");
2472
2476
  return;
2473
2477
  }
2474
2478
  case 11: {
2475
- const _$42$arg_364 = _x_358._0;
2476
- _x_359.method_table.method_0(_x_359.self, "DoubleQuotedScalar(");
2477
- moonbitlang$core$builtin$$Logger$write_object$3$(_x_359, _$42$arg_364);
2478
- _x_359.method_table.method_0(_x_359.self, ")");
2479
+ const _$42$arg_368 = _x_362._0;
2480
+ _x_363.method_table.method_0(_x_363.self, "DoubleQuotedScalar(");
2481
+ moonbitlang$core$builtin$$Logger$write_object$3$(_x_363, _$42$arg_368);
2482
+ _x_363.method_table.method_0(_x_363.self, ")");
2479
2483
  return;
2480
2484
  }
2481
2485
  case 12: {
2482
- const _$42$arg_365 = _x_358._0;
2483
- _x_359.method_table.method_0(_x_359.self, "LiteralBlock(");
2484
- moonbitlang$core$builtin$$Logger$write_object$3$(_x_359, _$42$arg_365);
2485
- _x_359.method_table.method_0(_x_359.self, ")");
2486
+ const _$42$arg_369 = _x_362._0;
2487
+ _x_363.method_table.method_0(_x_363.self, "LiteralBlock(");
2488
+ moonbitlang$core$builtin$$Logger$write_object$3$(_x_363, _$42$arg_369);
2489
+ _x_363.method_table.method_0(_x_363.self, ")");
2486
2490
  return;
2487
2491
  }
2488
2492
  case 13: {
2489
- const _$42$arg_366 = _x_358._0;
2490
- _x_359.method_table.method_0(_x_359.self, "FoldedBlock(");
2491
- moonbitlang$core$builtin$$Logger$write_object$3$(_x_359, _$42$arg_366);
2492
- _x_359.method_table.method_0(_x_359.self, ")");
2493
+ const _$42$arg_370 = _x_362._0;
2494
+ _x_363.method_table.method_0(_x_363.self, "FoldedBlock(");
2495
+ moonbitlang$core$builtin$$Logger$write_object$3$(_x_363, _$42$arg_370);
2496
+ _x_363.method_table.method_0(_x_363.self, ")");
2493
2497
  return;
2494
2498
  }
2495
2499
  case 14:
2496
- _x_359.method_table.method_0(_x_359.self, "NullValue");
2500
+ _x_363.method_table.method_0(_x_363.self, "NullValue");
2497
2501
  return;
2498
2502
  case 15:
2499
- _x_359.method_table.method_0(_x_359.self, "TrueValue");
2503
+ _x_363.method_table.method_0(_x_363.self, "TrueValue");
2500
2504
  return;
2501
2505
  case 16:
2502
- _x_359.method_table.method_0(_x_359.self, "FalseValue");
2506
+ _x_363.method_table.method_0(_x_363.self, "FalseValue");
2503
2507
  return;
2504
2508
  case 17: {
2505
- const _$42$arg_367 = _x_358._0;
2506
- _x_359.method_table.method_0(_x_359.self, "Anchor(");
2507
- moonbitlang$core$builtin$$Logger$write_object$3$(_x_359, _$42$arg_367);
2508
- _x_359.method_table.method_0(_x_359.self, ")");
2509
+ const _$42$arg_371 = _x_362._0;
2510
+ _x_363.method_table.method_0(_x_363.self, "Anchor(");
2511
+ moonbitlang$core$builtin$$Logger$write_object$3$(_x_363, _$42$arg_371);
2512
+ _x_363.method_table.method_0(_x_363.self, ")");
2509
2513
  return;
2510
2514
  }
2511
2515
  case 18: {
2512
- const _$42$arg_368 = _x_358._0;
2513
- _x_359.method_table.method_0(_x_359.self, "Alias(");
2514
- moonbitlang$core$builtin$$Logger$write_object$3$(_x_359, _$42$arg_368);
2515
- _x_359.method_table.method_0(_x_359.self, ")");
2516
+ const _$42$arg_372 = _x_362._0;
2517
+ _x_363.method_table.method_0(_x_363.self, "Alias(");
2518
+ moonbitlang$core$builtin$$Logger$write_object$3$(_x_363, _$42$arg_372);
2519
+ _x_363.method_table.method_0(_x_363.self, ")");
2516
2520
  return;
2517
2521
  }
2518
2522
  case 19: {
2519
- const _$42$arg_369 = _x_358._0;
2520
- _x_359.method_table.method_0(_x_359.self, "Comment(");
2521
- moonbitlang$core$builtin$$Logger$write_object$3$(_x_359, _$42$arg_369);
2522
- _x_359.method_table.method_0(_x_359.self, ")");
2523
+ const _$42$arg_373 = _x_362._0;
2524
+ _x_363.method_table.method_0(_x_363.self, "Comment(");
2525
+ moonbitlang$core$builtin$$Logger$write_object$3$(_x_363, _$42$arg_373);
2526
+ _x_363.method_table.method_0(_x_363.self, ")");
2523
2527
  return;
2524
2528
  }
2525
2529
  case 20: {
2526
- const _$42$arg_370 = _x_358._0;
2527
- _x_359.method_table.method_0(_x_359.self, "Whitespace(");
2528
- moonbitlang$core$builtin$$Logger$write_object$3$(_x_359, _$42$arg_370);
2529
- _x_359.method_table.method_0(_x_359.self, ")");
2530
+ const _$42$arg_374 = _x_362._0;
2531
+ _x_363.method_table.method_0(_x_363.self, "Whitespace(");
2532
+ moonbitlang$core$builtin$$Logger$write_object$3$(_x_363, _$42$arg_374);
2533
+ _x_363.method_table.method_0(_x_363.self, ")");
2530
2534
  return;
2531
2535
  }
2532
2536
  case 21:
2533
- _x_359.method_table.method_0(_x_359.self, "Newline");
2537
+ _x_363.method_table.method_0(_x_363.self, "Newline");
2534
2538
  return;
2535
2539
  case 22:
2536
- _x_359.method_table.method_0(_x_359.self, "DocumentStart");
2540
+ _x_363.method_table.method_0(_x_363.self, "DocumentStart");
2537
2541
  return;
2538
2542
  case 23:
2539
- _x_359.method_table.method_0(_x_359.self, "DocumentEnd");
2543
+ _x_363.method_table.method_0(_x_363.self, "DocumentEnd");
2540
2544
  return;
2541
2545
  case 24:
2542
- _x_359.method_table.method_0(_x_359.self, "Eof");
2546
+ _x_363.method_table.method_0(_x_363.self, "Eof");
2543
2547
  return;
2544
2548
  default: {
2545
- const _$42$arg_371 = _x_358._0;
2546
- _x_359.method_table.method_0(_x_359.self, "Invalid(");
2547
- moonbitlang$core$builtin$$Logger$write_object$3$(_x_359, _$42$arg_371);
2548
- _x_359.method_table.method_0(_x_359.self, ")");
2549
+ const _$42$arg_375 = _x_362._0;
2550
+ _x_363.method_table.method_0(_x_363.self, "Invalid(");
2551
+ moonbitlang$core$builtin$$Logger$write_object$3$(_x_363, _$42$arg_375);
2552
+ _x_363.method_table.method_0(_x_363.self, ")");
2549
2553
  return;
2550
2554
  }
2551
2555
  }
@@ -2556,6 +2560,22 @@ function f4ah6o$yyjj$yaml$$Token$new(kind, span) {
2556
2560
  span
2557
2561
  };
2558
2562
  }
2563
+ function f4ah6o$yyjj$yaml$$trivia_to_doc(comments, is_leading) {
2564
+ if (comments.length === 0) return $64$f4ah6o$47$yyjj$47$pretty$46$Doc$Nil;
2565
+ const docs = [];
2566
+ let _tmp = 0;
2567
+ while (true) {
2568
+ const i = _tmp;
2569
+ if (i < comments.length) {
2570
+ const text = `#${moonbitlang$core$array$$Array$at$9$(comments, i).content}`;
2571
+ 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]));
2572
+ 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)]));
2573
+ _tmp = i + 1 | 0;
2574
+ continue;
2575
+ } else break;
2576
+ }
2577
+ return f4ah6o$yyjj$pretty$$concat(docs);
2578
+ }
2559
2579
  function f4ah6o$yyjj$yaml$$escape_double_quoted(s) {
2560
2580
  const buf = moonbitlang$core$builtin$$StringBuilder$new$46$inner(0);
2561
2581
  let _tmp = 0;
@@ -2627,20 +2647,6 @@ function f4ah6o$yyjj$yaml$$string_to_doc(s, style) {
2627
2647
  default: return f4ah6o$yyjj$yaml$$folded_block_to_doc(s);
2628
2648
  }
2629
2649
  }
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
2650
  function f4ah6o$yyjj$yaml$$YamlNode$trivia(self) {
2645
2651
  let _tmp = self;
2646
2652
  _L: while (true) {
@@ -2661,8 +2667,8 @@ function f4ah6o$yyjj$yaml$$YamlNode$trivia(self) {
2661
2667
  }
2662
2668
  function f4ah6o$yyjj$yaml$$node_to_doc(node, indent) {
2663
2669
  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);
2670
+ const leading = f4ah6o$yyjj$yaml$$trivia_to_doc(trivia.leading, true);
2671
+ const trailing = f4ah6o$yyjj$yaml$$trivia_to_doc(trivia.trailing, false);
2666
2672
  let content;
2667
2673
  switch (node.$tag) {
2668
2674
  case 0:
@@ -2718,8 +2724,10 @@ function f4ah6o$yyjj$yaml$$mapping_to_doc(pairs, indent) {
2718
2724
  const i = _tmp;
2719
2725
  if (i < pairs.length) {
2720
2726
  const pair = moonbitlang$core$array$$Array$at$11$(pairs, i);
2727
+ const key_leading = f4ah6o$yyjj$yaml$$trivia_to_doc(pair.key_trivia.leading, true);
2721
2728
  const key_doc = f4ah6o$yyjj$yaml$$node_to_doc(pair.key, indent);
2722
2729
  const value_doc = f4ah6o$yyjj$yaml$$node_to_doc(pair.value, indent + 2 | 0);
2730
+ const key_trailing = f4ah6o$yyjj$yaml$$trivia_to_doc(pair.key_trivia.trailing, false);
2723
2731
  const _bind = pair.value;
2724
2732
  let is_nested;
2725
2733
  switch (_bind.$tag) {
@@ -2732,14 +2740,19 @@ function f4ah6o$yyjj$yaml$$mapping_to_doc(pairs, indent) {
2732
2740
  default: is_nested = false;
2733
2741
  }
2734
2742
  if (is_nested) moonbitlang$core$array$$Array$push$12$(docs, f4ah6o$yyjj$pretty$$concat([
2743
+ key_leading,
2735
2744
  key_doc,
2736
2745
  new $64$f4ah6o$47$yyjj$47$pretty$46$Doc$Text(":"),
2746
+ key_trailing,
2737
2747
  $64$f4ah6o$47$yyjj$47$pretty$46$Doc$HardLine,
2738
2748
  new $64$f4ah6o$47$yyjj$47$pretty$46$Doc$Nest(2, value_doc)
2739
2749
  ]));
2740
2750
  else moonbitlang$core$array$$Array$push$12$(docs, f4ah6o$yyjj$pretty$$concat([
2751
+ key_leading,
2741
2752
  key_doc,
2742
- new $64$f4ah6o$47$yyjj$47$pretty$46$Doc$Text(": "),
2753
+ new $64$f4ah6o$47$yyjj$47$pretty$46$Doc$Text(":"),
2754
+ key_trailing,
2755
+ new $64$f4ah6o$47$yyjj$47$pretty$46$Doc$Text(" "),
2743
2756
  value_doc
2744
2757
  ]));
2745
2758
  _tmp = i + 1 | 0;
@@ -2894,12 +2907,12 @@ function f4ah6o$yyjj$yaml$$Lexer$skip_while(self, pred) {
2894
2907
  function f4ah6o$yyjj$yaml$$Lexer$lex_alias(self, start) {
2895
2908
  f4ah6o$yyjj$yaml$$Lexer$advance(self);
2896
2909
  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$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)));
2910
+ return name.length === 0 ? f4ah6o$yyjj$yaml$$Token$new(f4ah6o$yyjj$yaml$$lex_alias$46$constr$47$1061, 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
2911
  }
2899
2912
  function f4ah6o$yyjj$yaml$$Lexer$lex_anchor(self, start) {
2900
2913
  f4ah6o$yyjj$yaml$$Lexer$advance(self);
2901
2914
  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$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)));
2915
+ return name.length === 0 ? f4ah6o$yyjj$yaml$$Token$new(f4ah6o$yyjj$yaml$$lex_anchor$46$constr$47$1066, 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
2916
  }
2904
2917
  function f4ah6o$yyjj$yaml$$Lexer$peek(self) {
2905
2918
  if (self.pos >= self.source.length) return -1;
@@ -2915,7 +2928,7 @@ function f4ah6o$yyjj$yaml$$Lexer$lex_double_quoted(self, start) {
2915
2928
  const buf = moonbitlang$core$builtin$$StringBuilder$new$46$inner(0);
2916
2929
  _L: while (true) {
2917
2930
  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$1066, f4ah6o$yyjj$common$$Span$new(start, f4ah6o$yyjj$yaml$$Lexer$current_pos(self)));
2931
+ if (_bind === -1) return f4ah6o$yyjj$yaml$$Token$new(f4ah6o$yyjj$yaml$$lex_double_quoted$46$constr$47$1072, f4ah6o$yyjj$common$$Span$new(start, f4ah6o$yyjj$yaml$$Lexer$current_pos(self)));
2919
2932
  else {
2920
2933
  const _x = _bind;
2921
2934
  switch (_x) {
@@ -2925,7 +2938,7 @@ function f4ah6o$yyjj$yaml$$Lexer$lex_double_quoted(self, start) {
2925
2938
  case 92: {
2926
2939
  f4ah6o$yyjj$yaml$$Lexer$advance(self);
2927
2940
  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$1067, f4ah6o$yyjj$common$$Span$new(start, f4ah6o$yyjj$yaml$$Lexer$current_pos(self)));
2941
+ if (_bind$2 === -1) return f4ah6o$yyjj$yaml$$Token$new(f4ah6o$yyjj$yaml$$lex_double_quoted$46$constr$47$1073, f4ah6o$yyjj$common$$Span$new(start, f4ah6o$yyjj$yaml$$Lexer$current_pos(self)));
2929
2942
  else {
2930
2943
  const _esc = _bind$2;
2931
2944
  f4ah6o$yyjj$yaml$$Lexer$advance(self);
@@ -3002,7 +3015,7 @@ function f4ah6o$yyjj$yaml$$Lexer$lex_folded_block(self, start) {
3002
3015
  break _L;
3003
3016
  }
3004
3017
  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$1082)) f4ah6o$yyjj$yaml$$Lexer$advance(self);
3018
+ if (moonbitlang$core$builtin$$Eq$equal$25$(f4ah6o$yyjj$yaml$$Lexer$peek(self), f4ah6o$yyjj$yaml$$lex_folded_block$46$constr$47$1088)) f4ah6o$yyjj$yaml$$Lexer$advance(self);
3006
3019
  }
3007
3020
  const block_indent = f4ah6o$yyjj$yaml$$Lexer$current_indent(self) + 2 | 0;
3008
3021
  const buf = moonbitlang$core$builtin$$StringBuilder$new$46$inner(0);
@@ -3048,7 +3061,7 @@ function f4ah6o$yyjj$yaml$$Lexer$lex_folded_block(self, start) {
3048
3061
  break _L$2;
3049
3062
  }
3050
3063
  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$1083)) f4ah6o$yyjj$yaml$$Lexer$advance(self);
3064
+ if (moonbitlang$core$builtin$$Eq$equal$25$(f4ah6o$yyjj$yaml$$Lexer$peek(self), f4ah6o$yyjj$yaml$$lex_folded_block$46$constr$47$1089)) f4ah6o$yyjj$yaml$$Lexer$advance(self);
3052
3065
  }
3053
3066
  continue;
3054
3067
  } else break;
@@ -3078,7 +3091,7 @@ function f4ah6o$yyjj$yaml$$Lexer$lex_literal_block(self, start) {
3078
3091
  break _L;
3079
3092
  }
3080
3093
  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$1112)) f4ah6o$yyjj$yaml$$Lexer$advance(self);
3094
+ if (moonbitlang$core$builtin$$Eq$equal$25$(f4ah6o$yyjj$yaml$$Lexer$peek(self), f4ah6o$yyjj$yaml$$lex_literal_block$46$constr$47$1118)) f4ah6o$yyjj$yaml$$Lexer$advance(self);
3082
3095
  }
3083
3096
  const block_indent = f4ah6o$yyjj$yaml$$Lexer$current_indent(self) + 2 | 0;
3084
3097
  const buf = moonbitlang$core$builtin$$StringBuilder$new$46$inner(0);
@@ -3122,7 +3135,7 @@ function f4ah6o$yyjj$yaml$$Lexer$lex_literal_block(self, start) {
3122
3135
  break _L$2;
3123
3136
  }
3124
3137
  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$1113)) f4ah6o$yyjj$yaml$$Lexer$advance(self);
3138
+ if (moonbitlang$core$builtin$$Eq$equal$25$(f4ah6o$yyjj$yaml$$Lexer$peek(self), f4ah6o$yyjj$yaml$$lex_literal_block$46$constr$47$1119)) f4ah6o$yyjj$yaml$$Lexer$advance(self);
3126
3139
  }
3127
3140
  continue;
3128
3141
  } else break;
@@ -3184,12 +3197,12 @@ function f4ah6o$yyjj$yaml$$Lexer$lex_single_quoted(self, start) {
3184
3197
  const buf = moonbitlang$core$builtin$$StringBuilder$new$46$inner(0);
3185
3198
  while (true) {
3186
3199
  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$1150, f4ah6o$yyjj$common$$Span$new(start, f4ah6o$yyjj$yaml$$Lexer$current_pos(self)));
3200
+ if (_bind === -1) return f4ah6o$yyjj$yaml$$Token$new(f4ah6o$yyjj$yaml$$lex_single_quoted$46$constr$47$1156, f4ah6o$yyjj$common$$Span$new(start, f4ah6o$yyjj$yaml$$Lexer$current_pos(self)));
3188
3201
  else {
3189
3202
  const _x = _bind;
3190
3203
  if (_x === 39) {
3191
3204
  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$1151)) {
3205
+ if (moonbitlang$core$builtin$$Eq$equal$25$(f4ah6o$yyjj$yaml$$Lexer$peek(self), f4ah6o$yyjj$yaml$$lex_single_quoted$46$constr$47$1157)) {
3193
3206
  f4ah6o$yyjj$yaml$$Lexer$advance(self);
3194
3207
  moonbitlang$core$builtin$$Logger$write_char$0$(buf, 39);
3195
3208
  } else break;
@@ -3230,7 +3243,7 @@ function f4ah6o$yyjj$yaml$$Lexer$next_token(self) {
3230
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)));
3231
3244
  case 13:
3232
3245
  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$1162)) f4ah6o$yyjj$yaml$$Lexer$advance(self);
3246
+ if (moonbitlang$core$builtin$$Eq$equal$25$(f4ah6o$yyjj$yaml$$Lexer$peek(self), f4ah6o$yyjj$yaml$$next_token$46$constr$47$1168)) f4ah6o$yyjj$yaml$$Lexer$advance(self);
3234
3247
  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
3248
  case 32: break _L;
3236
3249
  case 9: break _L;
@@ -3241,10 +3254,10 @@ function f4ah6o$yyjj$yaml$$Lexer$next_token(self) {
3241
3254
  f4ah6o$yyjj$yaml$$Lexer$advance(self);
3242
3255
  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
3256
  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$1163)) break _L$2;
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$1164)) break _L$2;
3257
+ _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$1169)) break _L$2;
3258
+ else if (moonbitlang$core$builtin$$Eq$equal$25$(f4ah6o$yyjj$yaml$$Lexer$peek_at(self, 1), f4ah6o$yyjj$yaml$$next_token$46$constr$47$1170)) break _L$2;
3246
3259
  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$1165) && moonbitlang$core$builtin$$Eq$equal$25$(f4ah6o$yyjj$yaml$$Lexer$peek_at(self, 2), f4ah6o$yyjj$yaml$$next_token$46$constr$47$1166)) {
3260
+ else 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)) {
3248
3261
  f4ah6o$yyjj$yaml$$Lexer$advance(self);
3249
3262
  f4ah6o$yyjj$yaml$$Lexer$advance(self);
3250
3263
  f4ah6o$yyjj$yaml$$Lexer$advance(self);
@@ -3252,7 +3265,7 @@ function f4ah6o$yyjj$yaml$$Lexer$next_token(self) {
3252
3265
  } else return f4ah6o$yyjj$yaml$$Lexer$lex_plain_scalar(self, start);
3253
3266
  f4ah6o$yyjj$yaml$$Lexer$advance(self);
3254
3267
  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$1167) && moonbitlang$core$builtin$$Eq$equal$25$(f4ah6o$yyjj$yaml$$Lexer$peek_at(self, 2), f4ah6o$yyjj$yaml$$next_token$46$constr$47$1168)) {
3268
+ 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$1173) && moonbitlang$core$builtin$$Eq$equal$25$(f4ah6o$yyjj$yaml$$Lexer$peek_at(self, 2), f4ah6o$yyjj$yaml$$next_token$46$constr$47$1174)) {
3256
3269
  f4ah6o$yyjj$yaml$$Lexer$advance(self);
3257
3270
  f4ah6o$yyjj$yaml$$Lexer$advance(self);
3258
3271
  f4ah6o$yyjj$yaml$$Lexer$advance(self);