altsia 0.1.2 → 0.1.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/altsia.d.ts +23 -0
- package/altsia.js +1167 -471
- package/package.json +1 -1
package/altsia.js
CHANGED
|
@@ -29,32 +29,39 @@ function Error$altsia$47$altsia$46$Stage3Error$46$AttributeExpectsAtMostOneValue
|
|
|
29
29
|
this._0 = param0;
|
|
30
30
|
this._1 = param1;
|
|
31
31
|
}
|
|
32
|
-
Error$altsia$47$altsia$46$Stage3Error$46$AttributeExpectsAtMostOneValue.prototype.$tag =
|
|
32
|
+
Error$altsia$47$altsia$46$Stage3Error$46$AttributeExpectsAtMostOneValue.prototype.$tag = 21;
|
|
33
33
|
function Error$altsia$47$altsia$46$Stage3Error$46$UnexpectedTemplateDefinition(param0, param1) {
|
|
34
34
|
this._0 = param0;
|
|
35
35
|
this._1 = param1;
|
|
36
36
|
}
|
|
37
|
-
Error$altsia$47$altsia$46$Stage3Error$46$UnexpectedTemplateDefinition.prototype.$tag =
|
|
37
|
+
Error$altsia$47$altsia$46$Stage3Error$46$UnexpectedTemplateDefinition.prototype.$tag = 20;
|
|
38
38
|
function Error$altsia$47$altsia$46$Stage2Error$46$FunctionNameMustBePlainText(param0, param1) {
|
|
39
39
|
this._0 = param0;
|
|
40
40
|
this._1 = param1;
|
|
41
41
|
}
|
|
42
|
-
Error$altsia$47$altsia$46$Stage2Error$46$FunctionNameMustBePlainText.prototype.$tag =
|
|
42
|
+
Error$altsia$47$altsia$46$Stage2Error$46$FunctionNameMustBePlainText.prototype.$tag = 19;
|
|
43
43
|
function Error$altsia$47$altsia$46$Stage2Error$46$TemplateRequiresNameAndParamList(param0, param1) {
|
|
44
44
|
this._0 = param0;
|
|
45
45
|
this._1 = param1;
|
|
46
46
|
}
|
|
47
|
-
Error$altsia$47$altsia$46$Stage2Error$46$TemplateRequiresNameAndParamList.prototype.$tag =
|
|
47
|
+
Error$altsia$47$altsia$46$Stage2Error$46$TemplateRequiresNameAndParamList.prototype.$tag = 18;
|
|
48
48
|
function Error$altsia$47$altsia$46$Stage2Error$46$TemplateParamsMustBeList(param0, param1) {
|
|
49
49
|
this._0 = param0;
|
|
50
50
|
this._1 = param1;
|
|
51
51
|
}
|
|
52
|
-
Error$altsia$47$altsia$46$Stage2Error$46$TemplateParamsMustBeList.prototype.$tag =
|
|
52
|
+
Error$altsia$47$altsia$46$Stage2Error$46$TemplateParamsMustBeList.prototype.$tag = 17;
|
|
53
53
|
function Error$altsia$47$altsia$46$Stage2Error$46$InternalInvariantViolation(param0, param1) {
|
|
54
54
|
this._0 = param0;
|
|
55
55
|
this._1 = param1;
|
|
56
56
|
}
|
|
57
|
-
Error$altsia$47$altsia$46$Stage2Error$46$InternalInvariantViolation.prototype.$tag =
|
|
57
|
+
Error$altsia$47$altsia$46$Stage2Error$46$InternalInvariantViolation.prototype.$tag = 16;
|
|
58
|
+
function Error$altsia$47$altsia$46$Stage1NormalizeError$46$InvalidRange(param0, param1, param2, param3) {
|
|
59
|
+
this._0 = param0;
|
|
60
|
+
this._1 = param1;
|
|
61
|
+
this._2 = param2;
|
|
62
|
+
this._3 = param3;
|
|
63
|
+
}
|
|
64
|
+
Error$altsia$47$altsia$46$Stage1NormalizeError$46$InvalidRange.prototype.$tag = 15;
|
|
58
65
|
function Error$altsia$47$altsia$46$Stage1Error$46$InvalidQuoteBlockStart(param0) {
|
|
59
66
|
this._0 = param0;
|
|
60
67
|
}
|
|
@@ -365,21 +372,6 @@ function Result$Ok$19$(param0) {
|
|
|
365
372
|
this._0 = param0;
|
|
366
373
|
}
|
|
367
374
|
Result$Ok$19$.prototype.$tag = 1;
|
|
368
|
-
function SpannedS$Text(param0, param1) {
|
|
369
|
-
this._0 = param0;
|
|
370
|
-
this._1 = param1;
|
|
371
|
-
}
|
|
372
|
-
SpannedS$Text.prototype.$tag = 0;
|
|
373
|
-
function SpannedS$Quote(param0, param1) {
|
|
374
|
-
this._0 = param0;
|
|
375
|
-
this._1 = param1;
|
|
376
|
-
}
|
|
377
|
-
SpannedS$Quote.prototype.$tag = 1;
|
|
378
|
-
function SpannedS$App(param0, param1) {
|
|
379
|
-
this._0 = param0;
|
|
380
|
-
this._1 = param1;
|
|
381
|
-
}
|
|
382
|
-
SpannedS$App.prototype.$tag = 2;
|
|
383
375
|
function Result$Err$20$(param0) {
|
|
384
376
|
this._0 = param0;
|
|
385
377
|
}
|
|
@@ -396,6 +388,21 @@ function Result$Ok$21$(param0) {
|
|
|
396
388
|
this._0 = param0;
|
|
397
389
|
}
|
|
398
390
|
Result$Ok$21$.prototype.$tag = 1;
|
|
391
|
+
function SpannedS$Text(param0, param1) {
|
|
392
|
+
this._0 = param0;
|
|
393
|
+
this._1 = param1;
|
|
394
|
+
}
|
|
395
|
+
SpannedS$Text.prototype.$tag = 0;
|
|
396
|
+
function SpannedS$Quote(param0, param1) {
|
|
397
|
+
this._0 = param0;
|
|
398
|
+
this._1 = param1;
|
|
399
|
+
}
|
|
400
|
+
SpannedS$Quote.prototype.$tag = 1;
|
|
401
|
+
function SpannedS$App(param0, param1) {
|
|
402
|
+
this._0 = param0;
|
|
403
|
+
this._1 = param1;
|
|
404
|
+
}
|
|
405
|
+
SpannedS$App.prototype.$tag = 2;
|
|
399
406
|
function Result$Err$22$(param0) {
|
|
400
407
|
this._0 = param0;
|
|
401
408
|
}
|
|
@@ -452,6 +459,22 @@ function Result$Ok$28$(param0) {
|
|
|
452
459
|
this._0 = param0;
|
|
453
460
|
}
|
|
454
461
|
Result$Ok$28$.prototype.$tag = 1;
|
|
462
|
+
function Result$Err$29$(param0) {
|
|
463
|
+
this._0 = param0;
|
|
464
|
+
}
|
|
465
|
+
Result$Err$29$.prototype.$tag = 0;
|
|
466
|
+
function Result$Ok$29$(param0) {
|
|
467
|
+
this._0 = param0;
|
|
468
|
+
}
|
|
469
|
+
Result$Ok$29$.prototype.$tag = 1;
|
|
470
|
+
function Result$Err$30$(param0) {
|
|
471
|
+
this._0 = param0;
|
|
472
|
+
}
|
|
473
|
+
Result$Err$30$.prototype.$tag = 0;
|
|
474
|
+
function Result$Ok$30$(param0) {
|
|
475
|
+
this._0 = param0;
|
|
476
|
+
}
|
|
477
|
+
Result$Ok$30$.prototype.$tag = 1;
|
|
455
478
|
function Html$Text(param0) {
|
|
456
479
|
this._0 = param0;
|
|
457
480
|
}
|
|
@@ -476,16 +499,16 @@ function _M0FP15Error10to__string(_e) {
|
|
|
476
499
|
case 3: {
|
|
477
500
|
return _M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia16Stage2EtaleErrorE(_e);
|
|
478
501
|
}
|
|
479
|
-
case
|
|
502
|
+
case 20: {
|
|
480
503
|
return _M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia11Stage3ErrorE(_e);
|
|
481
504
|
}
|
|
482
505
|
case 1: {
|
|
483
506
|
return _M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP311moonbitlang4core7builtin17CreatingViewErrorE(_e);
|
|
484
507
|
}
|
|
485
|
-
case
|
|
508
|
+
case 16: {
|
|
486
509
|
return _M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia11Stage2ErrorE(_e);
|
|
487
510
|
}
|
|
488
|
-
case
|
|
511
|
+
case 21: {
|
|
489
512
|
return _M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia11Stage3ErrorE(_e);
|
|
490
513
|
}
|
|
491
514
|
case 13: {
|
|
@@ -497,12 +520,15 @@ function _M0FP15Error10to__string(_e) {
|
|
|
497
520
|
case 8: {
|
|
498
521
|
return _M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia11Stage1ErrorE(_e);
|
|
499
522
|
}
|
|
500
|
-
case
|
|
523
|
+
case 19: {
|
|
501
524
|
return _M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia11Stage2ErrorE(_e);
|
|
502
525
|
}
|
|
503
526
|
case 14: {
|
|
504
527
|
return _M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia11Stage1ErrorE(_e);
|
|
505
528
|
}
|
|
529
|
+
case 15: {
|
|
530
|
+
return _M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia20Stage1NormalizeErrorE(_e);
|
|
531
|
+
}
|
|
506
532
|
case 2: {
|
|
507
533
|
return _M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP311moonbitlang4core7builtin7FailureE(_e);
|
|
508
534
|
}
|
|
@@ -512,13 +538,13 @@ function _M0FP15Error10to__string(_e) {
|
|
|
512
538
|
case 4: {
|
|
513
539
|
return _M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia16Stage2EtaleErrorE(_e);
|
|
514
540
|
}
|
|
515
|
-
case
|
|
541
|
+
case 17: {
|
|
516
542
|
return _M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia11Stage2ErrorE(_e);
|
|
517
543
|
}
|
|
518
544
|
case 7: {
|
|
519
545
|
return _M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia11Stage1ErrorE(_e);
|
|
520
546
|
}
|
|
521
|
-
case
|
|
547
|
+
case 18: {
|
|
522
548
|
return _M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia11Stage2ErrorE(_e);
|
|
523
549
|
}
|
|
524
550
|
case 11: {
|
|
@@ -532,38 +558,42 @@ function _M0FP15Error10to__string(_e) {
|
|
|
532
558
|
}
|
|
533
559
|
}
|
|
534
560
|
}
|
|
535
|
-
const
|
|
536
|
-
const
|
|
537
|
-
const
|
|
538
|
-
const
|
|
539
|
-
const
|
|
540
|
-
const
|
|
541
|
-
const
|
|
542
|
-
const
|
|
543
|
-
const
|
|
544
|
-
const
|
|
545
|
-
const
|
|
546
|
-
const
|
|
547
|
-
const
|
|
548
|
-
const
|
|
549
|
-
const
|
|
550
|
-
const
|
|
551
|
-
const
|
|
552
|
-
const
|
|
553
|
-
const
|
|
554
|
-
const
|
|
555
|
-
const
|
|
556
|
-
const
|
|
557
|
-
const
|
|
558
|
-
const
|
|
561
|
+
const _M0FP26altsia6altsia40extract__attrs__spanned_2e_2abind_7c2147 = ":";
|
|
562
|
+
const _M0FP26altsia6altsia29escape__text_2e_2abind_7c2365 = "(";
|
|
563
|
+
const _M0FP26altsia6altsia29escape__text_2e_2abind_7c2366 = "\\(";
|
|
564
|
+
const _M0FP26altsia6altsia29escape__text_2e_2abind_7c2367 = ")";
|
|
565
|
+
const _M0FP26altsia6altsia29escape__text_2e_2abind_7c2368 = "\\)";
|
|
566
|
+
const _M0FP26altsia6altsia30render__block_2e_2abind_7c2369 = "\n";
|
|
567
|
+
const _M0FP26altsia6altsia28render__app_2e_2abind_7c2387 = " ";
|
|
568
|
+
const _M0FP26altsia6altsia28render__app_2e_2abind_7c2386 = "\n";
|
|
569
|
+
const _M0FP26altsia6altsia44elaborate__comment__spanned_2e_2abind_7c2461 = " ";
|
|
570
|
+
const _M0FP26altsia6altsia17default__language = "en";
|
|
571
|
+
const _M0FP26altsia6altsia30indent__block_2e_2abind_7c2576 = "\n";
|
|
572
|
+
const _M0FP26altsia6altsia36render__inline__app_2e_2abind_7c2585 = " ";
|
|
573
|
+
const _M0FP26altsia6altsia36render__inline__app_2e_2abind_7c2584 = " ";
|
|
574
|
+
const _M0FP26altsia6altsia36render__inline__app_2e_2abind_7c2583 = "\n";
|
|
575
|
+
const _M0FP26altsia6altsia51normalize__app__with__skip_2einner_2e_2abind_7c2645 = "\n";
|
|
576
|
+
const _M0FP26altsia6altsia49normalize__template__app_2einner_2e_2abind_7c2656 = " ";
|
|
577
|
+
const _M0FP26altsia6altsia49normalize__template__app_2einner_2e_2abind_7c2655 = "\n";
|
|
578
|
+
const _M0FP26altsia6altsia53normalize__nodes__with__skip_2einner_2e_2abind_7c2679 = "\n\n";
|
|
579
|
+
const _M0FP26altsia6altsia38push__plain__argument_2e_2abind_7c2694 = "\\(";
|
|
580
|
+
const _M0FP26altsia6altsia38push__plain__argument_2e_2abind_7c2695 = "(";
|
|
581
|
+
const _M0FP26altsia6altsia38push__plain__argument_2e_2abind_7c2696 = "\\)";
|
|
582
|
+
const _M0FP26altsia6altsia38push__plain__argument_2e_2abind_7c2697 = ")";
|
|
583
|
+
const _M0FP26altsia6altsia27parse__app_2e_2abind_7c2709 = "\\(";
|
|
584
|
+
const _M0FP26altsia6altsia27parse__app_2e_2abind_7c2710 = "(";
|
|
585
|
+
const _M0FP26altsia6altsia27parse__app_2e_2abind_7c2711 = "\\)";
|
|
586
|
+
const _M0FP26altsia6altsia27parse__app_2e_2abind_7c2712 = ")";
|
|
587
|
+
const _M0FP26altsia6altsia42normalize__quote__content_2e_2abind_7c2727 = "\n";
|
|
559
588
|
const _M0FP26altsia6altsia20supported__languages = ["en", "en-US", "zh-CN", "zh-TW", "ja", "ko", "fr", "de", "es", "es-419", "it", "pt-PT", "pt-BR", "ru", "uk", "pl", "cs", "hu", "ro", "tr", "nl", "sv", "da", "nb", "fi", "el", "ar", "he", "hi", "th", "vi", "id", "ms"];
|
|
560
|
-
const
|
|
561
|
-
const
|
|
562
|
-
const
|
|
563
|
-
const
|
|
564
|
-
const
|
|
565
|
-
const
|
|
566
|
-
const
|
|
589
|
+
const _M0FP26altsia6altsia42altsia__normalize_2einner_2e_2abind_7c2949 = "\n";
|
|
590
|
+
const _M0FP26altsia6altsia49altsia__normalize__range_2einner_2e_2abind_7c3002 = "\n";
|
|
591
|
+
const _M0FP26altsia6altsia27to__string_2e_2abind_7c3044 = " ";
|
|
592
|
+
const _M0FP26altsia6altsia27to__string_2e_2abind_7c3043 = "";
|
|
593
|
+
const _M0FP26altsia6altsia41altsia__to__html_2einner_2e_2abind_7c3146 = "\n";
|
|
594
|
+
const _M0FP26altsia6altsia56altsia__to__html__with__visitor_2einner_2e_2abind_7c3160 = "\n";
|
|
595
|
+
const _M0FP311moonbitlang4core7builtin33brute__force__find_2econstr_2f455 = 0;
|
|
596
|
+
const _M0FP311moonbitlang4core7builtin43boyer__moore__horspool__find_2econstr_2f441 = 0;
|
|
567
597
|
const _M0FP311moonbitlang4core7builtin4seed = _M0FP311moonbitlang4core7builtin12random__seed();
|
|
568
598
|
function _M0FP311moonbitlang4core5abort5abortGuE(msg) {
|
|
569
599
|
$panic();
|
|
@@ -845,6 +875,15 @@ function _M0MP311moonbitlang4core5array5Array2atGRP311moonbitlang4core7builtin5A
|
|
|
845
875
|
return $panic();
|
|
846
876
|
}
|
|
847
877
|
}
|
|
878
|
+
function _M0MP311moonbitlang4core5array5Array2atGbE(self, index) {
|
|
879
|
+
const len = self.length;
|
|
880
|
+
if (index >= 0 && index < len) {
|
|
881
|
+
$bound_check(self, index);
|
|
882
|
+
return self[index];
|
|
883
|
+
} else {
|
|
884
|
+
return $panic();
|
|
885
|
+
}
|
|
886
|
+
}
|
|
848
887
|
function _M0MP311moonbitlang4core7builtin13SourceLocRepr5parse(repr) {
|
|
849
888
|
const _bind = { str: repr, start: 0, end: repr.length };
|
|
850
889
|
const _data = _bind.str;
|
|
@@ -1448,6 +1487,11 @@ function _M0IP016_24default__implP311moonbitlang4core7builtin6Logger16write__sub
|
|
|
1448
1487
|
}
|
|
1449
1488
|
_M0IP311moonbitlang4core7builtin13StringBuilderP311moonbitlang4core7builtin6Logger11write__view(self, _tmp);
|
|
1450
1489
|
}
|
|
1490
|
+
function _M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGiE(self) {
|
|
1491
|
+
const logger = _M0MP311moonbitlang4core7builtin13StringBuilder11new_2einner(0);
|
|
1492
|
+
_M0IP311moonbitlang4core3int3IntP311moonbitlang4core7builtin4Show6output(self, { self: logger, method_table: _M0FP095_40moonbitlang_2fcore_2fbuiltin_2eStringBuilder_24as_24_40moonbitlang_2fcore_2fbuiltin_2eLogger });
|
|
1493
|
+
return logger.val;
|
|
1494
|
+
}
|
|
1451
1495
|
function _M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia1SE(self) {
|
|
1452
1496
|
const logger = _M0MP311moonbitlang4core7builtin13StringBuilder11new_2einner(0);
|
|
1453
1497
|
_M0IP26altsia6altsia1SP311moonbitlang4core7builtin4Show6output(self, { self: logger, method_table: _M0FP095_40moonbitlang_2fcore_2fbuiltin_2eStringBuilder_24as_24_40moonbitlang_2fcore_2fbuiltin_2eLogger });
|
|
@@ -1458,11 +1502,6 @@ function _M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGR
|
|
|
1458
1502
|
_M0IP311moonbitlang4core5array5ArrayP311moonbitlang4core7builtin4Show6outputGRP26altsia6altsia1SE(self, { self: logger, method_table: _M0FP095_40moonbitlang_2fcore_2fbuiltin_2eStringBuilder_24as_24_40moonbitlang_2fcore_2fbuiltin_2eLogger });
|
|
1459
1503
|
return logger.val;
|
|
1460
1504
|
}
|
|
1461
|
-
function _M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGiE(self) {
|
|
1462
|
-
const logger = _M0MP311moonbitlang4core7builtin13StringBuilder11new_2einner(0);
|
|
1463
|
-
_M0IP311moonbitlang4core3int3IntP311moonbitlang4core7builtin4Show6output(self, { self: logger, method_table: _M0FP095_40moonbitlang_2fcore_2fbuiltin_2eStringBuilder_24as_24_40moonbitlang_2fcore_2fbuiltin_2eLogger });
|
|
1464
|
-
return logger.val;
|
|
1465
|
-
}
|
|
1466
1505
|
function _M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia4TermEE(self) {
|
|
1467
1506
|
const logger = _M0MP311moonbitlang4core7builtin13StringBuilder11new_2einner(0);
|
|
1468
1507
|
_M0IP311moonbitlang4core5array5ArrayP311moonbitlang4core7builtin4Show6outputGRP26altsia6altsia4TermE(self, { self: logger, method_table: _M0FP095_40moonbitlang_2fcore_2fbuiltin_2eStringBuilder_24as_24_40moonbitlang_2fcore_2fbuiltin_2eLogger });
|
|
@@ -1503,6 +1542,11 @@ function _M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGR
|
|
|
1503
1542
|
_M0IP311moonbitlang4core7builtin17CreatingViewErrorP311moonbitlang4core7builtin4Show6output(self, { self: logger, method_table: _M0FP095_40moonbitlang_2fcore_2fbuiltin_2eStringBuilder_24as_24_40moonbitlang_2fcore_2fbuiltin_2eLogger });
|
|
1504
1543
|
return logger.val;
|
|
1505
1544
|
}
|
|
1545
|
+
function _M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia20Stage1NormalizeErrorE(self) {
|
|
1546
|
+
const logger = _M0MP311moonbitlang4core7builtin13StringBuilder11new_2einner(0);
|
|
1547
|
+
_M0IP26altsia6altsia20Stage1NormalizeErrorP311moonbitlang4core7builtin4Show6output(self, { self: logger, method_table: _M0FP095_40moonbitlang_2fcore_2fbuiltin_2eStringBuilder_24as_24_40moonbitlang_2fcore_2fbuiltin_2eLogger });
|
|
1548
|
+
return logger.val;
|
|
1549
|
+
}
|
|
1506
1550
|
function _M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia11Stage2ErrorE(self) {
|
|
1507
1551
|
const logger = _M0MP311moonbitlang4core7builtin13StringBuilder11new_2einner(0);
|
|
1508
1552
|
_M0IP26altsia6altsia11Stage2ErrorP311moonbitlang4core7builtin4Show6output(self, { self: logger, method_table: _M0FP095_40moonbitlang_2fcore_2fbuiltin_2eStringBuilder_24as_24_40moonbitlang_2fcore_2fbuiltin_2eLogger });
|
|
@@ -1517,6 +1561,10 @@ function _M0MP311moonbitlang4core7builtin4Iter4nextGcE(self) {
|
|
|
1517
1561
|
const _func = self;
|
|
1518
1562
|
return _func();
|
|
1519
1563
|
}
|
|
1564
|
+
function _M0MP311moonbitlang4core7builtin4Iter4nextGRP26altsia6altsia8SpannedSE(self) {
|
|
1565
|
+
const _func = self;
|
|
1566
|
+
return _func();
|
|
1567
|
+
}
|
|
1520
1568
|
function _M0MP311moonbitlang4core7builtin4Iter4nextGRP26altsia6altsia1SE(self) {
|
|
1521
1569
|
const _func = self;
|
|
1522
1570
|
return _func();
|
|
@@ -1932,7 +1980,7 @@ function _M0FP311moonbitlang4core7builtin28boyer__moore__horspool__find(haystack
|
|
|
1932
1980
|
return undefined;
|
|
1933
1981
|
}
|
|
1934
1982
|
} else {
|
|
1935
|
-
return
|
|
1983
|
+
return _M0FP311moonbitlang4core7builtin43boyer__moore__horspool__find_2econstr_2f441;
|
|
1936
1984
|
}
|
|
1937
1985
|
}
|
|
1938
1986
|
function _M0FP311moonbitlang4core7builtin18brute__force__find(haystack, needle) {
|
|
@@ -1991,7 +2039,7 @@ function _M0FP311moonbitlang4core7builtin18brute__force__find(haystack, needle)
|
|
|
1991
2039
|
return undefined;
|
|
1992
2040
|
}
|
|
1993
2041
|
} else {
|
|
1994
|
-
return
|
|
2042
|
+
return _M0FP311moonbitlang4core7builtin33brute__force__find_2econstr_2f455;
|
|
1995
2043
|
}
|
|
1996
2044
|
}
|
|
1997
2045
|
function _M0MP311moonbitlang4core6string10StringView4find(self, str) {
|
|
@@ -2136,10 +2184,10 @@ function _M0MP311moonbitlang4core6string10StringView13strip__prefix(self, prefix
|
|
|
2136
2184
|
function _M0MP311moonbitlang4core6string6String13strip__prefix(self, prefix) {
|
|
2137
2185
|
return _M0MP311moonbitlang4core6string10StringView13strip__prefix({ str: self, start: 0, end: self.length }, prefix);
|
|
2138
2186
|
}
|
|
2139
|
-
function
|
|
2187
|
+
function _M0MP311moonbitlang4core5array5Array4pushGRP26altsia6altsia8SpannedSE(self, value) {
|
|
2140
2188
|
_M0MP311moonbitlang4core7builtin7JSArray4push(self, value);
|
|
2141
2189
|
}
|
|
2142
|
-
function
|
|
2190
|
+
function _M0MP311moonbitlang4core5array5Array4pushGRP26altsia6altsia11LocatedTermE(self, value) {
|
|
2143
2191
|
_M0MP311moonbitlang4core7builtin7JSArray4push(self, value);
|
|
2144
2192
|
}
|
|
2145
2193
|
function _M0MP311moonbitlang4core5array5Array4pushGRP26altsia6altsia4HtmlE(self, value) {
|
|
@@ -2148,6 +2196,9 @@ function _M0MP311moonbitlang4core5array5Array4pushGRP26altsia6altsia4HtmlE(self,
|
|
|
2148
2196
|
function _M0MP311moonbitlang4core5array5Array4pushGsE(self, value) {
|
|
2149
2197
|
_M0MP311moonbitlang4core7builtin7JSArray4push(self, value);
|
|
2150
2198
|
}
|
|
2199
|
+
function _M0MP311moonbitlang4core5array5Array4pushGbE(self, value) {
|
|
2200
|
+
_M0MP311moonbitlang4core7builtin7JSArray4push(self, value);
|
|
2201
|
+
}
|
|
2151
2202
|
function _M0MP311moonbitlang4core5array5Array4pushGUssEE(self, value) {
|
|
2152
2203
|
_M0MP311moonbitlang4core7builtin7JSArray4push(self, value);
|
|
2153
2204
|
}
|
|
@@ -2365,6 +2416,19 @@ function _M0IP311moonbitlang4core6option6OptionP311moonbitlang4core7builtin4Show
|
|
|
2365
2416
|
return;
|
|
2366
2417
|
}
|
|
2367
2418
|
}
|
|
2419
|
+
function _M0MP311moonbitlang4core5array9ArrayView4iterGRP26altsia6altsia8SpannedSE(self) {
|
|
2420
|
+
const i = { val: 0 };
|
|
2421
|
+
const _p = () => {
|
|
2422
|
+
if (i.val < (self.end - self.start | 0)) {
|
|
2423
|
+
const elem = self.buf[self.start + i.val | 0];
|
|
2424
|
+
i.val = i.val + 1 | 0;
|
|
2425
|
+
return elem;
|
|
2426
|
+
} else {
|
|
2427
|
+
return undefined;
|
|
2428
|
+
}
|
|
2429
|
+
};
|
|
2430
|
+
return _p;
|
|
2431
|
+
}
|
|
2368
2432
|
function _M0MP311moonbitlang4core5array9ArrayView4iterGRP26altsia6altsia1SE(self) {
|
|
2369
2433
|
const i = { val: 0 };
|
|
2370
2434
|
const _p = () => {
|
|
@@ -2417,6 +2481,9 @@ function _M0MP311moonbitlang4core5array9ArrayView4iterGsE(self) {
|
|
|
2417
2481
|
};
|
|
2418
2482
|
return _p;
|
|
2419
2483
|
}
|
|
2484
|
+
function _M0MP311moonbitlang4core5array5Array4iterGRP26altsia6altsia8SpannedSE(self) {
|
|
2485
|
+
return _M0MP311moonbitlang4core5array9ArrayView4iterGRP26altsia6altsia8SpannedSE({ buf: self, start: 0, end: self.length });
|
|
2486
|
+
}
|
|
2420
2487
|
function _M0MP311moonbitlang4core5array5Array4iterGRP26altsia6altsia1SE(self) {
|
|
2421
2488
|
return _M0MP311moonbitlang4core5array9ArrayView4iterGRP26altsia6altsia1SE({ buf: self, start: 0, end: self.length });
|
|
2422
2489
|
}
|
|
@@ -2989,6 +3056,23 @@ function _M0MP311moonbitlang4core5array5Array8containsGsE(self, value) {
|
|
|
2989
3056
|
}
|
|
2990
3057
|
}
|
|
2991
3058
|
}
|
|
3059
|
+
function _M0MP311moonbitlang4core5array5Array8containsGbE(self, value) {
|
|
3060
|
+
const _len = self.length;
|
|
3061
|
+
let _tmp = 0;
|
|
3062
|
+
while (true) {
|
|
3063
|
+
const _i = _tmp;
|
|
3064
|
+
if (_i < _len) {
|
|
3065
|
+
const v = self[_i];
|
|
3066
|
+
if (v === value) {
|
|
3067
|
+
return true;
|
|
3068
|
+
}
|
|
3069
|
+
_tmp = _i + 1 | 0;
|
|
3070
|
+
continue;
|
|
3071
|
+
} else {
|
|
3072
|
+
return false;
|
|
3073
|
+
}
|
|
3074
|
+
}
|
|
3075
|
+
}
|
|
2992
3076
|
function _M0MP311moonbitlang4core5array5Array7flattenGRP26altsia6altsia11LocatedTermE(self) {
|
|
2993
3077
|
let len = 0;
|
|
2994
3078
|
const _len = self.length;
|
|
@@ -3632,329 +3716,372 @@ function _M0MP311moonbitlang4core4list4List11from__arrayGRP26altsia6altsia1SE(ar
|
|
|
3632
3716
|
}
|
|
3633
3717
|
}
|
|
3634
3718
|
}
|
|
3635
|
-
function
|
|
3636
|
-
|
|
3719
|
+
function _M0FP36altsia6altsia14display__width21is__wide__east__asian(ch) {
|
|
3720
|
+
const cp = ch;
|
|
3721
|
+
return cp >= 4352 && cp <= 4447 || (cp === 9001 || (cp === 9002 || (cp >= 11904 && cp <= 42191 || (cp >= 44032 && cp <= 55203 || (cp >= 63744 && cp <= 64255 || (cp >= 65040 && cp <= 65049 || (cp >= 65072 && cp <= 65135 || (cp >= 65280 && cp <= 65376 || (cp >= 65504 && cp <= 65510 || (cp >= 127744 && cp <= 129791 || (cp >= 131072 && cp <= 196605 || cp >= 196608 && cp <= 262141)))))))))));
|
|
3722
|
+
}
|
|
3723
|
+
function _M0FP36altsia6altsia14display__width20char__display__width(ch) {
|
|
3724
|
+
return _M0FP36altsia6altsia14display__width21is__wide__east__asian(ch) ? 2 : 1;
|
|
3725
|
+
}
|
|
3726
|
+
function _M0FP36altsia6altsia14display__width22string__display__width(s) {
|
|
3727
|
+
let total = 0;
|
|
3728
|
+
const _it = _M0MP311moonbitlang4core6string6String4iter(s);
|
|
3729
|
+
while (true) {
|
|
3730
|
+
const _bind = _M0MP311moonbitlang4core7builtin4Iter4nextGcE(_it);
|
|
3731
|
+
if (_bind === -1) {
|
|
3732
|
+
break;
|
|
3733
|
+
} else {
|
|
3734
|
+
const _Some = _bind;
|
|
3735
|
+
const _ch = _Some;
|
|
3736
|
+
total = total + _M0FP36altsia6altsia14display__width20char__display__width(_ch) | 0;
|
|
3737
|
+
continue;
|
|
3738
|
+
}
|
|
3739
|
+
}
|
|
3740
|
+
return total;
|
|
3741
|
+
}
|
|
3742
|
+
function _M0IP26altsia6altsia1SP311moonbitlang4core7builtin4Show6output(_x_1299, _x_1300) {
|
|
3743
|
+
switch (_x_1299.$tag) {
|
|
3637
3744
|
case 0: {
|
|
3638
|
-
const _Text =
|
|
3639
|
-
const _$42$
|
|
3640
|
-
|
|
3641
|
-
_M0MP311moonbitlang4core7builtin6Logger13write__objectGsE(
|
|
3642
|
-
|
|
3745
|
+
const _Text = _x_1299;
|
|
3746
|
+
const _$42$arg_1301 = _Text._0;
|
|
3747
|
+
_x_1300.method_table.method_0(_x_1300.self, "Text(");
|
|
3748
|
+
_M0MP311moonbitlang4core7builtin6Logger13write__objectGsE(_x_1300, _$42$arg_1301);
|
|
3749
|
+
_x_1300.method_table.method_0(_x_1300.self, ")");
|
|
3643
3750
|
return;
|
|
3644
3751
|
}
|
|
3645
3752
|
case 1: {
|
|
3646
|
-
const _Quote =
|
|
3647
|
-
const _$42$
|
|
3648
|
-
|
|
3649
|
-
_M0MP311moonbitlang4core7builtin6Logger13write__objectGsE(
|
|
3650
|
-
|
|
3753
|
+
const _Quote = _x_1299;
|
|
3754
|
+
const _$42$arg_1302 = _Quote._0;
|
|
3755
|
+
_x_1300.method_table.method_0(_x_1300.self, "Quote(");
|
|
3756
|
+
_M0MP311moonbitlang4core7builtin6Logger13write__objectGsE(_x_1300, _$42$arg_1302);
|
|
3757
|
+
_x_1300.method_table.method_0(_x_1300.self, ")");
|
|
3651
3758
|
return;
|
|
3652
3759
|
}
|
|
3653
3760
|
default: {
|
|
3654
|
-
const _App =
|
|
3655
|
-
const _$42$
|
|
3656
|
-
|
|
3657
|
-
_M0MP311moonbitlang4core7builtin6Logger13write__objectGRP311moonbitlang4core4list4ListGRP26altsia6altsia1SEE(
|
|
3658
|
-
|
|
3761
|
+
const _App = _x_1299;
|
|
3762
|
+
const _$42$arg_1303 = _App._0;
|
|
3763
|
+
_x_1300.method_table.method_0(_x_1300.self, "App(");
|
|
3764
|
+
_M0MP311moonbitlang4core7builtin6Logger13write__objectGRP311moonbitlang4core4list4ListGRP26altsia6altsia1SEE(_x_1300, _$42$arg_1303);
|
|
3765
|
+
_x_1300.method_table.method_0(_x_1300.self, ")");
|
|
3659
3766
|
return;
|
|
3660
3767
|
}
|
|
3661
3768
|
}
|
|
3662
3769
|
}
|
|
3663
|
-
function _M0IP26altsia6altsia16Stage2EtaleErrorP311moonbitlang4core7builtin4Show6output(
|
|
3664
|
-
switch (
|
|
3770
|
+
function _M0IP26altsia6altsia16Stage2EtaleErrorP311moonbitlang4core7builtin4Show6output(_x_1237, _x_1238) {
|
|
3771
|
+
switch (_x_1237.$tag) {
|
|
3665
3772
|
case 5: {
|
|
3666
|
-
const _TemplateArityMismatch =
|
|
3667
|
-
const _$42$
|
|
3668
|
-
const _$42$
|
|
3669
|
-
const _$42$
|
|
3670
|
-
const _$42$
|
|
3671
|
-
const _$42$
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
_M0MP311moonbitlang4core7builtin6Logger13write__objectGsE(
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
_M0MP311moonbitlang4core7builtin6Logger13write__objectGiE(
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
_M0MP311moonbitlang4core7builtin6Logger13write__objectGiE(
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
_M0MP311moonbitlang4core7builtin6Logger13write__objectGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia4TermEE(
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
_M0MP311moonbitlang4core7builtin6Logger13write__objectGORP26altsia6altsia9SourceLocE(
|
|
3687
|
-
|
|
3773
|
+
const _TemplateArityMismatch = _x_1237;
|
|
3774
|
+
const _$42$arg_1239 = _TemplateArityMismatch._0;
|
|
3775
|
+
const _$42$arg_1240 = _TemplateArityMismatch._1;
|
|
3776
|
+
const _$42$arg_1241 = _TemplateArityMismatch._2;
|
|
3777
|
+
const _$42$arg_1242 = _TemplateArityMismatch._3;
|
|
3778
|
+
const _$42$arg_1243 = _TemplateArityMismatch._4;
|
|
3779
|
+
_x_1238.method_table.method_0(_x_1238.self, "TemplateArityMismatch(");
|
|
3780
|
+
_x_1238.method_table.method_0(_x_1238.self, "template_name=");
|
|
3781
|
+
_M0MP311moonbitlang4core7builtin6Logger13write__objectGsE(_x_1238, _$42$arg_1239);
|
|
3782
|
+
_x_1238.method_table.method_0(_x_1238.self, ", ");
|
|
3783
|
+
_x_1238.method_table.method_0(_x_1238.self, "expected=");
|
|
3784
|
+
_M0MP311moonbitlang4core7builtin6Logger13write__objectGiE(_x_1238, _$42$arg_1240);
|
|
3785
|
+
_x_1238.method_table.method_0(_x_1238.self, ", ");
|
|
3786
|
+
_x_1238.method_table.method_0(_x_1238.self, "got=");
|
|
3787
|
+
_M0MP311moonbitlang4core7builtin6Logger13write__objectGiE(_x_1238, _$42$arg_1241);
|
|
3788
|
+
_x_1238.method_table.method_0(_x_1238.self, ", ");
|
|
3789
|
+
_x_1238.method_table.method_0(_x_1238.self, "args=");
|
|
3790
|
+
_M0MP311moonbitlang4core7builtin6Logger13write__objectGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia4TermEE(_x_1238, _$42$arg_1242);
|
|
3791
|
+
_x_1238.method_table.method_0(_x_1238.self, ", ");
|
|
3792
|
+
_x_1238.method_table.method_0(_x_1238.self, "loc=");
|
|
3793
|
+
_M0MP311moonbitlang4core7builtin6Logger13write__objectGORP26altsia6altsia9SourceLocE(_x_1238, _$42$arg_1243);
|
|
3794
|
+
_x_1238.method_table.method_0(_x_1238.self, ")");
|
|
3688
3795
|
return;
|
|
3689
3796
|
}
|
|
3690
3797
|
case 4: {
|
|
3691
|
-
const _NestedTemplateDefinitionInSubstitution =
|
|
3692
|
-
const _$42$
|
|
3693
|
-
const _$42$
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
_M0MP311moonbitlang4core7builtin6Logger13write__objectGRP26altsia6altsia4TermE(
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
_M0MP311moonbitlang4core7builtin6Logger13write__objectGORP26altsia6altsia9SourceLocE(
|
|
3700
|
-
|
|
3798
|
+
const _NestedTemplateDefinitionInSubstitution = _x_1237;
|
|
3799
|
+
const _$42$arg_1244 = _NestedTemplateDefinitionInSubstitution._0;
|
|
3800
|
+
const _$42$arg_1245 = _NestedTemplateDefinitionInSubstitution._1;
|
|
3801
|
+
_x_1238.method_table.method_0(_x_1238.self, "NestedTemplateDefinitionInSubstitution(");
|
|
3802
|
+
_x_1238.method_table.method_0(_x_1238.self, "term=");
|
|
3803
|
+
_M0MP311moonbitlang4core7builtin6Logger13write__objectGRP26altsia6altsia4TermE(_x_1238, _$42$arg_1244);
|
|
3804
|
+
_x_1238.method_table.method_0(_x_1238.self, ", ");
|
|
3805
|
+
_x_1238.method_table.method_0(_x_1238.self, "loc=");
|
|
3806
|
+
_M0MP311moonbitlang4core7builtin6Logger13write__objectGORP26altsia6altsia9SourceLocE(_x_1238, _$42$arg_1245);
|
|
3807
|
+
_x_1238.method_table.method_0(_x_1238.self, ")");
|
|
3701
3808
|
return;
|
|
3702
3809
|
}
|
|
3703
3810
|
default: {
|
|
3704
|
-
const _UnexpectedTemplateDefinitionInExpand =
|
|
3705
|
-
const _$42$
|
|
3706
|
-
const _$42$
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
_M0MP311moonbitlang4core7builtin6Logger13write__objectGRP26altsia6altsia4TermE(
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
_M0MP311moonbitlang4core7builtin6Logger13write__objectGORP26altsia6altsia9SourceLocE(
|
|
3713
|
-
|
|
3811
|
+
const _UnexpectedTemplateDefinitionInExpand = _x_1237;
|
|
3812
|
+
const _$42$arg_1246 = _UnexpectedTemplateDefinitionInExpand._0;
|
|
3813
|
+
const _$42$arg_1247 = _UnexpectedTemplateDefinitionInExpand._1;
|
|
3814
|
+
_x_1238.method_table.method_0(_x_1238.self, "UnexpectedTemplateDefinitionInExpand(");
|
|
3815
|
+
_x_1238.method_table.method_0(_x_1238.self, "term=");
|
|
3816
|
+
_M0MP311moonbitlang4core7builtin6Logger13write__objectGRP26altsia6altsia4TermE(_x_1238, _$42$arg_1246);
|
|
3817
|
+
_x_1238.method_table.method_0(_x_1238.self, ", ");
|
|
3818
|
+
_x_1238.method_table.method_0(_x_1238.self, "loc=");
|
|
3819
|
+
_M0MP311moonbitlang4core7builtin6Logger13write__objectGORP26altsia6altsia9SourceLocE(_x_1238, _$42$arg_1247);
|
|
3820
|
+
_x_1238.method_table.method_0(_x_1238.self, ")");
|
|
3714
3821
|
return;
|
|
3715
3822
|
}
|
|
3716
3823
|
}
|
|
3717
3824
|
}
|
|
3718
|
-
function
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3825
|
+
function _M0IP26altsia6altsia20Stage1NormalizeErrorP311moonbitlang4core7builtin4Show6output(_x_1113, _x_1114) {
|
|
3826
|
+
const _InvalidRange = _x_1113;
|
|
3827
|
+
const _$42$arg_1115 = _InvalidRange._0;
|
|
3828
|
+
const _$42$arg_1116 = _InvalidRange._1;
|
|
3829
|
+
const _$42$arg_1117 = _InvalidRange._2;
|
|
3830
|
+
const _$42$arg_1118 = _InvalidRange._3;
|
|
3831
|
+
_x_1114.method_table.method_0(_x_1114.self, "InvalidRange(");
|
|
3832
|
+
_x_1114.method_table.method_0(_x_1114.self, "start_offset=");
|
|
3833
|
+
_M0MP311moonbitlang4core7builtin6Logger13write__objectGiE(_x_1114, _$42$arg_1115);
|
|
3834
|
+
_x_1114.method_table.method_0(_x_1114.self, ", ");
|
|
3835
|
+
_x_1114.method_table.method_0(_x_1114.self, "end_offset=");
|
|
3836
|
+
_M0MP311moonbitlang4core7builtin6Logger13write__objectGiE(_x_1114, _$42$arg_1116);
|
|
3837
|
+
_x_1114.method_table.method_0(_x_1114.self, ", ");
|
|
3838
|
+
_x_1114.method_table.method_0(_x_1114.self, "source_length=");
|
|
3839
|
+
_M0MP311moonbitlang4core7builtin6Logger13write__objectGiE(_x_1114, _$42$arg_1117);
|
|
3840
|
+
_x_1114.method_table.method_0(_x_1114.self, ", ");
|
|
3841
|
+
_x_1114.method_table.method_0(_x_1114.self, "loc=");
|
|
3842
|
+
_M0MP311moonbitlang4core7builtin6Logger13write__objectGRP26altsia6altsia9SourceLocE(_x_1114, _$42$arg_1118);
|
|
3843
|
+
_x_1114.method_table.method_0(_x_1114.self, ")");
|
|
3844
|
+
}
|
|
3845
|
+
function _M0IP26altsia6altsia11Stage3ErrorP311moonbitlang4core7builtin4Show6output(_x_1071, _x_1072) {
|
|
3846
|
+
if (_x_1071.$tag === 21) {
|
|
3847
|
+
const _AttributeExpectsAtMostOneValue = _x_1071;
|
|
3848
|
+
const _$42$arg_1073 = _AttributeExpectsAtMostOneValue._0;
|
|
3849
|
+
const _$42$arg_1074 = _AttributeExpectsAtMostOneValue._1;
|
|
3850
|
+
_x_1072.method_table.method_0(_x_1072.self, "AttributeExpectsAtMostOneValue(");
|
|
3851
|
+
_x_1072.method_table.method_0(_x_1072.self, "values=");
|
|
3852
|
+
_M0MP311moonbitlang4core7builtin6Logger13write__objectGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia4TermEE(_x_1072, _$42$arg_1073);
|
|
3853
|
+
_x_1072.method_table.method_0(_x_1072.self, ", ");
|
|
3854
|
+
_x_1072.method_table.method_0(_x_1072.self, "loc=");
|
|
3855
|
+
_M0MP311moonbitlang4core7builtin6Logger13write__objectGORP26altsia6altsia9SourceLocE(_x_1072, _$42$arg_1074);
|
|
3856
|
+
_x_1072.method_table.method_0(_x_1072.self, ")");
|
|
3730
3857
|
return;
|
|
3731
3858
|
} else {
|
|
3732
|
-
const _UnexpectedTemplateDefinition =
|
|
3733
|
-
const _$42$
|
|
3734
|
-
const _$42$
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
_M0MP311moonbitlang4core7builtin6Logger13write__objectGRP26altsia6altsia4TermE(
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
_M0MP311moonbitlang4core7builtin6Logger13write__objectGORP26altsia6altsia9SourceLocE(
|
|
3741
|
-
|
|
3859
|
+
const _UnexpectedTemplateDefinition = _x_1071;
|
|
3860
|
+
const _$42$arg_1075 = _UnexpectedTemplateDefinition._0;
|
|
3861
|
+
const _$42$arg_1076 = _UnexpectedTemplateDefinition._1;
|
|
3862
|
+
_x_1072.method_table.method_0(_x_1072.self, "UnexpectedTemplateDefinition(");
|
|
3863
|
+
_x_1072.method_table.method_0(_x_1072.self, "term=");
|
|
3864
|
+
_M0MP311moonbitlang4core7builtin6Logger13write__objectGRP26altsia6altsia4TermE(_x_1072, _$42$arg_1075);
|
|
3865
|
+
_x_1072.method_table.method_0(_x_1072.self, ", ");
|
|
3866
|
+
_x_1072.method_table.method_0(_x_1072.self, "loc=");
|
|
3867
|
+
_M0MP311moonbitlang4core7builtin6Logger13write__objectGORP26altsia6altsia9SourceLocE(_x_1072, _$42$arg_1076);
|
|
3868
|
+
_x_1072.method_table.method_0(_x_1072.self, ")");
|
|
3742
3869
|
return;
|
|
3743
3870
|
}
|
|
3744
3871
|
}
|
|
3745
|
-
function _M0IP26altsia6altsia9SourceLocP311moonbitlang4core7builtin4Show6output(
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
_M0MP311moonbitlang4core7builtin6Logger13write__objectGiE(
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
_M0MP311moonbitlang4core7builtin6Logger13write__objectGiE(
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
_M0MP311moonbitlang4core7builtin6Logger13write__objectGiE(
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
_M0MP311moonbitlang4core7builtin6Logger13write__objectGiE(
|
|
3758
|
-
|
|
3759
|
-
}
|
|
3760
|
-
function _M0IP26altsia6altsia11Stage2ErrorP311moonbitlang4core7builtin4Show6output(
|
|
3761
|
-
switch (
|
|
3762
|
-
case
|
|
3763
|
-
const _FunctionNameMustBePlainText =
|
|
3764
|
-
const _$42$
|
|
3765
|
-
const _$42$
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
_M0MP311moonbitlang4core7builtin6Logger13write__objectGRP26altsia6altsia1SE(
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
_M0MP311moonbitlang4core7builtin6Logger13write__objectGORP26altsia6altsia9SourceLocE(
|
|
3772
|
-
|
|
3872
|
+
function _M0IP26altsia6altsia9SourceLocP311moonbitlang4core7builtin4Show6output(_x_1063, _x_1064) {
|
|
3873
|
+
_x_1064.method_table.method_0(_x_1064.self, "{");
|
|
3874
|
+
_x_1064.method_table.method_0(_x_1064.self, "start_offset: ");
|
|
3875
|
+
_M0MP311moonbitlang4core7builtin6Logger13write__objectGiE(_x_1064, _x_1063.start_offset);
|
|
3876
|
+
_x_1064.method_table.method_0(_x_1064.self, ", ");
|
|
3877
|
+
_x_1064.method_table.method_0(_x_1064.self, "end_offset: ");
|
|
3878
|
+
_M0MP311moonbitlang4core7builtin6Logger13write__objectGiE(_x_1064, _x_1063.end_offset);
|
|
3879
|
+
_x_1064.method_table.method_0(_x_1064.self, ", ");
|
|
3880
|
+
_x_1064.method_table.method_0(_x_1064.self, "line: ");
|
|
3881
|
+
_M0MP311moonbitlang4core7builtin6Logger13write__objectGiE(_x_1064, _x_1063.line);
|
|
3882
|
+
_x_1064.method_table.method_0(_x_1064.self, ", ");
|
|
3883
|
+
_x_1064.method_table.method_0(_x_1064.self, "column: ");
|
|
3884
|
+
_M0MP311moonbitlang4core7builtin6Logger13write__objectGiE(_x_1064, _x_1063.column);
|
|
3885
|
+
_x_1064.method_table.method_0(_x_1064.self, "}");
|
|
3886
|
+
}
|
|
3887
|
+
function _M0IP26altsia6altsia11Stage2ErrorP311moonbitlang4core7builtin4Show6output(_x_979, _x_980) {
|
|
3888
|
+
switch (_x_979.$tag) {
|
|
3889
|
+
case 19: {
|
|
3890
|
+
const _FunctionNameMustBePlainText = _x_979;
|
|
3891
|
+
const _$42$arg_981 = _FunctionNameMustBePlainText._0;
|
|
3892
|
+
const _$42$arg_982 = _FunctionNameMustBePlainText._1;
|
|
3893
|
+
_x_980.method_table.method_0(_x_980.self, "FunctionNameMustBePlainText(");
|
|
3894
|
+
_x_980.method_table.method_0(_x_980.self, "found=");
|
|
3895
|
+
_M0MP311moonbitlang4core7builtin6Logger13write__objectGRP26altsia6altsia1SE(_x_980, _$42$arg_981);
|
|
3896
|
+
_x_980.method_table.method_0(_x_980.self, ", ");
|
|
3897
|
+
_x_980.method_table.method_0(_x_980.self, "loc=");
|
|
3898
|
+
_M0MP311moonbitlang4core7builtin6Logger13write__objectGORP26altsia6altsia9SourceLocE(_x_980, _$42$arg_982);
|
|
3899
|
+
_x_980.method_table.method_0(_x_980.self, ")");
|
|
3773
3900
|
return;
|
|
3774
3901
|
}
|
|
3775
|
-
case
|
|
3776
|
-
const _TemplateRequiresNameAndParamList =
|
|
3777
|
-
const _$42$
|
|
3778
|
-
const _$42$
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
_M0MP311moonbitlang4core7builtin6Logger13write__objectGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia1SEE(
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
_M0MP311moonbitlang4core7builtin6Logger13write__objectGORP26altsia6altsia9SourceLocE(
|
|
3785
|
-
|
|
3902
|
+
case 18: {
|
|
3903
|
+
const _TemplateRequiresNameAndParamList = _x_979;
|
|
3904
|
+
const _$42$arg_983 = _TemplateRequiresNameAndParamList._0;
|
|
3905
|
+
const _$42$arg_984 = _TemplateRequiresNameAndParamList._1;
|
|
3906
|
+
_x_980.method_table.method_0(_x_980.self, "TemplateRequiresNameAndParamList(");
|
|
3907
|
+
_x_980.method_table.method_0(_x_980.self, "items=");
|
|
3908
|
+
_M0MP311moonbitlang4core7builtin6Logger13write__objectGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia1SEE(_x_980, _$42$arg_983);
|
|
3909
|
+
_x_980.method_table.method_0(_x_980.self, ", ");
|
|
3910
|
+
_x_980.method_table.method_0(_x_980.self, "loc=");
|
|
3911
|
+
_M0MP311moonbitlang4core7builtin6Logger13write__objectGORP26altsia6altsia9SourceLocE(_x_980, _$42$arg_984);
|
|
3912
|
+
_x_980.method_table.method_0(_x_980.self, ")");
|
|
3786
3913
|
return;
|
|
3787
3914
|
}
|
|
3788
|
-
case
|
|
3789
|
-
const _TemplateParamsMustBeList =
|
|
3790
|
-
const _$42$
|
|
3791
|
-
const _$42$
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
_M0MP311moonbitlang4core7builtin6Logger13write__objectGRP26altsia6altsia1SE(
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
_M0MP311moonbitlang4core7builtin6Logger13write__objectGORP26altsia6altsia9SourceLocE(
|
|
3798
|
-
|
|
3915
|
+
case 17: {
|
|
3916
|
+
const _TemplateParamsMustBeList = _x_979;
|
|
3917
|
+
const _$42$arg_985 = _TemplateParamsMustBeList._0;
|
|
3918
|
+
const _$42$arg_986 = _TemplateParamsMustBeList._1;
|
|
3919
|
+
_x_980.method_table.method_0(_x_980.self, "TemplateParamsMustBeList(");
|
|
3920
|
+
_x_980.method_table.method_0(_x_980.self, "found=");
|
|
3921
|
+
_M0MP311moonbitlang4core7builtin6Logger13write__objectGRP26altsia6altsia1SE(_x_980, _$42$arg_985);
|
|
3922
|
+
_x_980.method_table.method_0(_x_980.self, ", ");
|
|
3923
|
+
_x_980.method_table.method_0(_x_980.self, "loc=");
|
|
3924
|
+
_M0MP311moonbitlang4core7builtin6Logger13write__objectGORP26altsia6altsia9SourceLocE(_x_980, _$42$arg_986);
|
|
3925
|
+
_x_980.method_table.method_0(_x_980.self, ")");
|
|
3799
3926
|
return;
|
|
3800
3927
|
}
|
|
3801
3928
|
default: {
|
|
3802
|
-
const _InternalInvariantViolation =
|
|
3803
|
-
const _$42$
|
|
3804
|
-
const _$42$
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
_M0MP311moonbitlang4core7builtin6Logger13write__objectGsE(
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
_M0MP311moonbitlang4core7builtin6Logger13write__objectGORP26altsia6altsia9SourceLocE(
|
|
3811
|
-
|
|
3929
|
+
const _InternalInvariantViolation = _x_979;
|
|
3930
|
+
const _$42$arg_987 = _InternalInvariantViolation._0;
|
|
3931
|
+
const _$42$arg_988 = _InternalInvariantViolation._1;
|
|
3932
|
+
_x_980.method_table.method_0(_x_980.self, "InternalInvariantViolation(");
|
|
3933
|
+
_x_980.method_table.method_0(_x_980.self, "context=");
|
|
3934
|
+
_M0MP311moonbitlang4core7builtin6Logger13write__objectGsE(_x_980, _$42$arg_987);
|
|
3935
|
+
_x_980.method_table.method_0(_x_980.self, ", ");
|
|
3936
|
+
_x_980.method_table.method_0(_x_980.self, "loc=");
|
|
3937
|
+
_M0MP311moonbitlang4core7builtin6Logger13write__objectGORP26altsia6altsia9SourceLocE(_x_980, _$42$arg_988);
|
|
3938
|
+
_x_980.method_table.method_0(_x_980.self, ")");
|
|
3812
3939
|
return;
|
|
3813
3940
|
}
|
|
3814
3941
|
}
|
|
3815
3942
|
}
|
|
3816
|
-
function _M0IP26altsia6altsia4TermP311moonbitlang4core7builtin4Show6output(
|
|
3817
|
-
switch (
|
|
3943
|
+
function _M0IP26altsia6altsia4TermP311moonbitlang4core7builtin4Show6output(_x_923, _x_924) {
|
|
3944
|
+
switch (_x_923.$tag) {
|
|
3818
3945
|
case 0: {
|
|
3819
|
-
const _Text =
|
|
3820
|
-
const _$42$
|
|
3821
|
-
|
|
3822
|
-
_M0MP311moonbitlang4core7builtin6Logger13write__objectGsE(
|
|
3823
|
-
|
|
3946
|
+
const _Text = _x_923;
|
|
3947
|
+
const _$42$arg_925 = _Text._0;
|
|
3948
|
+
_x_924.method_table.method_0(_x_924.self, "Text(");
|
|
3949
|
+
_M0MP311moonbitlang4core7builtin6Logger13write__objectGsE(_x_924, _$42$arg_925);
|
|
3950
|
+
_x_924.method_table.method_0(_x_924.self, ")");
|
|
3824
3951
|
return;
|
|
3825
3952
|
}
|
|
3826
3953
|
case 1: {
|
|
3827
|
-
const _App =
|
|
3828
|
-
const _$42$
|
|
3829
|
-
const _$42$
|
|
3830
|
-
|
|
3831
|
-
_M0MP311moonbitlang4core7builtin6Logger13write__objectGsE(
|
|
3832
|
-
|
|
3833
|
-
_M0MP311moonbitlang4core7builtin6Logger13write__objectGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia4TermEE(
|
|
3834
|
-
|
|
3954
|
+
const _App = _x_923;
|
|
3955
|
+
const _$42$arg_926 = _App._0;
|
|
3956
|
+
const _$42$arg_927 = _App._1;
|
|
3957
|
+
_x_924.method_table.method_0(_x_924.self, "App(");
|
|
3958
|
+
_M0MP311moonbitlang4core7builtin6Logger13write__objectGsE(_x_924, _$42$arg_926);
|
|
3959
|
+
_x_924.method_table.method_0(_x_924.self, ", ");
|
|
3960
|
+
_M0MP311moonbitlang4core7builtin6Logger13write__objectGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia4TermEE(_x_924, _$42$arg_927);
|
|
3961
|
+
_x_924.method_table.method_0(_x_924.self, ")");
|
|
3835
3962
|
return;
|
|
3836
3963
|
}
|
|
3837
3964
|
case 2: {
|
|
3838
|
-
const _TemplateDefinition =
|
|
3839
|
-
const _$42$
|
|
3840
|
-
const _$42$
|
|
3841
|
-
const _$42$
|
|
3842
|
-
|
|
3843
|
-
_M0MP311moonbitlang4core7builtin6Logger13write__objectGsE(
|
|
3844
|
-
|
|
3845
|
-
_M0MP311moonbitlang4core7builtin6Logger13write__objectGRP311moonbitlang4core7builtin5ArrayGsEE(
|
|
3846
|
-
|
|
3847
|
-
_M0MP311moonbitlang4core7builtin6Logger13write__objectGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia4TermEE(
|
|
3848
|
-
|
|
3965
|
+
const _TemplateDefinition = _x_923;
|
|
3966
|
+
const _$42$arg_928 = _TemplateDefinition._0;
|
|
3967
|
+
const _$42$arg_929 = _TemplateDefinition._1;
|
|
3968
|
+
const _$42$arg_930 = _TemplateDefinition._2;
|
|
3969
|
+
_x_924.method_table.method_0(_x_924.self, "TemplateDefinition(");
|
|
3970
|
+
_M0MP311moonbitlang4core7builtin6Logger13write__objectGsE(_x_924, _$42$arg_928);
|
|
3971
|
+
_x_924.method_table.method_0(_x_924.self, ", ");
|
|
3972
|
+
_M0MP311moonbitlang4core7builtin6Logger13write__objectGRP311moonbitlang4core7builtin5ArrayGsEE(_x_924, _$42$arg_929);
|
|
3973
|
+
_x_924.method_table.method_0(_x_924.self, ", ");
|
|
3974
|
+
_M0MP311moonbitlang4core7builtin6Logger13write__objectGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia4TermEE(_x_924, _$42$arg_930);
|
|
3975
|
+
_x_924.method_table.method_0(_x_924.self, ")");
|
|
3849
3976
|
return;
|
|
3850
3977
|
}
|
|
3851
3978
|
case 3: {
|
|
3852
|
-
const _Splice =
|
|
3853
|
-
const _$42$
|
|
3854
|
-
|
|
3855
|
-
_M0MP311moonbitlang4core7builtin6Logger13write__objectGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia4TermEE(
|
|
3856
|
-
|
|
3979
|
+
const _Splice = _x_923;
|
|
3980
|
+
const _$42$arg_931 = _Splice._0;
|
|
3981
|
+
_x_924.method_table.method_0(_x_924.self, "Splice(");
|
|
3982
|
+
_M0MP311moonbitlang4core7builtin6Logger13write__objectGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia4TermEE(_x_924, _$42$arg_931);
|
|
3983
|
+
_x_924.method_table.method_0(_x_924.self, ")");
|
|
3857
3984
|
return;
|
|
3858
3985
|
}
|
|
3859
3986
|
default: {
|
|
3860
|
-
const _Comment =
|
|
3861
|
-
const _$42$
|
|
3862
|
-
|
|
3863
|
-
_M0MP311moonbitlang4core7builtin6Logger13write__objectGsE(
|
|
3864
|
-
|
|
3987
|
+
const _Comment = _x_923;
|
|
3988
|
+
const _$42$arg_932 = _Comment._0;
|
|
3989
|
+
_x_924.method_table.method_0(_x_924.self, "Comment(");
|
|
3990
|
+
_M0MP311moonbitlang4core7builtin6Logger13write__objectGsE(_x_924, _$42$arg_932);
|
|
3991
|
+
_x_924.method_table.method_0(_x_924.self, ")");
|
|
3865
3992
|
return;
|
|
3866
3993
|
}
|
|
3867
3994
|
}
|
|
3868
3995
|
}
|
|
3869
|
-
function _M0IP26altsia6altsia11Stage1ErrorP311moonbitlang4core7builtin4Show6output(
|
|
3870
|
-
switch (
|
|
3996
|
+
function _M0IP26altsia6altsia11Stage1ErrorP311moonbitlang4core7builtin4Show6output(_x_831, _x_832) {
|
|
3997
|
+
switch (_x_831.$tag) {
|
|
3871
3998
|
case 14: {
|
|
3872
|
-
const _InvalidQuoteBlockStart =
|
|
3873
|
-
const _$42$
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
_M0MP311moonbitlang4core7builtin6Logger13write__objectGRP26altsia6altsia9SourceLocE(
|
|
3877
|
-
|
|
3999
|
+
const _InvalidQuoteBlockStart = _x_831;
|
|
4000
|
+
const _$42$arg_833 = _InvalidQuoteBlockStart._0;
|
|
4001
|
+
_x_832.method_table.method_0(_x_832.self, "InvalidQuoteBlockStart(");
|
|
4002
|
+
_x_832.method_table.method_0(_x_832.self, "loc=");
|
|
4003
|
+
_M0MP311moonbitlang4core7builtin6Logger13write__objectGRP26altsia6altsia9SourceLocE(_x_832, _$42$arg_833);
|
|
4004
|
+
_x_832.method_table.method_0(_x_832.self, ")");
|
|
3878
4005
|
return;
|
|
3879
4006
|
}
|
|
3880
4007
|
case 13: {
|
|
3881
|
-
const _InvalidApplicationStart =
|
|
3882
|
-
const _$42$
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
_M0MP311moonbitlang4core7builtin6Logger13write__objectGRP26altsia6altsia9SourceLocE(
|
|
3886
|
-
|
|
4008
|
+
const _InvalidApplicationStart = _x_831;
|
|
4009
|
+
const _$42$arg_834 = _InvalidApplicationStart._0;
|
|
4010
|
+
_x_832.method_table.method_0(_x_832.self, "InvalidApplicationStart(");
|
|
4011
|
+
_x_832.method_table.method_0(_x_832.self, "loc=");
|
|
4012
|
+
_M0MP311moonbitlang4core7builtin6Logger13write__objectGRP26altsia6altsia9SourceLocE(_x_832, _$42$arg_834);
|
|
4013
|
+
_x_832.method_table.method_0(_x_832.self, ")");
|
|
3887
4014
|
return;
|
|
3888
4015
|
}
|
|
3889
4016
|
case 12: {
|
|
3890
|
-
const _UnexpectedEof =
|
|
3891
|
-
const _$42$
|
|
3892
|
-
const _$42$
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
_M0MP311moonbitlang4core7builtin6Logger13write__objectGsE(
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
_M0MP311moonbitlang4core7builtin6Logger13write__objectGRP26altsia6altsia9SourceLocE(
|
|
3899
|
-
|
|
4017
|
+
const _UnexpectedEof = _x_831;
|
|
4018
|
+
const _$42$arg_835 = _UnexpectedEof._0;
|
|
4019
|
+
const _$42$arg_836 = _UnexpectedEof._1;
|
|
4020
|
+
_x_832.method_table.method_0(_x_832.self, "UnexpectedEof(");
|
|
4021
|
+
_x_832.method_table.method_0(_x_832.self, "context=");
|
|
4022
|
+
_M0MP311moonbitlang4core7builtin6Logger13write__objectGsE(_x_832, _$42$arg_835);
|
|
4023
|
+
_x_832.method_table.method_0(_x_832.self, ", ");
|
|
4024
|
+
_x_832.method_table.method_0(_x_832.self, "loc=");
|
|
4025
|
+
_M0MP311moonbitlang4core7builtin6Logger13write__objectGRP26altsia6altsia9SourceLocE(_x_832, _$42$arg_836);
|
|
4026
|
+
_x_832.method_table.method_0(_x_832.self, ")");
|
|
3900
4027
|
return;
|
|
3901
4028
|
}
|
|
3902
4029
|
case 11: {
|
|
3903
|
-
const _EmptyApplicationHead =
|
|
3904
|
-
const _$42$
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
_M0MP311moonbitlang4core7builtin6Logger13write__objectGRP26altsia6altsia9SourceLocE(
|
|
3908
|
-
|
|
4030
|
+
const _EmptyApplicationHead = _x_831;
|
|
4031
|
+
const _$42$arg_837 = _EmptyApplicationHead._0;
|
|
4032
|
+
_x_832.method_table.method_0(_x_832.self, "EmptyApplicationHead(");
|
|
4033
|
+
_x_832.method_table.method_0(_x_832.self, "loc=");
|
|
4034
|
+
_M0MP311moonbitlang4core7builtin6Logger13write__objectGRP26altsia6altsia9SourceLocE(_x_832, _$42$arg_837);
|
|
4035
|
+
_x_832.method_table.method_0(_x_832.self, ")");
|
|
3909
4036
|
return;
|
|
3910
4037
|
}
|
|
3911
4038
|
case 10: {
|
|
3912
|
-
const _UnclosedApplication =
|
|
3913
|
-
const _$42$
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
_M0MP311moonbitlang4core7builtin6Logger13write__objectGRP26altsia6altsia9SourceLocE(
|
|
3917
|
-
|
|
4039
|
+
const _UnclosedApplication = _x_831;
|
|
4040
|
+
const _$42$arg_838 = _UnclosedApplication._0;
|
|
4041
|
+
_x_832.method_table.method_0(_x_832.self, "UnclosedApplication(");
|
|
4042
|
+
_x_832.method_table.method_0(_x_832.self, "loc=");
|
|
4043
|
+
_M0MP311moonbitlang4core7builtin6Logger13write__objectGRP26altsia6altsia9SourceLocE(_x_832, _$42$arg_838);
|
|
4044
|
+
_x_832.method_table.method_0(_x_832.self, ")");
|
|
3918
4045
|
return;
|
|
3919
4046
|
}
|
|
3920
4047
|
case 9: {
|
|
3921
|
-
const _UnclosedQuoteBlock =
|
|
3922
|
-
const _$42$
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
_M0MP311moonbitlang4core7builtin6Logger13write__objectGRP26altsia6altsia9SourceLocE(
|
|
3926
|
-
|
|
4048
|
+
const _UnclosedQuoteBlock = _x_831;
|
|
4049
|
+
const _$42$arg_839 = _UnclosedQuoteBlock._0;
|
|
4050
|
+
_x_832.method_table.method_0(_x_832.self, "UnclosedQuoteBlock(");
|
|
4051
|
+
_x_832.method_table.method_0(_x_832.self, "loc=");
|
|
4052
|
+
_M0MP311moonbitlang4core7builtin6Logger13write__objectGRP26altsia6altsia9SourceLocE(_x_832, _$42$arg_839);
|
|
4053
|
+
_x_832.method_table.method_0(_x_832.self, ")");
|
|
3927
4054
|
return;
|
|
3928
4055
|
}
|
|
3929
4056
|
case 8: {
|
|
3930
|
-
const _QuoteBlockRequiresPrecedingApp =
|
|
3931
|
-
const _$42$
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
_M0MP311moonbitlang4core7builtin6Logger13write__objectGRP26altsia6altsia9SourceLocE(
|
|
3935
|
-
|
|
4057
|
+
const _QuoteBlockRequiresPrecedingApp = _x_831;
|
|
4058
|
+
const _$42$arg_840 = _QuoteBlockRequiresPrecedingApp._0;
|
|
4059
|
+
_x_832.method_table.method_0(_x_832.self, "QuoteBlockRequiresPrecedingApp(");
|
|
4060
|
+
_x_832.method_table.method_0(_x_832.self, "loc=");
|
|
4061
|
+
_M0MP311moonbitlang4core7builtin6Logger13write__objectGRP26altsia6altsia9SourceLocE(_x_832, _$42$arg_840);
|
|
4062
|
+
_x_832.method_table.method_0(_x_832.self, ")");
|
|
3936
4063
|
return;
|
|
3937
4064
|
}
|
|
3938
4065
|
case 7: {
|
|
3939
|
-
const _QuoteBlockMustFollowApp =
|
|
3940
|
-
const _$42$
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
_M0MP311moonbitlang4core7builtin6Logger13write__objectGRP26altsia6altsia9SourceLocE(
|
|
3944
|
-
|
|
4066
|
+
const _QuoteBlockMustFollowApp = _x_831;
|
|
4067
|
+
const _$42$arg_841 = _QuoteBlockMustFollowApp._0;
|
|
4068
|
+
_x_832.method_table.method_0(_x_832.self, "QuoteBlockMustFollowApp(");
|
|
4069
|
+
_x_832.method_table.method_0(_x_832.self, "loc=");
|
|
4070
|
+
_M0MP311moonbitlang4core7builtin6Logger13write__objectGRP26altsia6altsia9SourceLocE(_x_832, _$42$arg_841);
|
|
4071
|
+
_x_832.method_table.method_0(_x_832.self, ")");
|
|
3945
4072
|
return;
|
|
3946
4073
|
}
|
|
3947
4074
|
default: {
|
|
3948
|
-
const _UnexpectedTopLevelToken =
|
|
3949
|
-
const _$42$
|
|
3950
|
-
const _$42$
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
_M0MP311moonbitlang4core7builtin6Logger13write__objectGsE(
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
_M0MP311moonbitlang4core7builtin6Logger13write__objectGRP26altsia6altsia9SourceLocE(
|
|
3957
|
-
|
|
4075
|
+
const _UnexpectedTopLevelToken = _x_831;
|
|
4076
|
+
const _$42$arg_842 = _UnexpectedTopLevelToken._0;
|
|
4077
|
+
const _$42$arg_843 = _UnexpectedTopLevelToken._1;
|
|
4078
|
+
_x_832.method_table.method_0(_x_832.self, "UnexpectedTopLevelToken(");
|
|
4079
|
+
_x_832.method_table.method_0(_x_832.self, "token=");
|
|
4080
|
+
_M0MP311moonbitlang4core7builtin6Logger13write__objectGsE(_x_832, _$42$arg_842);
|
|
4081
|
+
_x_832.method_table.method_0(_x_832.self, ", ");
|
|
4082
|
+
_x_832.method_table.method_0(_x_832.self, "loc=");
|
|
4083
|
+
_M0MP311moonbitlang4core7builtin6Logger13write__objectGRP26altsia6altsia9SourceLocE(_x_832, _$42$arg_843);
|
|
4084
|
+
_x_832.method_table.method_0(_x_832.self, ")");
|
|
3958
4085
|
return;
|
|
3959
4086
|
}
|
|
3960
4087
|
}
|
|
@@ -4088,7 +4215,7 @@ function _M0FP26altsia6altsia23extract__attrs__spanned(args) {
|
|
|
4088
4215
|
const _name = _TApp._0;
|
|
4089
4216
|
const _v = _TApp._1;
|
|
4090
4217
|
const _loc = _TApp._2;
|
|
4091
|
-
const _bind = _M0MP311moonbitlang4core6string6String13strip__prefix(_name, { str:
|
|
4218
|
+
const _bind = _M0MP311moonbitlang4core6string6String13strip__prefix(_name, { str: _M0FP26altsia6altsia40extract__attrs__spanned_2e_2abind_7c2147, start: 0, end: _M0FP26altsia6altsia40extract__attrs__spanned_2e_2abind_7c2147.length });
|
|
4092
4219
|
if (_bind === undefined) {
|
|
4093
4220
|
break _L$2;
|
|
4094
4221
|
} else {
|
|
@@ -4789,11 +4916,11 @@ function _M0FP26altsia6altsia31expand__template__call__spanned(env, template_nam
|
|
|
4789
4916
|
return _bind;
|
|
4790
4917
|
}
|
|
4791
4918
|
const params_env = _M0MP311moonbitlang4core7hashmap7HashMap11new_2einnerGsRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia11LocatedTermEE(8);
|
|
4792
|
-
const
|
|
4919
|
+
const _end622 = template.params.length;
|
|
4793
4920
|
let _tmp = 0;
|
|
4794
4921
|
while (true) {
|
|
4795
4922
|
const i = _tmp;
|
|
4796
|
-
if (i <
|
|
4923
|
+
if (i < _end622) {
|
|
4797
4924
|
_M0MP311moonbitlang4core7hashmap7HashMap3setGsRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia11LocatedTermEE(params_env, _M0MP311moonbitlang4core5array5Array2atGsE(template.params, i), _M0MP311moonbitlang4core5array5Array2atGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia11LocatedTermEE(expand_args, i));
|
|
4798
4925
|
_tmp = i + 1 | 0;
|
|
4799
4926
|
continue;
|
|
@@ -4952,10 +5079,10 @@ function _M0MP26altsia6altsia11Stage2Etale24expand__program__spanned(terms) {
|
|
|
4952
5079
|
return new Result$Ok$14$(_M0MP311moonbitlang4core5array5Array7flattenGRP26altsia6altsia11LocatedTermE(_tmp$2));
|
|
4953
5080
|
}
|
|
4954
5081
|
function _M0FP26altsia6altsia12escape__text(value) {
|
|
4955
|
-
return _M0MP311moonbitlang4core6string6String12replace__all(_M0MP311moonbitlang4core6string6String12replace__all(value, { str:
|
|
5082
|
+
return _M0MP311moonbitlang4core6string6String12replace__all(_M0MP311moonbitlang4core6string6String12replace__all(value, { str: _M0FP26altsia6altsia29escape__text_2e_2abind_7c2365, start: 0, end: _M0FP26altsia6altsia29escape__text_2e_2abind_7c2365.length }, { str: _M0FP26altsia6altsia29escape__text_2e_2abind_7c2366, start: 0, end: _M0FP26altsia6altsia29escape__text_2e_2abind_7c2366.length }), { str: _M0FP26altsia6altsia29escape__text_2e_2abind_7c2367, start: 0, end: _M0FP26altsia6altsia29escape__text_2e_2abind_7c2367.length }, { str: _M0FP26altsia6altsia29escape__text_2e_2abind_7c2368, start: 0, end: _M0FP26altsia6altsia29escape__text_2e_2abind_7c2368.length });
|
|
4956
5083
|
}
|
|
4957
5084
|
function _M0FP26altsia6altsia13render__block(content) {
|
|
4958
|
-
const body = _M0MP311moonbitlang4core6string6String11has__suffix(content, { str:
|
|
5085
|
+
const body = _M0MP311moonbitlang4core6string6String11has__suffix(content, { str: _M0FP26altsia6altsia30render__block_2e_2abind_7c2369, start: 0, end: _M0FP26altsia6altsia30render__block_2e_2abind_7c2369.length }) ? content : `${content}\n`;
|
|
4959
5086
|
return `\`\`\`\n${body}\`\`\``;
|
|
4960
5087
|
}
|
|
4961
5088
|
function _M0FP26altsia6altsia11render__app(args) {
|
|
@@ -4991,8 +5118,8 @@ function _M0FP26altsia6altsia11render__app(args) {
|
|
|
4991
5118
|
continue;
|
|
4992
5119
|
}
|
|
4993
5120
|
}
|
|
4994
|
-
const app_line = `(${_M0MP311moonbitlang4core5array5Array4joinGsE(inline_parts, { str:
|
|
4995
|
-
return blocks.length === 0 ? app_line : `${app_line}\n${_M0MP311moonbitlang4core5array5Array4joinGsE(blocks, { str:
|
|
5121
|
+
const app_line = `(${_M0MP311moonbitlang4core5array5Array4joinGsE(inline_parts, { str: _M0FP26altsia6altsia28render__app_2e_2abind_7c2387, start: 0, end: _M0FP26altsia6altsia28render__app_2e_2abind_7c2387.length })})`;
|
|
5122
|
+
return blocks.length === 0 ? app_line : `${app_line}\n${_M0MP311moonbitlang4core5array5Array4joinGsE(blocks, { str: _M0FP26altsia6altsia28render__app_2e_2abind_7c2386, start: 0, end: _M0FP26altsia6altsia28render__app_2e_2abind_7c2386.length })}`;
|
|
4996
5123
|
}
|
|
4997
5124
|
function _M0IP26altsia6altsia1SP26altsia6altsia8ToSource10to__source(node) {
|
|
4998
5125
|
switch (node.$tag) {
|
|
@@ -5107,7 +5234,7 @@ function _M0FP26altsia6altsia27elaborate__comment__spanned(xs) {
|
|
|
5107
5234
|
}
|
|
5108
5235
|
}
|
|
5109
5236
|
}
|
|
5110
|
-
return _M0MP311moonbitlang4core5array5Array4joinGsE(_M0MP311moonbitlang4core5array9ArrayView3mapGRP26altsia6altsia8SpannedSsE(xs, (x) => _M0IP26altsia6altsia1SP26altsia6altsia8ToSource10to__source(_M0MP26altsia6altsia8SpannedS11erase__span(x))), { str:
|
|
5237
|
+
return _M0MP311moonbitlang4core5array5Array4joinGsE(_M0MP311moonbitlang4core5array9ArrayView3mapGRP26altsia6altsia8SpannedSsE(xs, (x) => _M0IP26altsia6altsia1SP26altsia6altsia8ToSource10to__source(_M0MP26altsia6altsia8SpannedS11erase__span(x))), { str: _M0FP26altsia6altsia44elaborate__comment__spanned_2e_2abind_7c2461, start: 0, end: _M0FP26altsia6altsia44elaborate__comment__spanned_2e_2abind_7c2461.length });
|
|
5111
5238
|
}
|
|
5112
5239
|
function _M0FP26altsia6altsia25elaborate__nodes__spanned(xs) {
|
|
5113
5240
|
const result = [];
|
|
@@ -5319,7 +5446,75 @@ function _M0FP26altsia6altsia17raw__term__source(source, node) {
|
|
|
5319
5446
|
const loc = _M0MP26altsia6altsia8SpannedS3loc(node);
|
|
5320
5447
|
return source.substring(loc.start_offset, loc.end_offset);
|
|
5321
5448
|
}
|
|
5322
|
-
function
|
|
5449
|
+
function _M0FP26altsia6altsia16source__char__at(source, i) {
|
|
5450
|
+
const _p = _M0MP311moonbitlang4core6string6String9get__char(source, i);
|
|
5451
|
+
return _p === -1 ? $panic() : _p;
|
|
5452
|
+
}
|
|
5453
|
+
function _M0FP26altsia6altsia16line__column__at(source, offset) {
|
|
5454
|
+
const clamped = offset < 0 ? 0 : offset > source.length ? source.length : offset;
|
|
5455
|
+
let line = 1;
|
|
5456
|
+
let column = 1;
|
|
5457
|
+
let _tmp = 0;
|
|
5458
|
+
while (true) {
|
|
5459
|
+
const i = _tmp;
|
|
5460
|
+
if (i < clamped) {
|
|
5461
|
+
if (_M0FP26altsia6altsia16source__char__at(source, i) === 10) {
|
|
5462
|
+
line = line + 1 | 0;
|
|
5463
|
+
column = 1;
|
|
5464
|
+
} else {
|
|
5465
|
+
column = column + 1 | 0;
|
|
5466
|
+
}
|
|
5467
|
+
_tmp = i + 1 | 0;
|
|
5468
|
+
continue;
|
|
5469
|
+
} else {
|
|
5470
|
+
break;
|
|
5471
|
+
}
|
|
5472
|
+
}
|
|
5473
|
+
return { _0: line, _1: column };
|
|
5474
|
+
}
|
|
5475
|
+
function _M0FP26altsia6altsia26source__loc__from__offsets(source, start_offset, end_offset) {
|
|
5476
|
+
const safe_start = start_offset < 0 ? 0 : start_offset > source.length ? source.length : start_offset;
|
|
5477
|
+
const safe_end = end_offset < safe_start ? safe_start : end_offset > source.length ? source.length : end_offset;
|
|
5478
|
+
const _bind = _M0FP26altsia6altsia16line__column__at(source, safe_start);
|
|
5479
|
+
const _line = _bind._0;
|
|
5480
|
+
const _column = _bind._1;
|
|
5481
|
+
return { start_offset: safe_start, end_offset: safe_end, line: _line, column: _column };
|
|
5482
|
+
}
|
|
5483
|
+
function _M0FP26altsia6altsia26validate__normalize__range(source, start_offset, end_offset) {
|
|
5484
|
+
const source_length = source.length;
|
|
5485
|
+
if (start_offset >= 0 && (end_offset >= 0 && (start_offset <= source_length && (end_offset <= source_length && start_offset <= end_offset)))) {
|
|
5486
|
+
return new Result$Ok$19$({ _0: start_offset, _1: end_offset });
|
|
5487
|
+
}
|
|
5488
|
+
const loc_offset = start_offset < 0 ? 0 : start_offset > source_length ? source_length : start_offset;
|
|
5489
|
+
return new Result$Err$20$(new Error$altsia$47$altsia$46$Stage1NormalizeError$46$InvalidRange(start_offset, end_offset, source_length, _M0FP26altsia6altsia26source__loc__from__offsets(source, loc_offset, loc_offset)));
|
|
5490
|
+
}
|
|
5491
|
+
function _M0FP26altsia6altsia23range__intersects__node(node, range_start, range_end) {
|
|
5492
|
+
const loc = _M0MP26altsia6altsia8SpannedS3loc(node);
|
|
5493
|
+
return loc.end_offset > range_start && loc.start_offset < range_end;
|
|
5494
|
+
}
|
|
5495
|
+
function _M0FP26altsia6altsia22selected__node__bounds(nodes, range_start, range_end) {
|
|
5496
|
+
let first = -1;
|
|
5497
|
+
let last = -1;
|
|
5498
|
+
const _end505 = nodes.length;
|
|
5499
|
+
let _tmp = 0;
|
|
5500
|
+
while (true) {
|
|
5501
|
+
const i = _tmp;
|
|
5502
|
+
if (i < _end505) {
|
|
5503
|
+
if (_M0FP26altsia6altsia23range__intersects__node(_M0MP311moonbitlang4core5array5Array2atGRP26altsia6altsia8SpannedSE(nodes, i), range_start, range_end)) {
|
|
5504
|
+
if (first === -1) {
|
|
5505
|
+
first = i;
|
|
5506
|
+
}
|
|
5507
|
+
last = i;
|
|
5508
|
+
}
|
|
5509
|
+
_tmp = i + 1 | 0;
|
|
5510
|
+
continue;
|
|
5511
|
+
} else {
|
|
5512
|
+
break;
|
|
5513
|
+
}
|
|
5514
|
+
}
|
|
5515
|
+
return first === -1 ? undefined : { _0: first, _1: last };
|
|
5516
|
+
}
|
|
5517
|
+
function _M0FP26altsia6altsia23is__fmt__off__directive(node) {
|
|
5323
5518
|
if (node.$tag === 2) {
|
|
5324
5519
|
const _App = node;
|
|
5325
5520
|
const _x = _App._0;
|
|
@@ -5333,7 +5528,7 @@ function _M0FP26altsia6altsia24is__fmt__skip__directive(node) {
|
|
|
5333
5528
|
if (_x$4.$tag === 0) {
|
|
5334
5529
|
const _Text$2 = _x$4;
|
|
5335
5530
|
const _x$5 = _Text$2._0;
|
|
5336
|
-
if (_x$5 === "altsia-fmt-
|
|
5531
|
+
if (_x$5 === "altsia-fmt-off") {
|
|
5337
5532
|
return true;
|
|
5338
5533
|
} else {
|
|
5339
5534
|
return false;
|
|
@@ -5354,18 +5549,25 @@ function _M0FP26altsia6altsia24is__fmt__skip__directive(node) {
|
|
|
5354
5549
|
return false;
|
|
5355
5550
|
}
|
|
5356
5551
|
}
|
|
5357
|
-
function
|
|
5358
|
-
if (
|
|
5359
|
-
const
|
|
5360
|
-
|
|
5361
|
-
|
|
5362
|
-
const _x$2 =
|
|
5363
|
-
if (_x$2 ===
|
|
5364
|
-
const
|
|
5365
|
-
|
|
5366
|
-
|
|
5367
|
-
|
|
5368
|
-
|
|
5552
|
+
function _M0FP26altsia6altsia22is__fmt__on__directive(node) {
|
|
5553
|
+
if (node.$tag === 2) {
|
|
5554
|
+
const _App = node;
|
|
5555
|
+
const _x = _App._0;
|
|
5556
|
+
if (_x.length === 2) {
|
|
5557
|
+
const _x$2 = _x[0];
|
|
5558
|
+
if (_x$2.$tag === 0) {
|
|
5559
|
+
const _Text = _x$2;
|
|
5560
|
+
const _x$3 = _Text._0;
|
|
5561
|
+
if (_x$3 === "%") {
|
|
5562
|
+
const _x$4 = _x[1];
|
|
5563
|
+
if (_x$4.$tag === 0) {
|
|
5564
|
+
const _Text$2 = _x$4;
|
|
5565
|
+
const _x$5 = _Text$2._0;
|
|
5566
|
+
if (_x$5 === "altsia-fmt-on") {
|
|
5567
|
+
return true;
|
|
5568
|
+
} else {
|
|
5569
|
+
return false;
|
|
5570
|
+
}
|
|
5369
5571
|
} else {
|
|
5370
5572
|
return false;
|
|
5371
5573
|
}
|
|
@@ -5382,28 +5584,279 @@ function _M0FP26altsia6altsia29is__template__definition__app(args) {
|
|
|
5382
5584
|
return false;
|
|
5383
5585
|
}
|
|
5384
5586
|
}
|
|
5385
|
-
function
|
|
5386
|
-
|
|
5387
|
-
|
|
5388
|
-
|
|
5389
|
-
|
|
5390
|
-
|
|
5391
|
-
|
|
5392
|
-
|
|
5393
|
-
|
|
5394
|
-
|
|
5395
|
-
|
|
5396
|
-
|
|
5397
|
-
|
|
5398
|
-
|
|
5399
|
-
|
|
5587
|
+
function _M0FP26altsia6altsia24is__fmt__skip__directive(node) {
|
|
5588
|
+
if (node.$tag === 2) {
|
|
5589
|
+
const _App = node;
|
|
5590
|
+
const _x = _App._0;
|
|
5591
|
+
if (_x.length === 2) {
|
|
5592
|
+
const _x$2 = _x[0];
|
|
5593
|
+
if (_x$2.$tag === 0) {
|
|
5594
|
+
const _Text = _x$2;
|
|
5595
|
+
const _x$3 = _Text._0;
|
|
5596
|
+
if (_x$3 === "%") {
|
|
5597
|
+
const _x$4 = _x[1];
|
|
5598
|
+
if (_x$4.$tag === 0) {
|
|
5599
|
+
const _Text$2 = _x$4;
|
|
5600
|
+
const _x$5 = _Text$2._0;
|
|
5601
|
+
if (_x$5 === "altsia-fmt-skip") {
|
|
5602
|
+
return true;
|
|
5603
|
+
} else {
|
|
5604
|
+
return false;
|
|
5605
|
+
}
|
|
5606
|
+
} else {
|
|
5607
|
+
return false;
|
|
5608
|
+
}
|
|
5609
|
+
} else {
|
|
5610
|
+
return false;
|
|
5611
|
+
}
|
|
5612
|
+
} else {
|
|
5613
|
+
return false;
|
|
5614
|
+
}
|
|
5615
|
+
} else {
|
|
5616
|
+
return false;
|
|
5400
5617
|
}
|
|
5618
|
+
} else {
|
|
5619
|
+
return false;
|
|
5401
5620
|
}
|
|
5402
5621
|
}
|
|
5403
|
-
function
|
|
5404
|
-
|
|
5622
|
+
function _M0FP26altsia6altsia20state__before__index(nodes, index) {
|
|
5623
|
+
let fmt_enabled = true;
|
|
5624
|
+
let skip_next = false;
|
|
5625
|
+
let _tmp = 0;
|
|
5626
|
+
while (true) {
|
|
5627
|
+
const i = _tmp;
|
|
5628
|
+
if (i < index) {
|
|
5629
|
+
_L: {
|
|
5630
|
+
const node = _M0MP311moonbitlang4core5array5Array2atGRP26altsia6altsia8SpannedSE(nodes, i);
|
|
5631
|
+
if (_M0FP26altsia6altsia22is__fmt__on__directive(node)) {
|
|
5632
|
+
fmt_enabled = true;
|
|
5633
|
+
skip_next = false;
|
|
5634
|
+
break _L;
|
|
5635
|
+
}
|
|
5636
|
+
if (_M0FP26altsia6altsia23is__fmt__off__directive(node)) {
|
|
5637
|
+
fmt_enabled = false;
|
|
5638
|
+
skip_next = false;
|
|
5639
|
+
break _L;
|
|
5640
|
+
}
|
|
5641
|
+
if (!fmt_enabled) {
|
|
5642
|
+
break _L;
|
|
5643
|
+
}
|
|
5644
|
+
if (skip_next) {
|
|
5645
|
+
skip_next = false;
|
|
5646
|
+
break _L;
|
|
5647
|
+
}
|
|
5648
|
+
if (_M0FP26altsia6altsia24is__fmt__skip__directive(node)) {
|
|
5649
|
+
skip_next = true;
|
|
5650
|
+
break _L;
|
|
5651
|
+
}
|
|
5652
|
+
break _L;
|
|
5653
|
+
}
|
|
5654
|
+
_tmp = i + 1 | 0;
|
|
5655
|
+
continue;
|
|
5656
|
+
} else {
|
|
5657
|
+
break;
|
|
5658
|
+
}
|
|
5659
|
+
}
|
|
5660
|
+
return { _0: fmt_enabled, _1: skip_next };
|
|
5661
|
+
}
|
|
5662
|
+
function _M0FP26altsia6altsia29is__template__definition__app(args) {
|
|
5663
|
+
if (args.length >= 3) {
|
|
5664
|
+
const _x = args[0];
|
|
5665
|
+
if (_x.$tag === 0) {
|
|
5666
|
+
const _Text = _x;
|
|
5667
|
+
const _x$2 = _Text._0;
|
|
5668
|
+
if (_x$2 === "λ") {
|
|
5669
|
+
const _x$3 = args[1];
|
|
5670
|
+
if (_x$3.$tag === 0) {
|
|
5671
|
+
const _x$4 = args[2];
|
|
5672
|
+
if (_x$4.$tag === 2) {
|
|
5673
|
+
return true;
|
|
5674
|
+
} else {
|
|
5675
|
+
return false;
|
|
5676
|
+
}
|
|
5677
|
+
} else {
|
|
5678
|
+
return false;
|
|
5679
|
+
}
|
|
5680
|
+
} else {
|
|
5681
|
+
return false;
|
|
5682
|
+
}
|
|
5683
|
+
} else {
|
|
5684
|
+
return false;
|
|
5685
|
+
}
|
|
5686
|
+
} else {
|
|
5687
|
+
return false;
|
|
5688
|
+
}
|
|
5689
|
+
}
|
|
5690
|
+
function _M0FP26altsia6altsia21contains__fmt__toggle(node) {
|
|
5691
|
+
if (_M0FP26altsia6altsia22is__fmt__on__directive(node) || _M0FP26altsia6altsia23is__fmt__off__directive(node)) {
|
|
5692
|
+
return true;
|
|
5693
|
+
}
|
|
5694
|
+
if (node.$tag === 2) {
|
|
5695
|
+
const _App = node;
|
|
5696
|
+
const _args = _App._0;
|
|
5697
|
+
const _p = _M0MP311moonbitlang4core5array5Array4iterGRP26altsia6altsia8SpannedSE(_args);
|
|
5698
|
+
while (true) {
|
|
5699
|
+
const _p$2 = _M0MP311moonbitlang4core7builtin4Iter4nextGRP26altsia6altsia8SpannedSE(_p);
|
|
5700
|
+
if (_p$2 === undefined) {
|
|
5701
|
+
return false;
|
|
5702
|
+
} else {
|
|
5703
|
+
const _p$3 = _p$2;
|
|
5704
|
+
const _p$4 = _p$3;
|
|
5705
|
+
if (_M0FP26altsia6altsia21contains__fmt__toggle(_p$4)) {
|
|
5706
|
+
return true;
|
|
5707
|
+
}
|
|
5708
|
+
continue;
|
|
5709
|
+
}
|
|
5710
|
+
}
|
|
5711
|
+
} else {
|
|
5712
|
+
return false;
|
|
5713
|
+
}
|
|
5714
|
+
}
|
|
5715
|
+
function _M0FP26altsia6altsia13indent__block(text, prefix) {
|
|
5716
|
+
return _M0MP311moonbitlang4core7builtin4Iter4join(_M0MP311moonbitlang4core7builtin4Iter3mapGssE(_M0MP311moonbitlang4core7builtin4Iter3mapGRP311moonbitlang4core6string10StringViewsE(_M0MP311moonbitlang4core6string6String5split(text, { str: _M0FP26altsia6altsia30indent__block_2e_2abind_7c2576, start: 0, end: _M0FP26altsia6altsia30indent__block_2e_2abind_7c2576.length }), _M0IP311moonbitlang4core6string10StringViewP311moonbitlang4core7builtin4Show10to__string), (line) => `${prefix}${line}`), "\n");
|
|
5717
|
+
}
|
|
5718
|
+
function _M0FP26altsia6altsia19render__inline__app(parts, nested_flags, max_width) {
|
|
5719
|
+
const single_line = `(${_M0MP311moonbitlang4core5array5Array4joinGsE(parts, { str: _M0FP26altsia6altsia36render__inline__app_2e_2abind_7c2585, start: 0, end: _M0FP26altsia6altsia36render__inline__app_2e_2abind_7c2585.length })})`;
|
|
5720
|
+
if (_M0FP36altsia6altsia14display__width22string__display__width(single_line) <= max_width) {
|
|
5721
|
+
return single_line;
|
|
5722
|
+
}
|
|
5723
|
+
if (!_M0MP311moonbitlang4core5array5Array8containsGbE(nested_flags, true)) {
|
|
5724
|
+
return single_line;
|
|
5725
|
+
}
|
|
5726
|
+
let first_nested = -1;
|
|
5727
|
+
const _end450 = nested_flags.length;
|
|
5728
|
+
let _tmp = 0;
|
|
5729
|
+
while (true) {
|
|
5730
|
+
const i = _tmp;
|
|
5731
|
+
if (i < _end450) {
|
|
5732
|
+
if (_M0MP311moonbitlang4core5array5Array2atGbE(nested_flags, i)) {
|
|
5733
|
+
first_nested = i;
|
|
5734
|
+
break;
|
|
5735
|
+
}
|
|
5736
|
+
_tmp = i + 1 | 0;
|
|
5737
|
+
continue;
|
|
5738
|
+
} else {
|
|
5739
|
+
break;
|
|
5740
|
+
}
|
|
5741
|
+
}
|
|
5742
|
+
if (first_nested === -1) {
|
|
5743
|
+
return single_line;
|
|
5744
|
+
}
|
|
5745
|
+
const header = first_nested === 0 ? "(" : `(${_M0MP311moonbitlang4core5array9ArrayView4joinGsE(_M0MP311moonbitlang4core5array5Array12view_2einnerGsE(parts, 0, first_nested), { str: _M0FP26altsia6altsia36render__inline__app_2e_2abind_7c2584, start: 0, end: _M0FP26altsia6altsia36render__inline__app_2e_2abind_7c2584.length })}`;
|
|
5746
|
+
const groups = [];
|
|
5747
|
+
let current_group = _M0MP311moonbitlang4core5array5Array2atGsE(parts, first_nested);
|
|
5748
|
+
const _start457 = first_nested + 1 | 0;
|
|
5749
|
+
const _end458 = parts.length;
|
|
5750
|
+
let _tmp$2 = _start457;
|
|
5751
|
+
while (true) {
|
|
5752
|
+
const i = _tmp$2;
|
|
5753
|
+
if (i < _end458) {
|
|
5754
|
+
if (_M0MP311moonbitlang4core5array5Array2atGbE(nested_flags, i)) {
|
|
5755
|
+
_M0MP311moonbitlang4core5array5Array4pushGsE(groups, current_group);
|
|
5756
|
+
current_group = _M0MP311moonbitlang4core5array5Array2atGsE(parts, i);
|
|
5757
|
+
} else {
|
|
5758
|
+
current_group = `${current_group} ${_M0MP311moonbitlang4core5array5Array2atGsE(parts, i)}`;
|
|
5759
|
+
}
|
|
5760
|
+
_tmp$2 = i + 1 | 0;
|
|
5761
|
+
continue;
|
|
5762
|
+
} else {
|
|
5763
|
+
break;
|
|
5764
|
+
}
|
|
5765
|
+
}
|
|
5766
|
+
_M0MP311moonbitlang4core5array5Array4pushGsE(groups, current_group);
|
|
5767
|
+
const content_max = max_width - 2 | 0;
|
|
5768
|
+
const packed_lines = [];
|
|
5769
|
+
let current_line = "";
|
|
5770
|
+
const _len = groups.length;
|
|
5771
|
+
let _tmp$3 = 0;
|
|
5772
|
+
while (true) {
|
|
5773
|
+
const _i = _tmp$3;
|
|
5774
|
+
if (_i < _len) {
|
|
5775
|
+
_L: {
|
|
5776
|
+
const group = groups[_i];
|
|
5777
|
+
if (current_line === "") {
|
|
5778
|
+
current_line = group;
|
|
5779
|
+
break _L;
|
|
5780
|
+
}
|
|
5781
|
+
const candidate = `${current_line} ${group}`;
|
|
5782
|
+
if (_M0FP36altsia6altsia14display__width22string__display__width(candidate) <= content_max) {
|
|
5783
|
+
current_line = candidate;
|
|
5784
|
+
} else {
|
|
5785
|
+
_M0MP311moonbitlang4core5array5Array4pushGsE(packed_lines, current_line);
|
|
5786
|
+
current_line = group;
|
|
5787
|
+
}
|
|
5788
|
+
break _L;
|
|
5789
|
+
}
|
|
5790
|
+
_tmp$3 = _i + 1 | 0;
|
|
5791
|
+
continue;
|
|
5792
|
+
} else {
|
|
5793
|
+
break;
|
|
5794
|
+
}
|
|
5795
|
+
}
|
|
5796
|
+
const _p = current_line;
|
|
5797
|
+
const _p$2 = "";
|
|
5798
|
+
if (!(_p === _p$2)) {
|
|
5799
|
+
_M0MP311moonbitlang4core5array5Array4pushGsE(packed_lines, current_line);
|
|
5800
|
+
}
|
|
5801
|
+
const last_line_index = packed_lines.length - 1 | 0;
|
|
5802
|
+
_M0MP311moonbitlang4core5array5Array3setGsE(packed_lines, last_line_index, `${_M0MP311moonbitlang4core5array5Array2atGsE(packed_lines, last_line_index)} )`);
|
|
5803
|
+
const _p$3 = new Array(packed_lines.length);
|
|
5804
|
+
const _p$4 = packed_lines.length;
|
|
5805
|
+
let _tmp$4 = 0;
|
|
5806
|
+
while (true) {
|
|
5807
|
+
const _p$5 = _tmp$4;
|
|
5808
|
+
if (_p$5 < _p$4) {
|
|
5809
|
+
const _p$6 = packed_lines[_p$5];
|
|
5810
|
+
_p$3[_p$5] = ` ${_p$6}`;
|
|
5811
|
+
_tmp$4 = _p$5 + 1 | 0;
|
|
5812
|
+
continue;
|
|
5813
|
+
} else {
|
|
5814
|
+
break;
|
|
5815
|
+
}
|
|
5816
|
+
}
|
|
5817
|
+
const indented_lines = _p$3;
|
|
5818
|
+
return `${header}\n${_M0MP311moonbitlang4core5array5Array4joinGsE(indented_lines, { str: _M0FP26altsia6altsia36render__inline__app_2e_2abind_7c2583, start: 0, end: _M0FP26altsia6altsia36render__inline__app_2e_2abind_7c2583.length })}`;
|
|
5819
|
+
}
|
|
5820
|
+
function _M0FP26altsia6altsia26normalize__node__canonical(node, source, max_width, fmt_enabled) {
|
|
5821
|
+
if (!fmt_enabled) {
|
|
5822
|
+
_L: {
|
|
5823
|
+
switch (node.$tag) {
|
|
5824
|
+
case 0: {
|
|
5825
|
+
break _L;
|
|
5826
|
+
}
|
|
5827
|
+
case 1: {
|
|
5828
|
+
break _L;
|
|
5829
|
+
}
|
|
5830
|
+
default: {
|
|
5831
|
+
const _App = node;
|
|
5832
|
+
const _args = _App._0;
|
|
5833
|
+
return _M0FP26altsia6altsia21contains__fmt__toggle(node) ? (_M0FP26altsia6altsia29is__template__definition__app(_args) ? _M0FP26altsia6altsia32normalize__template__app_2einner(_args, source, max_width, false) : _M0FP26altsia6altsia34normalize__app__with__skip_2einner(_args, source, max_width, false)) : _M0FP26altsia6altsia17raw__term__source(source, node);
|
|
5834
|
+
}
|
|
5835
|
+
}
|
|
5836
|
+
}
|
|
5837
|
+
return _M0FP26altsia6altsia17raw__term__source(source, node);
|
|
5838
|
+
} else {
|
|
5839
|
+
switch (node.$tag) {
|
|
5840
|
+
case 0: {
|
|
5841
|
+
return _M0IP26altsia6altsia1SP26altsia6altsia8ToSource10to__source(_M0MP26altsia6altsia8SpannedS11erase__span(node));
|
|
5842
|
+
}
|
|
5843
|
+
case 1: {
|
|
5844
|
+
return _M0IP26altsia6altsia1SP26altsia6altsia8ToSource10to__source(_M0MP26altsia6altsia8SpannedS11erase__span(node));
|
|
5845
|
+
}
|
|
5846
|
+
default: {
|
|
5847
|
+
const _App = node;
|
|
5848
|
+
const _args = _App._0;
|
|
5849
|
+
return _M0FP26altsia6altsia29is__template__definition__app(_args) ? _M0FP26altsia6altsia32normalize__template__app_2einner(_args, source, max_width, true) : _M0FP26altsia6altsia34normalize__app__with__skip_2einner(_args, source, max_width, true);
|
|
5850
|
+
}
|
|
5851
|
+
}
|
|
5852
|
+
}
|
|
5853
|
+
}
|
|
5854
|
+
function _M0FP26altsia6altsia34normalize__app__with__skip_2einner(args, source, max_width, fmt_enabled_init) {
|
|
5855
|
+
const inline_parts = [];
|
|
5856
|
+
const inline_nested = [];
|
|
5405
5857
|
const blocks = [];
|
|
5406
5858
|
let skip_next = false;
|
|
5859
|
+
let fmt_enabled = fmt_enabled_init;
|
|
5407
5860
|
const _len = args.length;
|
|
5408
5861
|
let _tmp = 0;
|
|
5409
5862
|
while (true) {
|
|
@@ -5411,24 +5864,78 @@ function _M0FP26altsia6altsia26normalize__app__with__skip(args, source, max_widt
|
|
|
5411
5864
|
if (_i < _len) {
|
|
5412
5865
|
_L: {
|
|
5413
5866
|
const arg = args[_i];
|
|
5867
|
+
if (_M0FP26altsia6altsia22is__fmt__on__directive(arg)) {
|
|
5868
|
+
_M0MP311moonbitlang4core5array5Array4pushGsE(inline_parts, _M0FP26altsia6altsia26normalize__node__canonical(arg, source, max_width, true));
|
|
5869
|
+
_M0MP311moonbitlang4core5array5Array4pushGbE(inline_nested, false);
|
|
5870
|
+
fmt_enabled = true;
|
|
5871
|
+
skip_next = false;
|
|
5872
|
+
break _L;
|
|
5873
|
+
}
|
|
5874
|
+
if (_M0FP26altsia6altsia23is__fmt__off__directive(arg)) {
|
|
5875
|
+
_M0MP311moonbitlang4core5array5Array4pushGsE(inline_parts, _M0FP26altsia6altsia26normalize__node__canonical(arg, source, max_width, true));
|
|
5876
|
+
_M0MP311moonbitlang4core5array5Array4pushGbE(inline_nested, false);
|
|
5877
|
+
fmt_enabled = false;
|
|
5878
|
+
skip_next = false;
|
|
5879
|
+
break _L;
|
|
5880
|
+
}
|
|
5881
|
+
if (!fmt_enabled) {
|
|
5882
|
+
const rendered = _M0FP26altsia6altsia21contains__fmt__toggle(arg) ? _M0FP26altsia6altsia26normalize__node__canonical(arg, source, max_width, false) : _M0FP26altsia6altsia17raw__term__source(source, arg);
|
|
5883
|
+
switch (arg.$tag) {
|
|
5884
|
+
case 1: {
|
|
5885
|
+
_M0MP311moonbitlang4core5array5Array4pushGsE(blocks, rendered);
|
|
5886
|
+
break;
|
|
5887
|
+
}
|
|
5888
|
+
case 2: {
|
|
5889
|
+
_M0MP311moonbitlang4core5array5Array4pushGsE(inline_parts, rendered);
|
|
5890
|
+
_M0MP311moonbitlang4core5array5Array4pushGbE(inline_nested, true);
|
|
5891
|
+
break;
|
|
5892
|
+
}
|
|
5893
|
+
default: {
|
|
5894
|
+
_M0MP311moonbitlang4core5array5Array4pushGsE(inline_parts, rendered);
|
|
5895
|
+
_M0MP311moonbitlang4core5array5Array4pushGbE(inline_nested, false);
|
|
5896
|
+
}
|
|
5897
|
+
}
|
|
5898
|
+
break _L;
|
|
5899
|
+
}
|
|
5414
5900
|
if (skip_next) {
|
|
5415
|
-
|
|
5416
|
-
|
|
5417
|
-
|
|
5418
|
-
|
|
5901
|
+
switch (arg.$tag) {
|
|
5902
|
+
case 1: {
|
|
5903
|
+
_M0MP311moonbitlang4core5array5Array4pushGsE(blocks, _M0FP26altsia6altsia17raw__term__source(source, arg));
|
|
5904
|
+
break;
|
|
5905
|
+
}
|
|
5906
|
+
case 2: {
|
|
5907
|
+
_M0MP311moonbitlang4core5array5Array4pushGsE(inline_parts, _M0FP26altsia6altsia17raw__term__source(source, arg));
|
|
5908
|
+
_M0MP311moonbitlang4core5array5Array4pushGbE(inline_nested, true);
|
|
5909
|
+
break;
|
|
5910
|
+
}
|
|
5911
|
+
default: {
|
|
5912
|
+
_M0MP311moonbitlang4core5array5Array4pushGsE(inline_parts, _M0FP26altsia6altsia17raw__term__source(source, arg));
|
|
5913
|
+
_M0MP311moonbitlang4core5array5Array4pushGbE(inline_nested, false);
|
|
5914
|
+
}
|
|
5419
5915
|
}
|
|
5420
5916
|
skip_next = false;
|
|
5421
5917
|
break _L;
|
|
5422
5918
|
}
|
|
5423
5919
|
if (_M0FP26altsia6altsia24is__fmt__skip__directive(arg)) {
|
|
5424
|
-
_M0MP311moonbitlang4core5array5Array4pushGsE(inline_parts, _M0FP26altsia6altsia26normalize__node__canonical(arg, source, max_width));
|
|
5920
|
+
_M0MP311moonbitlang4core5array5Array4pushGsE(inline_parts, _M0FP26altsia6altsia26normalize__node__canonical(arg, source, max_width, true));
|
|
5921
|
+
_M0MP311moonbitlang4core5array5Array4pushGbE(inline_nested, false);
|
|
5425
5922
|
skip_next = true;
|
|
5426
5923
|
break _L;
|
|
5427
5924
|
}
|
|
5428
|
-
|
|
5429
|
-
|
|
5430
|
-
|
|
5431
|
-
|
|
5925
|
+
switch (arg.$tag) {
|
|
5926
|
+
case 1: {
|
|
5927
|
+
_M0MP311moonbitlang4core5array5Array4pushGsE(blocks, _M0FP26altsia6altsia26normalize__node__canonical(arg, source, max_width, true));
|
|
5928
|
+
break;
|
|
5929
|
+
}
|
|
5930
|
+
case 2: {
|
|
5931
|
+
_M0MP311moonbitlang4core5array5Array4pushGsE(inline_parts, _M0FP26altsia6altsia26normalize__node__canonical(arg, source, max_width, true));
|
|
5932
|
+
_M0MP311moonbitlang4core5array5Array4pushGbE(inline_nested, true);
|
|
5933
|
+
break;
|
|
5934
|
+
}
|
|
5935
|
+
default: {
|
|
5936
|
+
_M0MP311moonbitlang4core5array5Array4pushGsE(inline_parts, _M0FP26altsia6altsia26normalize__node__canonical(arg, source, max_width, true));
|
|
5937
|
+
_M0MP311moonbitlang4core5array5Array4pushGbE(inline_nested, false);
|
|
5938
|
+
}
|
|
5432
5939
|
}
|
|
5433
5940
|
break _L;
|
|
5434
5941
|
}
|
|
@@ -5438,13 +5945,13 @@ function _M0FP26altsia6altsia26normalize__app__with__skip(args, source, max_widt
|
|
|
5438
5945
|
break;
|
|
5439
5946
|
}
|
|
5440
5947
|
}
|
|
5441
|
-
const app_line =
|
|
5442
|
-
return blocks.length === 0 ? app_line : `${app_line}\n${_M0MP311moonbitlang4core5array5Array4joinGsE(blocks, { str:
|
|
5948
|
+
const app_line = _M0FP26altsia6altsia19render__inline__app(inline_parts, inline_nested, max_width);
|
|
5949
|
+
return blocks.length === 0 ? app_line : `${app_line}\n${_M0MP311moonbitlang4core5array5Array4joinGsE(blocks, { str: _M0FP26altsia6altsia51normalize__app__with__skip_2einner_2e_2abind_7c2645, start: 0, end: _M0FP26altsia6altsia51normalize__app__with__skip_2einner_2e_2abind_7c2645.length })}`;
|
|
5443
5950
|
}
|
|
5444
|
-
function
|
|
5445
|
-
const parts =
|
|
5446
|
-
const single_line = `(${_M0MP311moonbitlang4core5array5Array4joinGsE(parts, { str:
|
|
5447
|
-
if (single_line
|
|
5951
|
+
function _M0FP26altsia6altsia32normalize__template__app_2einner(args, source, max_width, fmt_enabled) {
|
|
5952
|
+
const parts = _M0FP26altsia6altsia34normalize__template__parts_2einner(args, source, max_width, fmt_enabled);
|
|
5953
|
+
const single_line = `(${_M0MP311moonbitlang4core5array5Array4joinGsE(parts, { str: _M0FP26altsia6altsia49normalize__template__app_2einner_2e_2abind_7c2656, start: 0, end: _M0FP26altsia6altsia49normalize__template__app_2einner_2e_2abind_7c2656.length })})`;
|
|
5954
|
+
if (_M0FP36altsia6altsia14display__width22string__display__width(single_line) <= max_width) {
|
|
5448
5955
|
return single_line;
|
|
5449
5956
|
}
|
|
5450
5957
|
if (parts.length <= 3) {
|
|
@@ -5468,11 +5975,12 @@ function _M0FP26altsia6altsia24normalize__template__app(args, source, max_width)
|
|
|
5468
5975
|
}
|
|
5469
5976
|
const last_line_index = body_lines.length - 1 | 0;
|
|
5470
5977
|
_M0MP311moonbitlang4core5array5Array3setGsE(body_lines, last_line_index, `${_M0MP311moonbitlang4core5array5Array2atGsE(body_lines, last_line_index)} )`);
|
|
5471
|
-
return `${header}\n${_M0MP311moonbitlang4core5array5Array4joinGsE(body_lines, { str:
|
|
5978
|
+
return `${header}\n${_M0MP311moonbitlang4core5array5Array4joinGsE(body_lines, { str: _M0FP26altsia6altsia49normalize__template__app_2einner_2e_2abind_7c2655, start: 0, end: _M0FP26altsia6altsia49normalize__template__app_2einner_2e_2abind_7c2655.length })}`;
|
|
5472
5979
|
}
|
|
5473
|
-
function
|
|
5980
|
+
function _M0FP26altsia6altsia34normalize__template__parts_2einner(args, source, max_width, fmt_enabled_init) {
|
|
5474
5981
|
const parts = [];
|
|
5475
5982
|
let skip_next = false;
|
|
5983
|
+
let fmt_enabled = fmt_enabled_init;
|
|
5476
5984
|
const _len = args.length;
|
|
5477
5985
|
let _tmp = 0;
|
|
5478
5986
|
while (true) {
|
|
@@ -5480,17 +5988,37 @@ function _M0FP26altsia6altsia26normalize__template__parts(args, source, max_widt
|
|
|
5480
5988
|
if (_i < _len) {
|
|
5481
5989
|
_L: {
|
|
5482
5990
|
const arg = args[_i];
|
|
5991
|
+
if (_M0FP26altsia6altsia22is__fmt__on__directive(arg)) {
|
|
5992
|
+
_M0MP311moonbitlang4core5array5Array4pushGsE(parts, _M0FP26altsia6altsia26normalize__node__canonical(arg, source, max_width, true));
|
|
5993
|
+
fmt_enabled = true;
|
|
5994
|
+
skip_next = false;
|
|
5995
|
+
break _L;
|
|
5996
|
+
}
|
|
5997
|
+
if (_M0FP26altsia6altsia23is__fmt__off__directive(arg)) {
|
|
5998
|
+
_M0MP311moonbitlang4core5array5Array4pushGsE(parts, _M0FP26altsia6altsia26normalize__node__canonical(arg, source, max_width, true));
|
|
5999
|
+
fmt_enabled = false;
|
|
6000
|
+
skip_next = false;
|
|
6001
|
+
break _L;
|
|
6002
|
+
}
|
|
6003
|
+
if (!fmt_enabled) {
|
|
6004
|
+
if (_M0FP26altsia6altsia21contains__fmt__toggle(arg)) {
|
|
6005
|
+
_M0MP311moonbitlang4core5array5Array4pushGsE(parts, _M0FP26altsia6altsia26normalize__node__canonical(arg, source, max_width, false));
|
|
6006
|
+
} else {
|
|
6007
|
+
_M0MP311moonbitlang4core5array5Array4pushGsE(parts, _M0FP26altsia6altsia17raw__term__source(source, arg));
|
|
6008
|
+
}
|
|
6009
|
+
break _L;
|
|
6010
|
+
}
|
|
5483
6011
|
if (skip_next) {
|
|
5484
6012
|
_M0MP311moonbitlang4core5array5Array4pushGsE(parts, _M0FP26altsia6altsia17raw__term__source(source, arg));
|
|
5485
6013
|
skip_next = false;
|
|
5486
6014
|
break _L;
|
|
5487
6015
|
}
|
|
5488
6016
|
if (_M0FP26altsia6altsia24is__fmt__skip__directive(arg)) {
|
|
5489
|
-
_M0MP311moonbitlang4core5array5Array4pushGsE(parts, _M0FP26altsia6altsia26normalize__node__canonical(arg, source, max_width));
|
|
6017
|
+
_M0MP311moonbitlang4core5array5Array4pushGsE(parts, _M0FP26altsia6altsia26normalize__node__canonical(arg, source, max_width, true));
|
|
5490
6018
|
skip_next = true;
|
|
5491
6019
|
break _L;
|
|
5492
6020
|
}
|
|
5493
|
-
_M0MP311moonbitlang4core5array5Array4pushGsE(parts, _M0FP26altsia6altsia26normalize__node__canonical(arg, source, max_width));
|
|
6021
|
+
_M0MP311moonbitlang4core5array5Array4pushGsE(parts, _M0FP26altsia6altsia26normalize__node__canonical(arg, source, max_width, true));
|
|
5494
6022
|
break _L;
|
|
5495
6023
|
}
|
|
5496
6024
|
_tmp = _i + 1 | 0;
|
|
@@ -5501,9 +6029,10 @@ function _M0FP26altsia6altsia26normalize__template__parts(args, source, max_widt
|
|
|
5501
6029
|
}
|
|
5502
6030
|
return parts;
|
|
5503
6031
|
}
|
|
5504
|
-
function
|
|
6032
|
+
function _M0FP26altsia6altsia36normalize__nodes__with__skip_2einner(nodes, source, max_width, fmt_enabled_init, skip_next_init) {
|
|
5505
6033
|
const rendered = [];
|
|
5506
|
-
let skip_next =
|
|
6034
|
+
let skip_next = skip_next_init;
|
|
6035
|
+
let fmt_enabled = fmt_enabled_init;
|
|
5507
6036
|
const _len = nodes.length;
|
|
5508
6037
|
let _tmp = 0;
|
|
5509
6038
|
while (true) {
|
|
@@ -5511,17 +6040,37 @@ function _M0FP26altsia6altsia28normalize__nodes__with__skip(nodes, source, max_w
|
|
|
5511
6040
|
if (_i < _len) {
|
|
5512
6041
|
_L: {
|
|
5513
6042
|
const node = nodes[_i];
|
|
6043
|
+
if (_M0FP26altsia6altsia22is__fmt__on__directive(node)) {
|
|
6044
|
+
_M0MP311moonbitlang4core5array5Array4pushGsE(rendered, _M0FP26altsia6altsia26normalize__node__canonical(node, source, max_width, true));
|
|
6045
|
+
fmt_enabled = true;
|
|
6046
|
+
skip_next = false;
|
|
6047
|
+
break _L;
|
|
6048
|
+
}
|
|
6049
|
+
if (_M0FP26altsia6altsia23is__fmt__off__directive(node)) {
|
|
6050
|
+
_M0MP311moonbitlang4core5array5Array4pushGsE(rendered, _M0FP26altsia6altsia26normalize__node__canonical(node, source, max_width, true));
|
|
6051
|
+
fmt_enabled = false;
|
|
6052
|
+
skip_next = false;
|
|
6053
|
+
break _L;
|
|
6054
|
+
}
|
|
6055
|
+
if (!fmt_enabled) {
|
|
6056
|
+
if (_M0FP26altsia6altsia21contains__fmt__toggle(node)) {
|
|
6057
|
+
_M0MP311moonbitlang4core5array5Array4pushGsE(rendered, _M0FP26altsia6altsia26normalize__node__canonical(node, source, max_width, false));
|
|
6058
|
+
} else {
|
|
6059
|
+
_M0MP311moonbitlang4core5array5Array4pushGsE(rendered, _M0FP26altsia6altsia17raw__term__source(source, node));
|
|
6060
|
+
}
|
|
6061
|
+
break _L;
|
|
6062
|
+
}
|
|
5514
6063
|
if (skip_next) {
|
|
5515
6064
|
_M0MP311moonbitlang4core5array5Array4pushGsE(rendered, _M0FP26altsia6altsia17raw__term__source(source, node));
|
|
5516
6065
|
skip_next = false;
|
|
5517
6066
|
break _L;
|
|
5518
6067
|
}
|
|
5519
6068
|
if (_M0FP26altsia6altsia24is__fmt__skip__directive(node)) {
|
|
5520
|
-
_M0MP311moonbitlang4core5array5Array4pushGsE(rendered, _M0FP26altsia6altsia26normalize__node__canonical(node, source, max_width));
|
|
6069
|
+
_M0MP311moonbitlang4core5array5Array4pushGsE(rendered, _M0FP26altsia6altsia26normalize__node__canonical(node, source, max_width, true));
|
|
5521
6070
|
skip_next = true;
|
|
5522
6071
|
break _L;
|
|
5523
6072
|
}
|
|
5524
|
-
_M0MP311moonbitlang4core5array5Array4pushGsE(rendered, _M0FP26altsia6altsia26normalize__node__canonical(node, source, max_width));
|
|
6073
|
+
_M0MP311moonbitlang4core5array5Array4pushGsE(rendered, _M0FP26altsia6altsia26normalize__node__canonical(node, source, max_width, true));
|
|
5525
6074
|
break _L;
|
|
5526
6075
|
}
|
|
5527
6076
|
_tmp = _i + 1 | 0;
|
|
@@ -5530,11 +6079,11 @@ function _M0FP26altsia6altsia28normalize__nodes__with__skip(nodes, source, max_w
|
|
|
5530
6079
|
break;
|
|
5531
6080
|
}
|
|
5532
6081
|
}
|
|
5533
|
-
return _M0MP311moonbitlang4core5array5Array4joinGsE(rendered, { str:
|
|
6082
|
+
return _M0MP311moonbitlang4core5array5Array4joinGsE(rendered, { str: _M0FP26altsia6altsia53normalize__nodes__with__skip_2einner_2e_2abind_7c2679, start: 0, end: _M0FP26altsia6altsia53normalize__nodes__with__skip_2einner_2e_2abind_7c2679.length });
|
|
5534
6083
|
}
|
|
5535
6084
|
function _M0FP26altsia6altsia28append__quote__to__last__app(result, quote_content, quote_loc) {
|
|
5536
6085
|
if (result.length === 0) {
|
|
5537
|
-
return new Result$Err$
|
|
6086
|
+
return new Result$Err$21$(new Error$altsia$47$altsia$46$Stage1Error$46$QuoteBlockRequiresPrecedingApp(quote_loc));
|
|
5538
6087
|
}
|
|
5539
6088
|
const last_index = result.length - 1 | 0;
|
|
5540
6089
|
_L: {
|
|
@@ -5547,7 +6096,7 @@ function _M0FP26altsia6altsia28append__quote__to__last__app(result, quote_conten
|
|
|
5547
6096
|
const updated = [];
|
|
5548
6097
|
_M0MP311moonbitlang4core5array5Array6appendGRP26altsia6altsia8SpannedSE(updated, { buf: _args, start: 0, end: _args.length });
|
|
5549
6098
|
_M0MP311moonbitlang4core5array5Array4pushGRP26altsia6altsia8SpannedSE(updated, new SpannedS$Quote(quote_content, quote_loc));
|
|
5550
|
-
return new Result$Ok$
|
|
6099
|
+
return new Result$Ok$22$(_M0MP311moonbitlang4core5array5Array3setGRP26altsia6altsia8SpannedSE(result, last_index, new SpannedS$App(updated, _app_loc)));
|
|
5551
6100
|
}
|
|
5552
6101
|
case 1: {
|
|
5553
6102
|
break _L;
|
|
@@ -5557,7 +6106,7 @@ function _M0FP26altsia6altsia28append__quote__to__last__app(result, quote_conten
|
|
|
5557
6106
|
}
|
|
5558
6107
|
}
|
|
5559
6108
|
}
|
|
5560
|
-
return new Result$Err$
|
|
6109
|
+
return new Result$Err$21$(new Error$altsia$47$altsia$46$Stage1Error$46$QuoteBlockMustFollowApp(quote_loc));
|
|
5561
6110
|
}
|
|
5562
6111
|
function _M0FP26altsia6altsia15has__prefix__at(source, start, prefix) {
|
|
5563
6112
|
const end_index = start + prefix.length | 0;
|
|
@@ -5566,40 +6115,6 @@ function _M0FP26altsia6altsia15has__prefix__at(source, start, prefix) {
|
|
|
5566
6115
|
}
|
|
5567
6116
|
return source.substring(start, end_index) === prefix;
|
|
5568
6117
|
}
|
|
5569
|
-
function _M0FP26altsia6altsia16source__char__at(source, i) {
|
|
5570
|
-
const _p = _M0MP311moonbitlang4core6string6String9get__char(source, i);
|
|
5571
|
-
return _p === -1 ? $panic() : _p;
|
|
5572
|
-
}
|
|
5573
|
-
function _M0FP26altsia6altsia16line__column__at(source, offset) {
|
|
5574
|
-
const clamped = offset < 0 ? 0 : offset > source.length ? source.length : offset;
|
|
5575
|
-
let line = 1;
|
|
5576
|
-
let column = 1;
|
|
5577
|
-
let _tmp = 0;
|
|
5578
|
-
while (true) {
|
|
5579
|
-
const i = _tmp;
|
|
5580
|
-
if (i < clamped) {
|
|
5581
|
-
if (_M0FP26altsia6altsia16source__char__at(source, i) === 10) {
|
|
5582
|
-
line = line + 1 | 0;
|
|
5583
|
-
column = 1;
|
|
5584
|
-
} else {
|
|
5585
|
-
column = column + 1 | 0;
|
|
5586
|
-
}
|
|
5587
|
-
_tmp = i + 1 | 0;
|
|
5588
|
-
continue;
|
|
5589
|
-
} else {
|
|
5590
|
-
break;
|
|
5591
|
-
}
|
|
5592
|
-
}
|
|
5593
|
-
return { _0: line, _1: column };
|
|
5594
|
-
}
|
|
5595
|
-
function _M0FP26altsia6altsia26source__loc__from__offsets(source, start_offset, end_offset) {
|
|
5596
|
-
const safe_start = start_offset < 0 ? 0 : start_offset > source.length ? source.length : start_offset;
|
|
5597
|
-
const safe_end = end_offset < safe_start ? safe_start : end_offset > source.length ? source.length : end_offset;
|
|
5598
|
-
const _bind = _M0FP26altsia6altsia16line__column__at(source, safe_start);
|
|
5599
|
-
const _line = _bind._0;
|
|
5600
|
-
const _column = _bind._1;
|
|
5601
|
-
return { start_offset: safe_start, end_offset: safe_end, line: _line, column: _column };
|
|
5602
|
-
}
|
|
5603
6118
|
function _M0FP26altsia6altsia14one__char__loc(source, i) {
|
|
5604
6119
|
const start = i < 0 ? 0 : i > source.length ? source.length : i;
|
|
5605
6120
|
const end = start < source.length ? start + 1 | 0 : start;
|
|
@@ -5643,7 +6158,7 @@ function _M0FP26altsia6altsia21push__plain__argument(args, source, start, end_in
|
|
|
5643
6158
|
return undefined;
|
|
5644
6159
|
}
|
|
5645
6160
|
const raw = source.substring(_trim_start, _trim_end);
|
|
5646
|
-
const content = _M0MP311moonbitlang4core6string6String12replace__all(_M0MP311moonbitlang4core6string6String12replace__all(raw, { str:
|
|
6161
|
+
const content = _M0MP311moonbitlang4core6string6String12replace__all(_M0MP311moonbitlang4core6string6String12replace__all(raw, { str: _M0FP26altsia6altsia38push__plain__argument_2e_2abind_7c2694, start: 0, end: _M0FP26altsia6altsia38push__plain__argument_2e_2abind_7c2694.length }, { str: _M0FP26altsia6altsia38push__plain__argument_2e_2abind_7c2695, start: 0, end: _M0FP26altsia6altsia38push__plain__argument_2e_2abind_7c2695.length }), { str: _M0FP26altsia6altsia38push__plain__argument_2e_2abind_7c2696, start: 0, end: _M0FP26altsia6altsia38push__plain__argument_2e_2abind_7c2696.length }, { str: _M0FP26altsia6altsia38push__plain__argument_2e_2abind_7c2697, start: 0, end: _M0FP26altsia6altsia38push__plain__argument_2e_2abind_7c2697.length });
|
|
5647
6162
|
if (!(content === "")) {
|
|
5648
6163
|
_M0MP311moonbitlang4core5array5Array4pushGRP26altsia6altsia8SpannedSE(args, new SpannedS$Text(content, _M0FP26altsia6altsia26source__loc__from__offsets(source, _trim_start, _trim_end)));
|
|
5649
6164
|
return;
|
|
@@ -5658,19 +6173,19 @@ function _M0FP26altsia6altsia20skip__stage1__spaces(source, start) {
|
|
|
5658
6173
|
function _M0FP26altsia6altsia10parse__app(source, start) {
|
|
5659
6174
|
const len = source.length;
|
|
5660
6175
|
if (start >= len) {
|
|
5661
|
-
return new Result$Err$
|
|
6176
|
+
return new Result$Err$23$(new Error$altsia$47$altsia$46$Stage1Error$46$UnexpectedEof("application start", _M0FP26altsia6altsia8end__loc(source)));
|
|
5662
6177
|
}
|
|
5663
6178
|
if (_M0FP26altsia6altsia8char__at(source, start) !== 40) {
|
|
5664
|
-
return new Result$Err$
|
|
6179
|
+
return new Result$Err$23$(new Error$altsia$47$altsia$46$Stage1Error$46$InvalidApplicationStart(_M0FP26altsia6altsia14one__char__loc(source, start)));
|
|
5665
6180
|
}
|
|
5666
6181
|
let i = start + 1 | 0;
|
|
5667
6182
|
const args = [];
|
|
5668
6183
|
i = _M0FP26altsia6altsia20skip__stage1__spaces(source, i);
|
|
5669
6184
|
if (i >= len) {
|
|
5670
|
-
return new Result$Err$
|
|
6185
|
+
return new Result$Err$23$(new Error$altsia$47$altsia$46$Stage1Error$46$UnexpectedEof("application head", _M0FP26altsia6altsia8end__loc(source)));
|
|
5671
6186
|
}
|
|
5672
6187
|
if (_M0FP26altsia6altsia8char__at(source, i) === 41) {
|
|
5673
|
-
return new Result$Ok$
|
|
6188
|
+
return new Result$Ok$24$({ _0: new SpannedS$App(args, _M0FP26altsia6altsia26source__loc__from__offsets(source, start, i + 1 | 0)), _1: i + 1 | 0 });
|
|
5674
6189
|
}
|
|
5675
6190
|
if (_M0FP26altsia6altsia8char__at(source, i) === 40) {
|
|
5676
6191
|
const _bind = _M0FP26altsia6altsia10parse__app(source, i);
|
|
@@ -5700,9 +6215,9 @@ function _M0FP26altsia6altsia10parse__app(source, start) {
|
|
|
5700
6215
|
}
|
|
5701
6216
|
}
|
|
5702
6217
|
if (head_start === i) {
|
|
5703
|
-
return new Result$Err$
|
|
6218
|
+
return new Result$Err$23$(new Error$altsia$47$altsia$46$Stage1Error$46$EmptyApplicationHead(_M0FP26altsia6altsia14one__char__loc(source, i)));
|
|
5704
6219
|
}
|
|
5705
|
-
const head = _M0MP311moonbitlang4core6string6String12replace__all(_M0MP311moonbitlang4core6string6String12replace__all(source.substring(head_start, i), { str:
|
|
6220
|
+
const head = _M0MP311moonbitlang4core6string6String12replace__all(_M0MP311moonbitlang4core6string6String12replace__all(source.substring(head_start, i), { str: _M0FP26altsia6altsia27parse__app_2e_2abind_7c2709, start: 0, end: _M0FP26altsia6altsia27parse__app_2e_2abind_7c2709.length }, { str: _M0FP26altsia6altsia27parse__app_2e_2abind_7c2710, start: 0, end: _M0FP26altsia6altsia27parse__app_2e_2abind_7c2710.length }), { str: _M0FP26altsia6altsia27parse__app_2e_2abind_7c2711, start: 0, end: _M0FP26altsia6altsia27parse__app_2e_2abind_7c2711.length }, { str: _M0FP26altsia6altsia27parse__app_2e_2abind_7c2712, start: 0, end: _M0FP26altsia6altsia27parse__app_2e_2abind_7c2712.length });
|
|
5706
6221
|
_M0MP311moonbitlang4core5array5Array4pushGRP26altsia6altsia8SpannedSE(args, new SpannedS$Text(head, _M0FP26altsia6altsia26source__loc__from__offsets(source, head_start, i)));
|
|
5707
6222
|
}
|
|
5708
6223
|
let segment_start = -1;
|
|
@@ -5711,7 +6226,7 @@ function _M0FP26altsia6altsia10parse__app(source, start) {
|
|
|
5711
6226
|
const ch = _M0FP26altsia6altsia8char__at(source, i);
|
|
5712
6227
|
if (ch === 41 && !(i > 0 && _M0FP26altsia6altsia8char__at(source, i - 1 | 0) === 92)) {
|
|
5713
6228
|
_M0FP26altsia6altsia21push__plain__argument(args, source, segment_start, i);
|
|
5714
|
-
return new Result$Ok$
|
|
6229
|
+
return new Result$Ok$24$({ _0: new SpannedS$App(args, _M0FP26altsia6altsia26source__loc__from__offsets(source, start, i + 1 | 0)), _1: i + 1 | 0 });
|
|
5715
6230
|
}
|
|
5716
6231
|
if (ch === 40 && !(i > 0 && _M0FP26altsia6altsia8char__at(source, i - 1 | 0) === 92)) {
|
|
5717
6232
|
_M0FP26altsia6altsia21push__plain__argument(args, source, segment_start, i);
|
|
@@ -5739,7 +6254,7 @@ function _M0FP26altsia6altsia10parse__app(source, start) {
|
|
|
5739
6254
|
break;
|
|
5740
6255
|
}
|
|
5741
6256
|
}
|
|
5742
|
-
return new Result$Err$
|
|
6257
|
+
return new Result$Err$23$(new Error$altsia$47$altsia$46$Stage1Error$46$UnclosedApplication(_M0FP26altsia6altsia26source__loc__from__offsets(source, start, len)));
|
|
5743
6258
|
}
|
|
5744
6259
|
function _M0FP26altsia6altsia24is__stage1__indent__char(ch) {
|
|
5745
6260
|
return ch === 32 || ch === 9;
|
|
@@ -5790,7 +6305,7 @@ function _M0FP26altsia6altsia19strip__trailing__cr(line) {
|
|
|
5790
6305
|
return line;
|
|
5791
6306
|
}
|
|
5792
6307
|
function _M0FP26altsia6altsia25normalize__quote__content(raw) {
|
|
5793
|
-
const lines = _M0MP311moonbitlang4core7builtin4Iter9to__arrayGsE(_M0MP311moonbitlang4core7builtin4Iter3mapGssE(_M0MP311moonbitlang4core7builtin4Iter3mapGRP311moonbitlang4core6string10StringViewsE(_M0MP311moonbitlang4core6string6String5split(raw, { str:
|
|
6308
|
+
const lines = _M0MP311moonbitlang4core7builtin4Iter9to__arrayGsE(_M0MP311moonbitlang4core7builtin4Iter3mapGssE(_M0MP311moonbitlang4core7builtin4Iter3mapGRP311moonbitlang4core6string10StringViewsE(_M0MP311moonbitlang4core6string6String5split(raw, { str: _M0FP26altsia6altsia42normalize__quote__content_2e_2abind_7c2727, start: 0, end: _M0FP26altsia6altsia42normalize__quote__content_2e_2abind_7c2727.length }), _M0IP311moonbitlang4core6string10StringViewP311moonbitlang4core7builtin4Show10to__string), _M0FP26altsia6altsia19strip__trailing__cr));
|
|
5794
6309
|
const _p = _M0MP311moonbitlang4core7builtin4Iter3mapGsiE(_M0MP311moonbitlang4core7builtin4Iter6filterGsE(_M0MP311moonbitlang4core5array5Array4iterGsE(lines), (line) => !_M0FP26altsia6altsia23is__stage1__blank__line(line)), _M0FP26altsia6altsia23stage1__leading__indent);
|
|
5795
6310
|
const _p$2 = undefined;
|
|
5796
6311
|
let _p$3 = _p$2;
|
|
@@ -5831,7 +6346,7 @@ function _M0FP26altsia6altsia25normalize__quote__content(raw) {
|
|
|
5831
6346
|
}
|
|
5832
6347
|
function _M0FP26altsia6altsia19parse__quote__block(source, start) {
|
|
5833
6348
|
if (!_M0FP26altsia6altsia15has__prefix__at(source, start, "```")) {
|
|
5834
|
-
return new Result$Err$
|
|
6349
|
+
return new Result$Err$25$(new Error$altsia$47$altsia$46$Stage1Error$46$InvalidQuoteBlockStart(_M0FP26altsia6altsia14one__char__loc(source, start)));
|
|
5835
6350
|
}
|
|
5836
6351
|
const len = source.length;
|
|
5837
6352
|
let i = start + 3 | 0;
|
|
@@ -5863,7 +6378,7 @@ function _M0FP26altsia6altsia19parse__quote__block(source, start) {
|
|
|
5863
6378
|
}
|
|
5864
6379
|
if (only_indent_before_fence) {
|
|
5865
6380
|
const raw_content = source.substring(content_start, line_start);
|
|
5866
|
-
return new Result$Ok$
|
|
6381
|
+
return new Result$Ok$26$({ _0: _M0FP26altsia6altsia25normalize__quote__content(raw_content), _1: i + 3 | 0 });
|
|
5867
6382
|
}
|
|
5868
6383
|
}
|
|
5869
6384
|
const ch = _M0FP26altsia6altsia8char__at(source, i);
|
|
@@ -5876,7 +6391,7 @@ function _M0FP26altsia6altsia19parse__quote__block(source, start) {
|
|
|
5876
6391
|
break;
|
|
5877
6392
|
}
|
|
5878
6393
|
}
|
|
5879
|
-
return new Result$Err$
|
|
6394
|
+
return new Result$Err$25$(new Error$altsia$47$altsia$46$Stage1Error$46$UnclosedQuoteBlock(_M0FP26altsia6altsia26source__loc__from__offsets(source, start, len)));
|
|
5880
6395
|
}
|
|
5881
6396
|
function _M0MP26altsia6altsia6Stage114parse__spanned(source) {
|
|
5882
6397
|
const len = source.length;
|
|
@@ -5926,12 +6441,12 @@ function _M0MP26altsia6altsia6Stage114parse__spanned(source) {
|
|
|
5926
6441
|
continue;
|
|
5927
6442
|
}
|
|
5928
6443
|
const token = source.substring(i, i + 1 | 0);
|
|
5929
|
-
return new Result$Err$
|
|
6444
|
+
return new Result$Err$27$(new Error$altsia$47$altsia$46$Stage1Error$46$UnexpectedTopLevelToken(token, _M0FP26altsia6altsia14one__char__loc(source, i)));
|
|
5930
6445
|
} else {
|
|
5931
6446
|
break;
|
|
5932
6447
|
}
|
|
5933
6448
|
}
|
|
5934
|
-
return new Result$Ok$
|
|
6449
|
+
return new Result$Ok$28$(result);
|
|
5935
6450
|
}
|
|
5936
6451
|
function _M0FP26altsia6altsia23altsia__normalize__impl(source, max_width) {
|
|
5937
6452
|
const max_width$2 = max_width < 20 ? 20 : max_width;
|
|
@@ -5943,7 +6458,62 @@ function _M0FP26altsia6altsia23altsia__normalize__impl(source, max_width) {
|
|
|
5943
6458
|
} else {
|
|
5944
6459
|
return _bind;
|
|
5945
6460
|
}
|
|
5946
|
-
return new Result$Ok$7$(
|
|
6461
|
+
return new Result$Ok$7$(_M0FP26altsia6altsia36normalize__nodes__with__skip_2einner(nodes, source, max_width$2, true, false));
|
|
6462
|
+
}
|
|
6463
|
+
function _M0FP26altsia6altsia30altsia__normalize__range__impl(source, start_offset, end_offset, max_width) {
|
|
6464
|
+
const max_width$2 = max_width < 20 ? 20 : max_width;
|
|
6465
|
+
const _bind = _M0FP26altsia6altsia26validate__normalize__range(source, start_offset, end_offset);
|
|
6466
|
+
let _bind$2;
|
|
6467
|
+
if (_bind.$tag === 1) {
|
|
6468
|
+
const _ok = _bind;
|
|
6469
|
+
_bind$2 = _ok._0;
|
|
6470
|
+
} else {
|
|
6471
|
+
return _bind;
|
|
6472
|
+
}
|
|
6473
|
+
const _range_start = _bind$2._0;
|
|
6474
|
+
const _range_end = _bind$2._1;
|
|
6475
|
+
if (_range_start === _range_end) {
|
|
6476
|
+
return new Result$Ok$7$(source);
|
|
6477
|
+
}
|
|
6478
|
+
const _bind$3 = _M0MP26altsia6altsia6Stage114parse__spanned(source);
|
|
6479
|
+
let nodes;
|
|
6480
|
+
if (_bind$3.$tag === 1) {
|
|
6481
|
+
const _ok = _bind$3;
|
|
6482
|
+
nodes = _ok._0;
|
|
6483
|
+
} else {
|
|
6484
|
+
return _bind$3;
|
|
6485
|
+
}
|
|
6486
|
+
const _bind$4 = _M0FP26altsia6altsia22selected__node__bounds(nodes, _range_start, _range_end);
|
|
6487
|
+
if (_bind$4 === undefined) {
|
|
6488
|
+
return new Result$Ok$7$(source);
|
|
6489
|
+
} else {
|
|
6490
|
+
const _Some = _bind$4;
|
|
6491
|
+
const _x = _Some;
|
|
6492
|
+
const _first_index = _x._0;
|
|
6493
|
+
const _last_index = _x._1;
|
|
6494
|
+
const _bind$5 = _M0FP26altsia6altsia20state__before__index(nodes, _first_index);
|
|
6495
|
+
const _fmt_enabled_init = _bind$5._0;
|
|
6496
|
+
const _skip_next_init = _bind$5._1;
|
|
6497
|
+
const selected_nodes = [];
|
|
6498
|
+
const _end380 = _last_index + 1 | 0;
|
|
6499
|
+
let _tmp = _first_index;
|
|
6500
|
+
while (true) {
|
|
6501
|
+
const i = _tmp;
|
|
6502
|
+
if (i < _end380) {
|
|
6503
|
+
_M0MP311moonbitlang4core5array5Array4pushGRP26altsia6altsia8SpannedSE(selected_nodes, _M0MP311moonbitlang4core5array5Array2atGRP26altsia6altsia8SpannedSE(nodes, i));
|
|
6504
|
+
_tmp = i + 1 | 0;
|
|
6505
|
+
continue;
|
|
6506
|
+
} else {
|
|
6507
|
+
break;
|
|
6508
|
+
}
|
|
6509
|
+
}
|
|
6510
|
+
const normalized_segment = _M0FP26altsia6altsia36normalize__nodes__with__skip_2einner(selected_nodes, source, max_width$2, _fmt_enabled_init, _skip_next_init);
|
|
6511
|
+
const first_loc = _M0MP26altsia6altsia8SpannedS3loc(_M0MP311moonbitlang4core5array5Array2atGRP26altsia6altsia8SpannedSE(nodes, _first_index));
|
|
6512
|
+
const last_loc = _M0MP26altsia6altsia8SpannedS3loc(_M0MP311moonbitlang4core5array5Array2atGRP26altsia6altsia8SpannedSE(nodes, _last_index));
|
|
6513
|
+
const prefix = source.substring(0, first_loc.start_offset);
|
|
6514
|
+
const suffix = source.substring(last_loc.end_offset, source.length);
|
|
6515
|
+
return new Result$Ok$7$(`${prefix}${normalized_segment}${suffix}`);
|
|
6516
|
+
}
|
|
5947
6517
|
}
|
|
5948
6518
|
function _M0FP26altsia6altsia32altsia__normalize__raise_2einner(source, max_width) {
|
|
5949
6519
|
return _M0FP26altsia6altsia23altsia__normalize__impl(source, max_width);
|
|
@@ -5958,6 +6528,19 @@ function _M0FP26altsia6altsia24altsia__normalize__raise(source, max_width$46$opt
|
|
|
5958
6528
|
}
|
|
5959
6529
|
return _M0FP26altsia6altsia32altsia__normalize__raise_2einner(source, max_width);
|
|
5960
6530
|
}
|
|
6531
|
+
function _M0FP26altsia6altsia39altsia__normalize__range__raise_2einner(source, start_offset, end_offset, max_width) {
|
|
6532
|
+
return _M0FP26altsia6altsia30altsia__normalize__range__impl(source, start_offset, end_offset, max_width);
|
|
6533
|
+
}
|
|
6534
|
+
function _M0FP26altsia6altsia31altsia__normalize__range__raise(source, start_offset, end_offset, max_width$46$opt) {
|
|
6535
|
+
let max_width;
|
|
6536
|
+
if (max_width$46$opt === undefined) {
|
|
6537
|
+
max_width = 80;
|
|
6538
|
+
} else {
|
|
6539
|
+
const _Some = max_width$46$opt;
|
|
6540
|
+
max_width = _Some;
|
|
6541
|
+
}
|
|
6542
|
+
return _M0FP26altsia6altsia39altsia__normalize__range__raise_2einner(source, start_offset, end_offset, max_width);
|
|
6543
|
+
}
|
|
5961
6544
|
function _M0FP26altsia6altsia17localized_2einner(language, en, zh_cn, zh_tw, ja, ko, fr, de, es, pt, ru) {
|
|
5962
6545
|
const ko_msg = ko === "" ? en : ko;
|
|
5963
6546
|
const fr_msg = fr === "" ? en : fr;
|
|
@@ -6075,29 +6658,37 @@ function _M0FP26altsia6altsia13render__error(err, source, language) {
|
|
|
6075
6658
|
const _loc$9 = _UnexpectedTopLevelToken._1;
|
|
6076
6659
|
return _M0FP26altsia6altsia19make__render__error("stage1.unexpected-top-level-token", "stage1.parse", _M0FP26altsia6altsia17localized_2einner(language, `unexpected top-level token: ${_token}`, `顶层出现意外 token: ${_token}`, `頂層出現意外 token: ${_token}`, `トップレベルで予期しないトークン: ${_token}`, `최상위에서 예상치 못한 토큰: ${_token}`, `jeton de niveau supérieur inattendu : ${_token}`, `unerwartetes Token auf oberster Ebene: ${_token}`, `token inesperado en el nivel superior: ${_token}`, `token inesperado no nível superior: ${_token}`, `неожиданный токен верхнего уровня: ${_token}`), _loc$9, source);
|
|
6077
6660
|
}
|
|
6078
|
-
case
|
|
6661
|
+
case 15: {
|
|
6662
|
+
const _InvalidRange = err;
|
|
6663
|
+
const _start_offset = _InvalidRange._0;
|
|
6664
|
+
const _end_offset = _InvalidRange._1;
|
|
6665
|
+
const _source_length = _InvalidRange._2;
|
|
6666
|
+
const _loc$10 = _InvalidRange._3;
|
|
6667
|
+
return _M0FP26altsia6altsia19make__render__error("stage1.normalize.invalid-range", "stage1.normalize", _M0FP26altsia6altsia17localized_2einner(language, `invalid normalize range: start=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGiE(_start_offset)}, end=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGiE(_end_offset)}, source_length=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGiE(_source_length)}`, `invalid normalize range: start=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGiE(_start_offset)}, end=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGiE(_end_offset)}, source_length=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGiE(_source_length)}`, `invalid normalize range: start=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGiE(_start_offset)}, end=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGiE(_end_offset)}, source_length=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGiE(_source_length)}`, `invalid normalize range: start=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGiE(_start_offset)}, end=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGiE(_end_offset)}, source_length=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGiE(_source_length)}`, "", "", "", "", "", ""), _loc$10, source);
|
|
6668
|
+
}
|
|
6669
|
+
case 19: {
|
|
6079
6670
|
const _FunctionNameMustBePlainText = err;
|
|
6080
6671
|
const _found = _FunctionNameMustBePlainText._0;
|
|
6081
|
-
const _loc$
|
|
6082
|
-
return _M0FP26altsia6altsia19make__render__error("stage2.function-name-not-text", "stage2.elaborate", _M0FP26altsia6altsia17localized_2einner(language, `function name must be plain text: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia1SE(_found)}`, `函数名必须是纯文本: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia1SE(_found)}`, `函數名必須是純文本: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia1SE(_found)}`, `関数名はプレーンテキストである必要があります: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia1SE(_found)}`, "", "", "", "", "", ""), _loc$
|
|
6672
|
+
const _loc$11 = _FunctionNameMustBePlainText._1;
|
|
6673
|
+
return _M0FP26altsia6altsia19make__render__error("stage2.function-name-not-text", "stage2.elaborate", _M0FP26altsia6altsia17localized_2einner(language, `function name must be plain text: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia1SE(_found)}`, `函数名必须是纯文本: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia1SE(_found)}`, `函數名必須是純文本: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia1SE(_found)}`, `関数名はプレーンテキストである必要があります: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia1SE(_found)}`, "", "", "", "", "", ""), _loc$11, source);
|
|
6083
6674
|
}
|
|
6084
|
-
case
|
|
6675
|
+
case 18: {
|
|
6085
6676
|
const _TemplateRequiresNameAndParamList = err;
|
|
6086
6677
|
const _items = _TemplateRequiresNameAndParamList._0;
|
|
6087
|
-
const _loc$
|
|
6088
|
-
return _M0FP26altsia6altsia19make__render__error("stage2.template-missing-header", "stage2.elaborate", _M0FP26altsia6altsia17localized_2einner(language, `template requires name and param list: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia1SEE(_items)}`, `模板需要名称和参数列表: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia1SEE(_items)}`, `模板需要名稱和參數列表: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia1SEE(_items)}`, `テンプレートには名前と引数リストが必要です: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia1SEE(_items)}`, "", "", "", "", "", ""), _loc$
|
|
6678
|
+
const _loc$12 = _TemplateRequiresNameAndParamList._1;
|
|
6679
|
+
return _M0FP26altsia6altsia19make__render__error("stage2.template-missing-header", "stage2.elaborate", _M0FP26altsia6altsia17localized_2einner(language, `template requires name and param list: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia1SEE(_items)}`, `模板需要名称和参数列表: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia1SEE(_items)}`, `模板需要名稱和參數列表: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia1SEE(_items)}`, `テンプレートには名前と引数リストが必要です: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia1SEE(_items)}`, "", "", "", "", "", ""), _loc$12, source);
|
|
6089
6680
|
}
|
|
6090
|
-
case
|
|
6681
|
+
case 17: {
|
|
6091
6682
|
const _TemplateParamsMustBeList = err;
|
|
6092
6683
|
const _found$2 = _TemplateParamsMustBeList._0;
|
|
6093
|
-
const _loc$
|
|
6094
|
-
return _M0FP26altsia6altsia19make__render__error("stage2.template-params-not-list", "stage2.elaborate", _M0FP26altsia6altsia17localized_2einner(language, `template params must be a list: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia1SE(_found$2)}`, `模板参数必须是列表: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia1SE(_found$2)}`, `模板參數必須是列表: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia1SE(_found$2)}`, `テンプレート引数はリストである必要があります: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia1SE(_found$2)}`, "", "", "", "", "", ""), _loc$
|
|
6684
|
+
const _loc$13 = _TemplateParamsMustBeList._1;
|
|
6685
|
+
return _M0FP26altsia6altsia19make__render__error("stage2.template-params-not-list", "stage2.elaborate", _M0FP26altsia6altsia17localized_2einner(language, `template params must be a list: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia1SE(_found$2)}`, `模板参数必须是列表: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia1SE(_found$2)}`, `模板參數必須是列表: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia1SE(_found$2)}`, `テンプレート引数はリストである必要があります: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia1SE(_found$2)}`, "", "", "", "", "", ""), _loc$13, source);
|
|
6095
6686
|
}
|
|
6096
|
-
case
|
|
6687
|
+
case 16: {
|
|
6097
6688
|
const _InternalInvariantViolation = err;
|
|
6098
6689
|
const _context$2 = _InternalInvariantViolation._0;
|
|
6099
|
-
const _loc$
|
|
6100
|
-
return _M0FP26altsia6altsia19make__render__error("stage2.internal-invariant-violation", "stage2.elaborate", _M0FP26altsia6altsia17localized_2einner(language, `internal invariant violation: ${_context$2}`, `内部不变量被破坏: ${_context$2}`, `內部不變量被破壞: ${_context$2}`, `内部不変条件違反: ${_context$2}`, "", "", "", "", "", ""), _loc$
|
|
6690
|
+
const _loc$14 = _InternalInvariantViolation._1;
|
|
6691
|
+
return _M0FP26altsia6altsia19make__render__error("stage2.internal-invariant-violation", "stage2.elaborate", _M0FP26altsia6altsia17localized_2einner(language, `internal invariant violation: ${_context$2}`, `内部不变量被破坏: ${_context$2}`, `內部不變量被破壞: ${_context$2}`, `内部不変条件違反: ${_context$2}`, "", "", "", "", "", ""), _loc$14, source);
|
|
6101
6692
|
}
|
|
6102
6693
|
case 5: {
|
|
6103
6694
|
const _TemplateArityMismatch = err;
|
|
@@ -6105,32 +6696,32 @@ function _M0FP26altsia6altsia13render__error(err, source, language) {
|
|
|
6105
6696
|
const _expected = _TemplateArityMismatch._1;
|
|
6106
6697
|
const _got = _TemplateArityMismatch._2;
|
|
6107
6698
|
const _args = _TemplateArityMismatch._3;
|
|
6108
|
-
const _loc$
|
|
6109
|
-
return _M0FP26altsia6altsia19make__render__error("stage2-etale.template-arity-mismatch", "stage2-etale.expand", _M0FP26altsia6altsia17localized_2einner(language, `template arity mismatch: template=${_template_name}, expected=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGiE(_expected)}, got=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGiE(_got)}, args=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia4TermEE(_args)}`, `模板参数个数不匹配: template=${_template_name}, expected=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGiE(_expected)}, got=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGiE(_got)}, args=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia4TermEE(_args)}`, `模板參數個數不匹配: template=${_template_name}, expected=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGiE(_expected)}, got=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGiE(_got)}, args=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia4TermEE(_args)}`, `テンプレート引数個数不一致: template=${_template_name}, expected=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGiE(_expected)}, got=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGiE(_got)}, args=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia4TermEE(_args)}`, `템플릿 인자 개수 불일치: template=${_template_name}, expected=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGiE(_expected)}, got=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGiE(_got)}, args=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia4TermEE(_args)}`, `incohérence d'arité du template : template=${_template_name}, expected=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGiE(_expected)}, got=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGiE(_got)}, args=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia4TermEE(_args)}`, `Template-Arity stimmt nicht: template=${_template_name}, expected=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGiE(_expected)}, got=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGiE(_got)}, args=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia4TermEE(_args)}`, `desajuste de aridad de plantilla: template=${_template_name}, expected=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGiE(_expected)}, got=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGiE(_got)}, args=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia4TermEE(_args)}`, `incompatibilidade de aridade do template: template=${_template_name}, expected=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGiE(_expected)}, got=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGiE(_got)}, args=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia4TermEE(_args)}`, `несовпадение арности шаблона: template=${_template_name}, expected=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGiE(_expected)}, got=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGiE(_got)}, args=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia4TermEE(_args)}`), _loc$
|
|
6699
|
+
const _loc$15 = _TemplateArityMismatch._4;
|
|
6700
|
+
return _M0FP26altsia6altsia19make__render__error("stage2-etale.template-arity-mismatch", "stage2-etale.expand", _M0FP26altsia6altsia17localized_2einner(language, `template arity mismatch: template=${_template_name}, expected=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGiE(_expected)}, got=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGiE(_got)}, args=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia4TermEE(_args)}`, `模板参数个数不匹配: template=${_template_name}, expected=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGiE(_expected)}, got=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGiE(_got)}, args=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia4TermEE(_args)}`, `模板參數個數不匹配: template=${_template_name}, expected=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGiE(_expected)}, got=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGiE(_got)}, args=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia4TermEE(_args)}`, `テンプレート引数個数不一致: template=${_template_name}, expected=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGiE(_expected)}, got=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGiE(_got)}, args=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia4TermEE(_args)}`, `템플릿 인자 개수 불일치: template=${_template_name}, expected=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGiE(_expected)}, got=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGiE(_got)}, args=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia4TermEE(_args)}`, `incohérence d'arité du template : template=${_template_name}, expected=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGiE(_expected)}, got=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGiE(_got)}, args=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia4TermEE(_args)}`, `Template-Arity stimmt nicht: template=${_template_name}, expected=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGiE(_expected)}, got=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGiE(_got)}, args=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia4TermEE(_args)}`, `desajuste de aridad de plantilla: template=${_template_name}, expected=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGiE(_expected)}, got=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGiE(_got)}, args=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia4TermEE(_args)}`, `incompatibilidade de aridade do template: template=${_template_name}, expected=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGiE(_expected)}, got=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGiE(_got)}, args=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia4TermEE(_args)}`, `несовпадение арности шаблона: template=${_template_name}, expected=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGiE(_expected)}, got=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGiE(_got)}, args=${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia4TermEE(_args)}`), _loc$15, source);
|
|
6110
6701
|
}
|
|
6111
6702
|
case 4: {
|
|
6112
6703
|
const _NestedTemplateDefinitionInSubstitution = err;
|
|
6113
6704
|
const _term = _NestedTemplateDefinitionInSubstitution._0;
|
|
6114
|
-
const _loc$
|
|
6115
|
-
return _M0FP26altsia6altsia19make__render__error("stage2-etale.nested-template-definition", "stage2-etale.expand", _M0FP26altsia6altsia17localized_2einner(language, `nested template definition is not allowed in substitution: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia4TermE(_term)}`, `替换阶段不允许嵌套模板定义: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia4TermE(_term)}`, `替換階段不允許巢狀模板定義: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia4TermE(_term)}`, `置換中のネストしたテンプレート定義は許可されません: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia4TermE(_term)}`, "", "", "", "", "", ""), _loc$
|
|
6705
|
+
const _loc$16 = _NestedTemplateDefinitionInSubstitution._1;
|
|
6706
|
+
return _M0FP26altsia6altsia19make__render__error("stage2-etale.nested-template-definition", "stage2-etale.expand", _M0FP26altsia6altsia17localized_2einner(language, `nested template definition is not allowed in substitution: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia4TermE(_term)}`, `替换阶段不允许嵌套模板定义: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia4TermE(_term)}`, `替換階段不允許巢狀模板定義: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia4TermE(_term)}`, `置換中のネストしたテンプレート定義は許可されません: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia4TermE(_term)}`, "", "", "", "", "", ""), _loc$16, source);
|
|
6116
6707
|
}
|
|
6117
6708
|
case 3: {
|
|
6118
6709
|
const _UnexpectedTemplateDefinitionInExpand = err;
|
|
6119
6710
|
const _term$2 = _UnexpectedTemplateDefinitionInExpand._0;
|
|
6120
|
-
const _loc$
|
|
6121
|
-
return _M0FP26altsia6altsia19make__render__error("stage2-etale.unexpected-template-definition", "stage2-etale.expand", _M0FP26altsia6altsia17localized_2einner(language, `unexpected template definition during expansion: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia4TermE(_term$2)}`, `展开阶段出现意外模板定义: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia4TermE(_term$2)}`, `展開階段出現意外模板定義: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia4TermE(_term$2)}`, `展開中に予期しないテンプレート定義が見つかりました: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia4TermE(_term$2)}`, "", "", "", "", "", ""), _loc$
|
|
6711
|
+
const _loc$17 = _UnexpectedTemplateDefinitionInExpand._1;
|
|
6712
|
+
return _M0FP26altsia6altsia19make__render__error("stage2-etale.unexpected-template-definition", "stage2-etale.expand", _M0FP26altsia6altsia17localized_2einner(language, `unexpected template definition during expansion: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia4TermE(_term$2)}`, `展开阶段出现意外模板定义: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia4TermE(_term$2)}`, `展開階段出現意外模板定義: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia4TermE(_term$2)}`, `展開中に予期しないテンプレート定義が見つかりました: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia4TermE(_term$2)}`, "", "", "", "", "", ""), _loc$17, source);
|
|
6122
6713
|
}
|
|
6123
|
-
case
|
|
6714
|
+
case 21: {
|
|
6124
6715
|
const _AttributeExpectsAtMostOneValue = err;
|
|
6125
6716
|
const _values = _AttributeExpectsAtMostOneValue._0;
|
|
6126
|
-
const _loc$
|
|
6127
|
-
return _M0FP26altsia6altsia19make__render__error("stage3.attribute-too-many-values", "stage3.lower", _M0FP26altsia6altsia17localized_2einner(language, `attribute expects at most one value: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia4TermEE(_values)}`, `属性最多只能有一个值: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia4TermEE(_values)}`, `屬性最多只能有一個值: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia4TermEE(_values)}`, `属性は最大 1 つの値のみ許可されます: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia4TermEE(_values)}`, `속성은 최대 하나의 값만 허용합니다: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia4TermEE(_values)}`, `un attribut attend au plus une valeur : ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia4TermEE(_values)}`, `ein Attribut erwartet höchstens einen Wert: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia4TermEE(_values)}`, `un atributo acepta como máximo un valor: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia4TermEE(_values)}`, `um atributo aceita no máximo um valor: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia4TermEE(_values)}`, `атрибут допускает не более одного значения: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia4TermEE(_values)}`), _loc$
|
|
6717
|
+
const _loc$18 = _AttributeExpectsAtMostOneValue._1;
|
|
6718
|
+
return _M0FP26altsia6altsia19make__render__error("stage3.attribute-too-many-values", "stage3.lower", _M0FP26altsia6altsia17localized_2einner(language, `attribute expects at most one value: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia4TermEE(_values)}`, `属性最多只能有一个值: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia4TermEE(_values)}`, `屬性最多只能有一個值: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia4TermEE(_values)}`, `属性は最大 1 つの値のみ許可されます: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia4TermEE(_values)}`, `속성은 최대 하나의 값만 허용합니다: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia4TermEE(_values)}`, `un attribut attend au plus une valeur : ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia4TermEE(_values)}`, `ein Attribut erwartet höchstens einen Wert: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia4TermEE(_values)}`, `un atributo acepta como máximo un valor: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia4TermEE(_values)}`, `um atributo aceita no máximo um valor: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia4TermEE(_values)}`, `атрибут допускает не более одного значения: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP311moonbitlang4core7builtin5ArrayGRP26altsia6altsia4TermEE(_values)}`), _loc$18, source);
|
|
6128
6719
|
}
|
|
6129
|
-
case
|
|
6720
|
+
case 20: {
|
|
6130
6721
|
const _UnexpectedTemplateDefinition = err;
|
|
6131
6722
|
const _term$3 = _UnexpectedTemplateDefinition._0;
|
|
6132
|
-
const _loc$
|
|
6133
|
-
return _M0FP26altsia6altsia19make__render__error("stage3.unexpected-template-definition", "stage3.lower", _M0FP26altsia6altsia17localized_2einner(language, `unexpected template definition during lowering: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia4TermE(_term$3)}`, `降级阶段出现意外模板定义: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia4TermE(_term$3)}`, `降級階段出現意外模板定義: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia4TermE(_term$3)}`, `lowering 中に予期しないテンプレート定義が見つかりました: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia4TermE(_term$3)}`, "", "", "", "", "", ""), _loc$
|
|
6723
|
+
const _loc$19 = _UnexpectedTemplateDefinition._1;
|
|
6724
|
+
return _M0FP26altsia6altsia19make__render__error("stage3.unexpected-template-definition", "stage3.lower", _M0FP26altsia6altsia17localized_2einner(language, `unexpected template definition during lowering: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia4TermE(_term$3)}`, `降级阶段出现意外模板定义: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia4TermE(_term$3)}`, `降級階段出現意外模板定義: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia4TermE(_term$3)}`, `lowering 中に予期しないテンプレート定義が見つかりました: ${_M0IP016_24default__implP311moonbitlang4core7builtin4Show10to__stringGRP26altsia6altsia4TermE(_term$3)}`, "", "", "", "", "", ""), _loc$19, source);
|
|
6134
6725
|
}
|
|
6135
6726
|
case 2: {
|
|
6136
6727
|
const _Failure = err;
|
|
@@ -6155,14 +6746,14 @@ function _M0FP26altsia6altsia38altsia__normalize__diagnostics_2einner(source, la
|
|
|
6155
6746
|
_try_err = _err._0;
|
|
6156
6747
|
break _L;
|
|
6157
6748
|
}
|
|
6158
|
-
return new Result$Ok$
|
|
6749
|
+
return new Result$Ok$29$(_bind$2);
|
|
6159
6750
|
}
|
|
6160
|
-
return new Result$Err$
|
|
6751
|
+
return new Result$Err$29$([_M0FP26altsia6altsia13render__error(_try_err, source, language)]);
|
|
6161
6752
|
}
|
|
6162
6753
|
function _M0FP26altsia6altsia30altsia__normalize__diagnostics(source, language$46$opt, max_width$46$opt) {
|
|
6163
6754
|
let language;
|
|
6164
6755
|
if (language$46$opt === undefined) {
|
|
6165
|
-
language =
|
|
6756
|
+
language = _M0FP26altsia6altsia17default__language;
|
|
6166
6757
|
} else {
|
|
6167
6758
|
const _Some = language$46$opt;
|
|
6168
6759
|
language = _Some;
|
|
@@ -6191,7 +6782,7 @@ function _M0FP26altsia6altsia33altsia__normalize__result_2einner(source, languag
|
|
|
6191
6782
|
if (_bind.$tag === 1) {
|
|
6192
6783
|
const _Ok = _bind;
|
|
6193
6784
|
const _normalized = _Ok._0;
|
|
6194
|
-
return new Result$Ok$
|
|
6785
|
+
return new Result$Ok$30$(_normalized);
|
|
6195
6786
|
} else {
|
|
6196
6787
|
const _Err = _bind;
|
|
6197
6788
|
const _errors = _Err._0;
|
|
@@ -6209,13 +6800,13 @@ function _M0FP26altsia6altsia33altsia__normalize__result_2einner(source, languag
|
|
|
6209
6800
|
break;
|
|
6210
6801
|
}
|
|
6211
6802
|
}
|
|
6212
|
-
return new Result$Err$
|
|
6803
|
+
return new Result$Err$30$(_p);
|
|
6213
6804
|
}
|
|
6214
6805
|
}
|
|
6215
6806
|
function _M0FP26altsia6altsia25altsia__normalize__result(source, language$46$opt, max_width$46$opt) {
|
|
6216
6807
|
let language;
|
|
6217
6808
|
if (language$46$opt === undefined) {
|
|
6218
|
-
language =
|
|
6809
|
+
language = _M0FP26altsia6altsia17default__language;
|
|
6219
6810
|
} else {
|
|
6220
6811
|
const _Some = language$46$opt;
|
|
6221
6812
|
language = _Some;
|
|
@@ -6237,13 +6828,13 @@ function _M0FP26altsia6altsia25altsia__normalize_2einner(source, language, max_w
|
|
|
6237
6828
|
} else {
|
|
6238
6829
|
const _Err = _bind;
|
|
6239
6830
|
const _errors = _Err._0;
|
|
6240
|
-
return _M0MP311moonbitlang4core5array5Array4joinGsE(_errors, { str:
|
|
6831
|
+
return _M0MP311moonbitlang4core5array5Array4joinGsE(_errors, { str: _M0FP26altsia6altsia42altsia__normalize_2einner_2e_2abind_7c2949, start: 0, end: _M0FP26altsia6altsia42altsia__normalize_2einner_2e_2abind_7c2949.length });
|
|
6241
6832
|
}
|
|
6242
6833
|
}
|
|
6243
6834
|
function _M0FP26altsia6altsia17altsia__normalize(source, language$46$opt, max_width$46$opt) {
|
|
6244
6835
|
let language;
|
|
6245
6836
|
if (language$46$opt === undefined) {
|
|
6246
|
-
language =
|
|
6837
|
+
language = _M0FP26altsia6altsia17default__language;
|
|
6247
6838
|
} else {
|
|
6248
6839
|
const _Some = language$46$opt;
|
|
6249
6840
|
language = _Some;
|
|
@@ -6257,6 +6848,111 @@ function _M0FP26altsia6altsia17altsia__normalize(source, language$46$opt, max_wi
|
|
|
6257
6848
|
}
|
|
6258
6849
|
return _M0FP26altsia6altsia25altsia__normalize_2einner(source, language, max_width);
|
|
6259
6850
|
}
|
|
6851
|
+
function _M0FP26altsia6altsia45altsia__normalize__range__diagnostics_2einner(source, start_offset, end_offset, language, max_width) {
|
|
6852
|
+
let _try_err;
|
|
6853
|
+
_L: {
|
|
6854
|
+
const _bind = _M0FP26altsia6altsia30altsia__normalize__range__impl(source, start_offset, end_offset, max_width);
|
|
6855
|
+
let _bind$2;
|
|
6856
|
+
if (_bind.$tag === 1) {
|
|
6857
|
+
const _ok = _bind;
|
|
6858
|
+
_bind$2 = _ok._0;
|
|
6859
|
+
} else {
|
|
6860
|
+
const _err = _bind;
|
|
6861
|
+
_try_err = _err._0;
|
|
6862
|
+
break _L;
|
|
6863
|
+
}
|
|
6864
|
+
return new Result$Ok$29$(_bind$2);
|
|
6865
|
+
}
|
|
6866
|
+
return new Result$Err$29$([_M0FP26altsia6altsia13render__error(_try_err, source, language)]);
|
|
6867
|
+
}
|
|
6868
|
+
function _M0FP26altsia6altsia37altsia__normalize__range__diagnostics(source, start_offset, end_offset, language$46$opt, max_width$46$opt) {
|
|
6869
|
+
let language;
|
|
6870
|
+
if (language$46$opt === undefined) {
|
|
6871
|
+
language = _M0FP26altsia6altsia17default__language;
|
|
6872
|
+
} else {
|
|
6873
|
+
const _Some = language$46$opt;
|
|
6874
|
+
language = _Some;
|
|
6875
|
+
}
|
|
6876
|
+
let max_width;
|
|
6877
|
+
if (max_width$46$opt === undefined) {
|
|
6878
|
+
max_width = 80;
|
|
6879
|
+
} else {
|
|
6880
|
+
const _Some = max_width$46$opt;
|
|
6881
|
+
max_width = _Some;
|
|
6882
|
+
}
|
|
6883
|
+
return _M0FP26altsia6altsia45altsia__normalize__range__diagnostics_2einner(source, start_offset, end_offset, language, max_width);
|
|
6884
|
+
}
|
|
6885
|
+
function _M0FP26altsia6altsia40altsia__normalize__range__result_2einner(source, start_offset, end_offset, language, max_width) {
|
|
6886
|
+
const _bind = _M0FP26altsia6altsia45altsia__normalize__range__diagnostics_2einner(source, start_offset, end_offset, language, max_width);
|
|
6887
|
+
if (_bind.$tag === 1) {
|
|
6888
|
+
const _Ok = _bind;
|
|
6889
|
+
const _normalized = _Ok._0;
|
|
6890
|
+
return new Result$Ok$30$(_normalized);
|
|
6891
|
+
} else {
|
|
6892
|
+
const _Err = _bind;
|
|
6893
|
+
const _errors = _Err._0;
|
|
6894
|
+
const _p = new Array(_errors.length);
|
|
6895
|
+
const _p$2 = _errors.length;
|
|
6896
|
+
let _tmp = 0;
|
|
6897
|
+
while (true) {
|
|
6898
|
+
const _p$3 = _tmp;
|
|
6899
|
+
if (_p$3 < _p$2) {
|
|
6900
|
+
const _p$4 = _errors[_p$3];
|
|
6901
|
+
_p[_p$3] = _M0FP26altsia6altsia25render__error__to__string(_p$4);
|
|
6902
|
+
_tmp = _p$3 + 1 | 0;
|
|
6903
|
+
continue;
|
|
6904
|
+
} else {
|
|
6905
|
+
break;
|
|
6906
|
+
}
|
|
6907
|
+
}
|
|
6908
|
+
return new Result$Err$30$(_p);
|
|
6909
|
+
}
|
|
6910
|
+
}
|
|
6911
|
+
function _M0FP26altsia6altsia32altsia__normalize__range__result(source, start_offset, end_offset, language$46$opt, max_width$46$opt) {
|
|
6912
|
+
let language;
|
|
6913
|
+
if (language$46$opt === undefined) {
|
|
6914
|
+
language = _M0FP26altsia6altsia17default__language;
|
|
6915
|
+
} else {
|
|
6916
|
+
const _Some = language$46$opt;
|
|
6917
|
+
language = _Some;
|
|
6918
|
+
}
|
|
6919
|
+
let max_width;
|
|
6920
|
+
if (max_width$46$opt === undefined) {
|
|
6921
|
+
max_width = 80;
|
|
6922
|
+
} else {
|
|
6923
|
+
const _Some = max_width$46$opt;
|
|
6924
|
+
max_width = _Some;
|
|
6925
|
+
}
|
|
6926
|
+
return _M0FP26altsia6altsia40altsia__normalize__range__result_2einner(source, start_offset, end_offset, language, max_width);
|
|
6927
|
+
}
|
|
6928
|
+
function _M0FP26altsia6altsia32altsia__normalize__range_2einner(source, start_offset, end_offset, language, max_width) {
|
|
6929
|
+
const _bind = _M0FP26altsia6altsia40altsia__normalize__range__result_2einner(source, start_offset, end_offset, language, max_width);
|
|
6930
|
+
if (_bind.$tag === 1) {
|
|
6931
|
+
const _Ok = _bind;
|
|
6932
|
+
return _Ok._0;
|
|
6933
|
+
} else {
|
|
6934
|
+
const _Err = _bind;
|
|
6935
|
+
const _errors = _Err._0;
|
|
6936
|
+
return _M0MP311moonbitlang4core5array5Array4joinGsE(_errors, { str: _M0FP26altsia6altsia49altsia__normalize__range_2einner_2e_2abind_7c3002, start: 0, end: _M0FP26altsia6altsia49altsia__normalize__range_2einner_2e_2abind_7c3002.length });
|
|
6937
|
+
}
|
|
6938
|
+
}
|
|
6939
|
+
function _M0FP26altsia6altsia24altsia__normalize__range(source, start_offset, end_offset, language$46$opt, max_width$46$opt) {
|
|
6940
|
+
let language;
|
|
6941
|
+
if (language$46$opt === undefined) {
|
|
6942
|
+
language = _M0FP26altsia6altsia17default__language;
|
|
6943
|
+
} else {
|
|
6944
|
+
const _Some = language$46$opt;
|
|
6945
|
+
language = _Some;
|
|
6946
|
+
}
|
|
6947
|
+
let max_width;
|
|
6948
|
+
if (max_width$46$opt === undefined) {
|
|
6949
|
+
max_width = 80;
|
|
6950
|
+
} else {
|
|
6951
|
+
const _Some = max_width$46$opt;
|
|
6952
|
+
max_width = _Some;
|
|
6953
|
+
}
|
|
6954
|
+
return _M0FP26altsia6altsia32altsia__normalize__range_2einner(source, start_offset, end_offset, language, max_width);
|
|
6955
|
+
}
|
|
6260
6956
|
function _M0FP26altsia6altsia35render__error__supported__languages() {
|
|
6261
6957
|
return _M0FP26altsia6altsia20supported__languages;
|
|
6262
6958
|
}
|
|
@@ -6400,7 +7096,7 @@ function _M0MP26altsia6altsia4Html10to__string(node) {
|
|
|
6400
7096
|
break;
|
|
6401
7097
|
}
|
|
6402
7098
|
}
|
|
6403
|
-
const html_attrs = _M0MP311moonbitlang4core5array5Array4joinGsE(_p$2, { str:
|
|
7099
|
+
const html_attrs = _M0MP311moonbitlang4core5array5Array4joinGsE(_p$2, { str: _M0FP26altsia6altsia27to__string_2e_2abind_7c3044, start: 0, end: _M0FP26altsia6altsia27to__string_2e_2abind_7c3044.length });
|
|
6404
7100
|
const html_attrs$2 = _attrs.size === 0 ? html_attrs : ` ${html_attrs}`;
|
|
6405
7101
|
const _p$4 = new Array(_children.length);
|
|
6406
7102
|
const _p$5 = _children.length;
|
|
@@ -6416,7 +7112,7 @@ function _M0MP26altsia6altsia4Html10to__string(node) {
|
|
|
6416
7112
|
break;
|
|
6417
7113
|
}
|
|
6418
7114
|
}
|
|
6419
|
-
const body = _M0MP311moonbitlang4core5array5Array4joinGsE(_p$4, { str:
|
|
7115
|
+
const body = _M0MP311moonbitlang4core5array5Array4joinGsE(_p$4, { str: _M0FP26altsia6altsia27to__string_2e_2abind_7c3043, start: 0, end: _M0FP26altsia6altsia27to__string_2e_2abind_7c3043.length });
|
|
6420
7116
|
return `<${_name}${html_attrs$2}>${body}</${_name}>`;
|
|
6421
7117
|
}
|
|
6422
7118
|
}
|
|
@@ -6666,9 +7362,9 @@ function _M0FP26altsia6altsia37altsia__to__html__diagnostics_2einner(source, lan
|
|
|
6666
7362
|
_try_err = _err._0;
|
|
6667
7363
|
break _L;
|
|
6668
7364
|
}
|
|
6669
|
-
return new Result$Ok$
|
|
7365
|
+
return new Result$Ok$29$(_bind$2);
|
|
6670
7366
|
}
|
|
6671
|
-
return new Result$Err$
|
|
7367
|
+
return new Result$Err$29$([_M0FP26altsia6altsia13render__error(_try_err, source, language)]);
|
|
6672
7368
|
}
|
|
6673
7369
|
function _M0FP26altsia6altsia29altsia__to__html__diagnostics(source, language$46$opt) {
|
|
6674
7370
|
let language;
|
|
@@ -6693,9 +7389,9 @@ function _M0FP26altsia6altsia52altsia__to__html__with__visitor__diagnostics_2ein
|
|
|
6693
7389
|
_try_err = _err._0;
|
|
6694
7390
|
break _L;
|
|
6695
7391
|
}
|
|
6696
|
-
return new Result$Ok$
|
|
7392
|
+
return new Result$Ok$29$(_bind$2);
|
|
6697
7393
|
}
|
|
6698
|
-
return new Result$Err$
|
|
7394
|
+
return new Result$Err$29$([_M0FP26altsia6altsia13render__error(_try_err, source, language)]);
|
|
6699
7395
|
}
|
|
6700
7396
|
function _M0FP26altsia6altsia44altsia__to__html__with__visitor__diagnostics(source, visitor, language$46$opt) {
|
|
6701
7397
|
let language;
|
|
@@ -6712,7 +7408,7 @@ function _M0FP26altsia6altsia32altsia__to__html__result_2einner(source, language
|
|
|
6712
7408
|
if (_bind.$tag === 1) {
|
|
6713
7409
|
const _Ok = _bind;
|
|
6714
7410
|
const _html = _Ok._0;
|
|
6715
|
-
return new Result$Ok$
|
|
7411
|
+
return new Result$Ok$30$(_html);
|
|
6716
7412
|
} else {
|
|
6717
7413
|
const _Err = _bind;
|
|
6718
7414
|
const _errors = _Err._0;
|
|
@@ -6730,7 +7426,7 @@ function _M0FP26altsia6altsia32altsia__to__html__result_2einner(source, language
|
|
|
6730
7426
|
break;
|
|
6731
7427
|
}
|
|
6732
7428
|
}
|
|
6733
|
-
return new Result$Err$
|
|
7429
|
+
return new Result$Err$30$(_p);
|
|
6734
7430
|
}
|
|
6735
7431
|
}
|
|
6736
7432
|
function _M0FP26altsia6altsia24altsia__to__html__result(source, language$46$opt) {
|
|
@@ -6748,7 +7444,7 @@ function _M0FP26altsia6altsia47altsia__to__html__with__visitor__result_2einner(s
|
|
|
6748
7444
|
if (_bind.$tag === 1) {
|
|
6749
7445
|
const _Ok = _bind;
|
|
6750
7446
|
const _html = _Ok._0;
|
|
6751
|
-
return new Result$Ok$
|
|
7447
|
+
return new Result$Ok$30$(_html);
|
|
6752
7448
|
} else {
|
|
6753
7449
|
const _Err = _bind;
|
|
6754
7450
|
const _errors = _Err._0;
|
|
@@ -6766,7 +7462,7 @@ function _M0FP26altsia6altsia47altsia__to__html__with__visitor__result_2einner(s
|
|
|
6766
7462
|
break;
|
|
6767
7463
|
}
|
|
6768
7464
|
}
|
|
6769
|
-
return new Result$Err$
|
|
7465
|
+
return new Result$Err$30$(_p);
|
|
6770
7466
|
}
|
|
6771
7467
|
}
|
|
6772
7468
|
function _M0FP26altsia6altsia39altsia__to__html__with__visitor__result(source, visitor, language$46$opt) {
|
|
@@ -6787,7 +7483,7 @@ function _M0FP26altsia6altsia24altsia__to__html_2einner(source, language) {
|
|
|
6787
7483
|
} else {
|
|
6788
7484
|
const _Err = _bind;
|
|
6789
7485
|
const _errors = _Err._0;
|
|
6790
|
-
return _M0MP311moonbitlang4core5array5Array4joinGsE(_errors, { str:
|
|
7486
|
+
return _M0MP311moonbitlang4core5array5Array4joinGsE(_errors, { str: _M0FP26altsia6altsia41altsia__to__html_2einner_2e_2abind_7c3146, start: 0, end: _M0FP26altsia6altsia41altsia__to__html_2einner_2e_2abind_7c3146.length });
|
|
6791
7487
|
}
|
|
6792
7488
|
}
|
|
6793
7489
|
function _M0FP26altsia6altsia16altsia__to__html(source, language$46$opt) {
|
|
@@ -6808,7 +7504,7 @@ function _M0FP26altsia6altsia39altsia__to__html__with__visitor_2einner(source, v
|
|
|
6808
7504
|
} else {
|
|
6809
7505
|
const _Err = _bind;
|
|
6810
7506
|
const _errors = _Err._0;
|
|
6811
|
-
return _M0MP311moonbitlang4core5array5Array4joinGsE(_errors, { str:
|
|
7507
|
+
return _M0MP311moonbitlang4core5array5Array4joinGsE(_errors, { str: _M0FP26altsia6altsia56altsia__to__html__with__visitor_2einner_2e_2abind_7c3160, start: 0, end: _M0FP26altsia6altsia56altsia__to__html__with__visitor_2einner_2e_2abind_7c3160.length });
|
|
6812
7508
|
}
|
|
6813
7509
|
}
|
|
6814
7510
|
function _M0FP26altsia6altsia31altsia__to__html__with__visitor(source, visitor, language$46$opt) {
|
|
@@ -6821,4 +7517,4 @@ function _M0FP26altsia6altsia31altsia__to__html__with__visitor(source, visitor,
|
|
|
6821
7517
|
}
|
|
6822
7518
|
return _M0FP26altsia6altsia39altsia__to__html__with__visitor_2einner(source, visitor, language);
|
|
6823
7519
|
}
|
|
6824
|
-
export { _M0FP26altsia6altsia24altsia__normalize__raise as altsia_normalize_raise, _M0FP26altsia6altsia30altsia__normalize__diagnostics as altsia_normalize_diagnostics, _M0FP26altsia6altsia25altsia__normalize__result as altsia_normalize_result, _M0FP26altsia6altsia17altsia__normalize as altsia_normalize, _M0FP26altsia6altsia35render__error__supported__languages as render_error_supported_languages, _M0FP26altsia6altsia23altsia__to__html__raise as altsia_to_html_raise, _M0FP26altsia6altsia38altsia__to__html__with__visitor__raise as altsia_to_html_with_visitor_raise, _M0FP26altsia6altsia29altsia__to__html__diagnostics as altsia_to_html_diagnostics, _M0FP26altsia6altsia44altsia__to__html__with__visitor__diagnostics as altsia_to_html_with_visitor_diagnostics, _M0FP26altsia6altsia24altsia__to__html__result as altsia_to_html_result, _M0FP26altsia6altsia39altsia__to__html__with__visitor__result as altsia_to_html_with_visitor_result, _M0FP26altsia6altsia16altsia__to__html as altsia_to_html, _M0FP26altsia6altsia31altsia__to__html__with__visitor as altsia_to_html_with_visitor }
|
|
7520
|
+
export { _M0FP26altsia6altsia24altsia__normalize__raise as altsia_normalize_raise, _M0FP26altsia6altsia31altsia__normalize__range__raise as altsia_normalize_range_raise, _M0FP26altsia6altsia30altsia__normalize__diagnostics as altsia_normalize_diagnostics, _M0FP26altsia6altsia25altsia__normalize__result as altsia_normalize_result, _M0FP26altsia6altsia17altsia__normalize as altsia_normalize, _M0FP26altsia6altsia37altsia__normalize__range__diagnostics as altsia_normalize_range_diagnostics, _M0FP26altsia6altsia32altsia__normalize__range__result as altsia_normalize_range_result, _M0FP26altsia6altsia24altsia__normalize__range as altsia_normalize_range, _M0FP26altsia6altsia35render__error__supported__languages as render_error_supported_languages, _M0FP26altsia6altsia23altsia__to__html__raise as altsia_to_html_raise, _M0FP26altsia6altsia38altsia__to__html__with__visitor__raise as altsia_to_html_with_visitor_raise, _M0FP26altsia6altsia29altsia__to__html__diagnostics as altsia_to_html_diagnostics, _M0FP26altsia6altsia44altsia__to__html__with__visitor__diagnostics as altsia_to_html_with_visitor_diagnostics, _M0FP26altsia6altsia24altsia__to__html__result as altsia_to_html_result, _M0FP26altsia6altsia39altsia__to__html__with__visitor__result as altsia_to_html_with_visitor_result, _M0FP26altsia6altsia16altsia__to__html as altsia_to_html, _M0FP26altsia6altsia31altsia__to__html__with__visitor as altsia_to_html_with_visitor }
|