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