@superblocksteam/library-shared 2.0.177-next.0 → 2.0.178-next.0

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.
Files changed (51) hide show
  1. package/dist/layout.d.ts.map +1 -1
  2. package/dist/layout.js.map +1 -1
  3. package/dist/mobx-sync/to-patch.js.map +1 -1
  4. package/dist/pages.d.ts.map +1 -1
  5. package/dist/pegs/find-string-interpolation.d.ts +3 -3
  6. package/dist/pegs/find-string-interpolation.d.ts.map +1 -1
  7. package/dist/pegs/find-string-interpolation.js +93 -397
  8. package/dist/pegs/find-string-interpolation.js.map +1 -1
  9. package/dist/props/helpers.js.map +1 -1
  10. package/dist/props/properties-panel.d.ts.map +1 -1
  11. package/dist/props/tailwind-property-keys.d.ts.map +1 -1
  12. package/dist/testing/default-structure-scope/index.js.map +1 -1
  13. package/dist/testing/fake-editor-channel/fake-artifact.d.ts.map +1 -1
  14. package/dist/testing/fake-editor-channel/fake-artifact.js.map +1 -1
  15. package/dist/testing/fake-editor-channel/index.d.ts.map +1 -1
  16. package/dist/testing/fake-editor-channel/index.js.map +1 -1
  17. package/dist/types/ai.d.ts +15 -3
  18. package/dist/types/ai.d.ts.map +1 -1
  19. package/dist/types/ai.js +1 -0
  20. package/dist/types/ai.js.map +1 -1
  21. package/dist/types/builder-mcp-usage.d.ts +39 -0
  22. package/dist/types/builder-mcp-usage.d.ts.map +1 -0
  23. package/dist/types/builder-mcp-usage.js +31 -0
  24. package/dist/types/builder-mcp-usage.js.map +1 -0
  25. package/dist/types/edit-operations.d.ts.map +1 -1
  26. package/dist/types/entities.d.ts.map +1 -1
  27. package/dist/types/events.d.ts.map +1 -1
  28. package/dist/types/events.js +5 -9
  29. package/dist/types/events.js.map +1 -1
  30. package/dist/types/feedback.d.ts +83 -83
  31. package/dist/types/index.d.ts +1 -0
  32. package/dist/types/index.d.ts.map +1 -1
  33. package/dist/types/index.js +1 -0
  34. package/dist/types/index.js.map +1 -1
  35. package/dist/types/llm-flag-config.d.ts.map +1 -1
  36. package/dist/types/migration.d.ts.map +1 -1
  37. package/dist/types/register-component.d.ts.map +1 -1
  38. package/dist/types/socket-method-names.d.ts +7 -2
  39. package/dist/types/socket-method-names.d.ts.map +1 -1
  40. package/dist/types/socket-method-names.js +5 -0
  41. package/dist/types/socket-method-names.js.map +1 -1
  42. package/dist/types/socket.d.ts +32 -0
  43. package/dist/types/socket.d.ts.map +1 -1
  44. package/dist/types/theme.d.ts.map +1 -1
  45. package/dist/types/vite.d.ts.map +1 -1
  46. package/dist/urls.d.ts.map +1 -1
  47. package/dist/utils/blocks.js.map +1 -1
  48. package/dist/utils/name-generator.d.ts.map +1 -1
  49. package/dist/utils/properties.d.ts.map +1 -1
  50. package/dist/utils/properties.js.map +1 -1
  51. package/package.json +13 -13
@@ -1,4 +1,4 @@
1
- // @generated by Peggy 5.0.6.
1
+ // @generated by Peggy 5.1.1.
2
2
  //
3
3
  // https://peggyjs.org/
4
4
  class peg$SyntaxError extends SyntaxError {
@@ -53,10 +53,9 @@ class peg$SyntaxError extends SyntaxError {
53
53
  }
54
54
  return s;
55
55
  }
56
- function literalEscape(s) {
56
+ function escape(s, special) {
57
57
  return unicodeEscape(s
58
- .replace(/\\/g, "\\\\")
59
- .replace(/"/g, "\\\"")
58
+ .replace(special, "\\$&")
60
59
  .replace(/\0/g, "\\0")
61
60
  .replace(/\t/g, "\\t")
62
61
  .replace(/\n/g, "\\n")
@@ -64,18 +63,11 @@ class peg$SyntaxError extends SyntaxError {
64
63
  .replace(/[\x00-\x0F]/g, ch => "\\x0" + hex(ch))
65
64
  .replace(/[\x10-\x1F\x7F-\x9F]/g, ch => "\\x" + hex(ch)));
66
65
  }
66
+ function literalEscape(s) {
67
+ return escape(s, /[\\"]/g);
68
+ }
67
69
  function classEscape(s) {
68
- return unicodeEscape(s
69
- .replace(/\\/g, "\\\\")
70
- .replace(/\]/g, "\\]")
71
- .replace(/\^/g, "\\^")
72
- .replace(/-/g, "\\-")
73
- .replace(/\0/g, "\\0")
74
- .replace(/\t/g, "\\t")
75
- .replace(/\n/g, "\\n")
76
- .replace(/\r/g, "\\r")
77
- .replace(/[\x00-\x0F]/g, ch => "\\x0" + hex(ch))
78
- .replace(/[\x10-\x1F\x7F-\x9F]/g, ch => "\\x" + hex(ch)));
70
+ return escape(s, /[\\\]^-]/g);
79
71
  }
80
72
  const DESCRIBE_EXPECTATION_FNS = {
81
73
  literal(expectation) {
@@ -144,9 +136,6 @@ function peg$parse(input, options) {
144
136
  const peg$c3 = "`";
145
137
  const peg$c4 = "${";
146
138
  const peg$c5 = "}";
147
- const peg$r0 = /^["]/;
148
- const peg$r1 = /^[']/;
149
- const peg$r2 = /^[`]/;
150
139
  const peg$e0 = peg$literalExpectation("\"", false);
151
140
  const peg$e1 = peg$classExpectation(["\""], false, false, false);
152
141
  const peg$e2 = peg$anyExpectation();
@@ -215,6 +204,7 @@ function peg$parse(input, options) {
215
204
  let peg$maxFailExpected = options.peg$maxFailExpected || [];
216
205
  let peg$silentFails = options.peg$silentFails | 0;
217
206
  let peg$result;
207
+ let peg$charCode;
218
208
  if (options.startRule) {
219
209
  if (!(options.startRule in peg$startRuleFunctions)) {
220
210
  throw new Error("Can't start parsing from rule \"" + options.startRule + "\".");
@@ -345,18 +335,7 @@ function peg$parse(input, options) {
345
335
  function peg$parsestart() {
346
336
  let s0, s1;
347
337
  s0 = [];
348
- s1 = peg$parsequoted_string();
349
- if (s1 === peg$FAILED) {
350
- s1 = peg$parsewrapped_template();
351
- if (s1 === peg$FAILED) {
352
- s1 = peg$parsebare_template();
353
- if (s1 === peg$FAILED) {
354
- s1 = peg$parsetext();
355
- }
356
- }
357
- }
358
- while (s1 !== peg$FAILED) {
359
- s0.push(s1);
338
+ for (;;) {
360
339
  s1 = peg$parsequoted_string();
361
340
  if (s1 === peg$FAILED) {
362
341
  s1 = peg$parsewrapped_template();
@@ -367,6 +346,10 @@ function peg$parse(input, options) {
367
346
  }
368
347
  }
369
348
  }
349
+ if (s1 === peg$FAILED) {
350
+ break;
351
+ }
352
+ s0.push(s1);
370
353
  }
371
354
  return s0;
372
355
  }
@@ -387,63 +370,14 @@ function peg$parse(input, options) {
387
370
  if (s2 !== peg$FAILED) {
388
371
  s3 = peg$currPos;
389
372
  s4 = [];
390
- s5 = peg$parseescaped_char();
391
- if (s5 === peg$FAILED) {
392
- s5 = peg$currPos;
393
- s6 = peg$currPos;
394
- peg$silentFails++;
395
- s7 = input.charAt(peg$currPos);
396
- if (peg$r0.test(s7)) {
397
- peg$currPos++;
398
- }
399
- else {
400
- s7 = peg$FAILED;
401
- if (peg$silentFails === 0) {
402
- peg$fail(peg$e1);
403
- }
404
- }
405
- peg$silentFails--;
406
- if (s7 === peg$FAILED) {
407
- s6 = undefined;
408
- }
409
- else {
410
- peg$currPos = s6;
411
- s6 = peg$FAILED;
412
- }
413
- if (s6 !== peg$FAILED) {
414
- if (input.length > peg$currPos) {
415
- s7 = input.charAt(peg$currPos);
416
- peg$currPos++;
417
- }
418
- else {
419
- s7 = peg$FAILED;
420
- if (peg$silentFails === 0) {
421
- peg$fail(peg$e2);
422
- }
423
- }
424
- if (s7 !== peg$FAILED) {
425
- s6 = [s6, s7];
426
- s5 = s6;
427
- }
428
- else {
429
- peg$currPos = s5;
430
- s5 = peg$FAILED;
431
- }
432
- }
433
- else {
434
- peg$currPos = s5;
435
- s5 = peg$FAILED;
436
- }
437
- }
438
- while (s5 !== peg$FAILED) {
439
- s4.push(s5);
373
+ for (;;) {
440
374
  s5 = peg$parseescaped_char();
441
375
  if (s5 === peg$FAILED) {
442
376
  s5 = peg$currPos;
443
377
  s6 = peg$currPos;
444
378
  peg$silentFails++;
445
379
  s7 = input.charAt(peg$currPos);
446
- if (peg$r0.test(s7)) {
380
+ if ((peg$charCode = s7.charCodeAt(0), peg$charCode === 34)) {
447
381
  peg$currPos++;
448
382
  }
449
383
  else {
@@ -485,6 +419,10 @@ function peg$parse(input, options) {
485
419
  s5 = peg$FAILED;
486
420
  }
487
421
  }
422
+ if (s5 === peg$FAILED) {
423
+ break;
424
+ }
425
+ s4.push(s5);
488
426
  }
489
427
  s3 = input.substring(s3, peg$currPos);
490
428
  if (input.charCodeAt(peg$currPos) === 34) {
@@ -525,63 +463,14 @@ function peg$parse(input, options) {
525
463
  if (s2 !== peg$FAILED) {
526
464
  s3 = peg$currPos;
527
465
  s4 = [];
528
- s5 = peg$parseescaped_char();
529
- if (s5 === peg$FAILED) {
530
- s5 = peg$currPos;
531
- s6 = peg$currPos;
532
- peg$silentFails++;
533
- s7 = input.charAt(peg$currPos);
534
- if (peg$r1.test(s7)) {
535
- peg$currPos++;
536
- }
537
- else {
538
- s7 = peg$FAILED;
539
- if (peg$silentFails === 0) {
540
- peg$fail(peg$e4);
541
- }
542
- }
543
- peg$silentFails--;
544
- if (s7 === peg$FAILED) {
545
- s6 = undefined;
546
- }
547
- else {
548
- peg$currPos = s6;
549
- s6 = peg$FAILED;
550
- }
551
- if (s6 !== peg$FAILED) {
552
- if (input.length > peg$currPos) {
553
- s7 = input.charAt(peg$currPos);
554
- peg$currPos++;
555
- }
556
- else {
557
- s7 = peg$FAILED;
558
- if (peg$silentFails === 0) {
559
- peg$fail(peg$e2);
560
- }
561
- }
562
- if (s7 !== peg$FAILED) {
563
- s6 = [s6, s7];
564
- s5 = s6;
565
- }
566
- else {
567
- peg$currPos = s5;
568
- s5 = peg$FAILED;
569
- }
570
- }
571
- else {
572
- peg$currPos = s5;
573
- s5 = peg$FAILED;
574
- }
575
- }
576
- while (s5 !== peg$FAILED) {
577
- s4.push(s5);
466
+ for (;;) {
578
467
  s5 = peg$parseescaped_char();
579
468
  if (s5 === peg$FAILED) {
580
469
  s5 = peg$currPos;
581
470
  s6 = peg$currPos;
582
471
  peg$silentFails++;
583
472
  s7 = input.charAt(peg$currPos);
584
- if (peg$r1.test(s7)) {
473
+ if ((peg$charCode = s7.charCodeAt(0), peg$charCode === 39)) {
585
474
  peg$currPos++;
586
475
  }
587
476
  else {
@@ -623,6 +512,10 @@ function peg$parse(input, options) {
623
512
  s5 = peg$FAILED;
624
513
  }
625
514
  }
515
+ if (s5 === peg$FAILED) {
516
+ break;
517
+ }
518
+ s4.push(s5);
626
519
  }
627
520
  s3 = input.substring(s3, peg$currPos);
628
521
  if (input.charCodeAt(peg$currPos) === 39) {
@@ -711,58 +604,12 @@ function peg$parse(input, options) {
711
604
  if (s1 !== peg$FAILED) {
712
605
  s2 = peg$currPos;
713
606
  s3 = [];
714
- s4 = peg$currPos;
715
- s5 = peg$currPos;
716
- peg$silentFails++;
717
- s6 = input.charAt(peg$currPos);
718
- if (peg$r2.test(s6)) {
719
- peg$currPos++;
720
- }
721
- else {
722
- s6 = peg$FAILED;
723
- if (peg$silentFails === 0) {
724
- peg$fail(peg$e7);
725
- }
726
- }
727
- peg$silentFails--;
728
- if (s6 === peg$FAILED) {
729
- s5 = undefined;
730
- }
731
- else {
732
- peg$currPos = s5;
733
- s5 = peg$FAILED;
734
- }
735
- if (s5 !== peg$FAILED) {
736
- if (input.length > peg$currPos) {
737
- s6 = input.charAt(peg$currPos);
738
- peg$currPos++;
739
- }
740
- else {
741
- s6 = peg$FAILED;
742
- if (peg$silentFails === 0) {
743
- peg$fail(peg$e2);
744
- }
745
- }
746
- if (s6 !== peg$FAILED) {
747
- s5 = [s5, s6];
748
- s4 = s5;
749
- }
750
- else {
751
- peg$currPos = s4;
752
- s4 = peg$FAILED;
753
- }
754
- }
755
- else {
756
- peg$currPos = s4;
757
- s4 = peg$FAILED;
758
- }
759
- while (s4 !== peg$FAILED) {
760
- s3.push(s4);
607
+ for (;;) {
761
608
  s4 = peg$currPos;
762
609
  s5 = peg$currPos;
763
610
  peg$silentFails++;
764
611
  s6 = input.charAt(peg$currPos);
765
- if (peg$r2.test(s6)) {
612
+ if ((peg$charCode = s6.charCodeAt(0), peg$charCode === 96)) {
766
613
  peg$currPos++;
767
614
  }
768
615
  else {
@@ -803,6 +650,10 @@ function peg$parse(input, options) {
803
650
  peg$currPos = s4;
804
651
  s4 = peg$FAILED;
805
652
  }
653
+ if (s4 === peg$FAILED) {
654
+ break;
655
+ }
656
+ s3.push(s4);
806
657
  }
807
658
  s2 = input.substring(s2, peg$currPos);
808
659
  if (input.charCodeAt(peg$currPos) === 96) {
@@ -857,53 +708,7 @@ function peg$parse(input, options) {
857
708
  if (s1 !== peg$FAILED) {
858
709
  s2 = peg$currPos;
859
710
  s3 = [];
860
- s4 = peg$currPos;
861
- s5 = peg$currPos;
862
- peg$silentFails++;
863
- if (input.charCodeAt(peg$currPos) === 125) {
864
- s6 = peg$c5;
865
- peg$currPos++;
866
- }
867
- else {
868
- s6 = peg$FAILED;
869
- if (peg$silentFails === 0) {
870
- peg$fail(peg$e9);
871
- }
872
- }
873
- peg$silentFails--;
874
- if (s6 === peg$FAILED) {
875
- s5 = undefined;
876
- }
877
- else {
878
- peg$currPos = s5;
879
- s5 = peg$FAILED;
880
- }
881
- if (s5 !== peg$FAILED) {
882
- if (input.length > peg$currPos) {
883
- s6 = input.charAt(peg$currPos);
884
- peg$currPos++;
885
- }
886
- else {
887
- s6 = peg$FAILED;
888
- if (peg$silentFails === 0) {
889
- peg$fail(peg$e2);
890
- }
891
- }
892
- if (s6 !== peg$FAILED) {
893
- s5 = [s5, s6];
894
- s4 = s5;
895
- }
896
- else {
897
- peg$currPos = s4;
898
- s4 = peg$FAILED;
899
- }
900
- }
901
- else {
902
- peg$currPos = s4;
903
- s4 = peg$FAILED;
904
- }
905
- while (s4 !== peg$FAILED) {
906
- s3.push(s4);
711
+ for (;;) {
907
712
  s4 = peg$currPos;
908
713
  s5 = peg$currPos;
909
714
  peg$silentFails++;
@@ -949,6 +754,10 @@ function peg$parse(input, options) {
949
754
  peg$currPos = s4;
950
755
  s4 = peg$FAILED;
951
756
  }
757
+ if (s4 === peg$FAILED) {
758
+ break;
759
+ }
760
+ s3.push(s4);
952
761
  }
953
762
  s2 = input.substring(s2, peg$currPos);
954
763
  if (input.charCodeAt(peg$currPos) === 125) {
@@ -981,218 +790,97 @@ function peg$parse(input, options) {
981
790
  s0 = peg$currPos;
982
791
  s1 = peg$currPos;
983
792
  s2 = [];
984
- s3 = peg$currPos;
985
- s4 = peg$currPos;
986
- peg$silentFails++;
987
- if (input.charCodeAt(peg$currPos) === 34) {
988
- s5 = peg$c0;
989
- peg$currPos++;
990
- }
991
- else {
992
- s5 = peg$FAILED;
993
- if (peg$silentFails === 0) {
994
- peg$fail(peg$e0);
995
- }
996
- }
997
- peg$silentFails--;
998
- if (s5 === peg$FAILED) {
999
- s4 = undefined;
1000
- }
1001
- else {
1002
- peg$currPos = s4;
1003
- s4 = peg$FAILED;
1004
- }
1005
- if (s4 !== peg$FAILED) {
1006
- s5 = peg$currPos;
793
+ for (;;) {
794
+ s3 = peg$currPos;
795
+ s4 = peg$currPos;
1007
796
  peg$silentFails++;
1008
- if (input.charCodeAt(peg$currPos) === 39) {
1009
- s6 = peg$c1;
797
+ if (input.charCodeAt(peg$currPos) === 34) {
798
+ s5 = peg$c0;
1010
799
  peg$currPos++;
1011
800
  }
1012
801
  else {
1013
- s6 = peg$FAILED;
802
+ s5 = peg$FAILED;
1014
803
  if (peg$silentFails === 0) {
1015
- peg$fail(peg$e3);
804
+ peg$fail(peg$e0);
1016
805
  }
1017
806
  }
1018
807
  peg$silentFails--;
1019
- if (s6 === peg$FAILED) {
1020
- s5 = undefined;
808
+ if (s5 === peg$FAILED) {
809
+ s4 = undefined;
1021
810
  }
1022
811
  else {
1023
- peg$currPos = s5;
1024
- s5 = peg$FAILED;
812
+ peg$currPos = s4;
813
+ s4 = peg$FAILED;
1025
814
  }
1026
- if (s5 !== peg$FAILED) {
1027
- s6 = peg$currPos;
815
+ if (s4 !== peg$FAILED) {
816
+ s5 = peg$currPos;
1028
817
  peg$silentFails++;
1029
- if (input.charCodeAt(peg$currPos) === 96) {
1030
- s7 = peg$c3;
818
+ if (input.charCodeAt(peg$currPos) === 39) {
819
+ s6 = peg$c1;
1031
820
  peg$currPos++;
1032
821
  }
1033
822
  else {
1034
- s7 = peg$FAILED;
1035
- if (peg$silentFails === 0) {
1036
- peg$fail(peg$e6);
1037
- }
1038
- }
1039
- peg$silentFails--;
1040
- if (s7 === peg$FAILED) {
1041
- s6 = undefined;
1042
- }
1043
- else {
1044
- peg$currPos = s6;
1045
823
  s6 = peg$FAILED;
1046
- }
1047
- if (s6 !== peg$FAILED) {
1048
- s7 = peg$currPos;
1049
- peg$silentFails++;
1050
- s8 = peg$parsetemplate_body();
1051
- peg$silentFails--;
1052
- if (s8 === peg$FAILED) {
1053
- s7 = undefined;
1054
- }
1055
- else {
1056
- peg$currPos = s7;
1057
- s7 = peg$FAILED;
1058
- }
1059
- if (s7 !== peg$FAILED) {
1060
- if (input.length > peg$currPos) {
1061
- s8 = input.charAt(peg$currPos);
1062
- peg$currPos++;
1063
- }
1064
- else {
1065
- s8 = peg$FAILED;
1066
- if (peg$silentFails === 0) {
1067
- peg$fail(peg$e2);
1068
- }
1069
- }
1070
- if (s8 !== peg$FAILED) {
1071
- s4 = [s4, s5, s6, s7, s8];
1072
- s3 = s4;
1073
- }
1074
- else {
1075
- peg$currPos = s3;
1076
- s3 = peg$FAILED;
1077
- }
1078
- }
1079
- else {
1080
- peg$currPos = s3;
1081
- s3 = peg$FAILED;
1082
- }
1083
- }
1084
- else {
1085
- peg$currPos = s3;
1086
- s3 = peg$FAILED;
1087
- }
1088
- }
1089
- else {
1090
- peg$currPos = s3;
1091
- s3 = peg$FAILED;
1092
- }
1093
- }
1094
- else {
1095
- peg$currPos = s3;
1096
- s3 = peg$FAILED;
1097
- }
1098
- if (s3 !== peg$FAILED) {
1099
- while (s3 !== peg$FAILED) {
1100
- s2.push(s3);
1101
- s3 = peg$currPos;
1102
- s4 = peg$currPos;
1103
- peg$silentFails++;
1104
- if (input.charCodeAt(peg$currPos) === 34) {
1105
- s5 = peg$c0;
1106
- peg$currPos++;
1107
- }
1108
- else {
1109
- s5 = peg$FAILED;
1110
824
  if (peg$silentFails === 0) {
1111
- peg$fail(peg$e0);
825
+ peg$fail(peg$e3);
1112
826
  }
1113
827
  }
1114
828
  peg$silentFails--;
1115
- if (s5 === peg$FAILED) {
1116
- s4 = undefined;
829
+ if (s6 === peg$FAILED) {
830
+ s5 = undefined;
1117
831
  }
1118
832
  else {
1119
- peg$currPos = s4;
1120
- s4 = peg$FAILED;
833
+ peg$currPos = s5;
834
+ s5 = peg$FAILED;
1121
835
  }
1122
- if (s4 !== peg$FAILED) {
1123
- s5 = peg$currPos;
836
+ if (s5 !== peg$FAILED) {
837
+ s6 = peg$currPos;
1124
838
  peg$silentFails++;
1125
- if (input.charCodeAt(peg$currPos) === 39) {
1126
- s6 = peg$c1;
839
+ if (input.charCodeAt(peg$currPos) === 96) {
840
+ s7 = peg$c3;
1127
841
  peg$currPos++;
1128
842
  }
1129
843
  else {
1130
- s6 = peg$FAILED;
844
+ s7 = peg$FAILED;
1131
845
  if (peg$silentFails === 0) {
1132
- peg$fail(peg$e3);
846
+ peg$fail(peg$e6);
1133
847
  }
1134
848
  }
1135
849
  peg$silentFails--;
1136
- if (s6 === peg$FAILED) {
1137
- s5 = undefined;
850
+ if (s7 === peg$FAILED) {
851
+ s6 = undefined;
1138
852
  }
1139
853
  else {
1140
- peg$currPos = s5;
1141
- s5 = peg$FAILED;
854
+ peg$currPos = s6;
855
+ s6 = peg$FAILED;
1142
856
  }
1143
- if (s5 !== peg$FAILED) {
1144
- s6 = peg$currPos;
857
+ if (s6 !== peg$FAILED) {
858
+ s7 = peg$currPos;
1145
859
  peg$silentFails++;
1146
- if (input.charCodeAt(peg$currPos) === 96) {
1147
- s7 = peg$c3;
1148
- peg$currPos++;
1149
- }
1150
- else {
1151
- s7 = peg$FAILED;
1152
- if (peg$silentFails === 0) {
1153
- peg$fail(peg$e6);
1154
- }
1155
- }
860
+ s8 = peg$parsetemplate_body();
1156
861
  peg$silentFails--;
1157
- if (s7 === peg$FAILED) {
1158
- s6 = undefined;
862
+ if (s8 === peg$FAILED) {
863
+ s7 = undefined;
1159
864
  }
1160
865
  else {
1161
- peg$currPos = s6;
1162
- s6 = peg$FAILED;
866
+ peg$currPos = s7;
867
+ s7 = peg$FAILED;
1163
868
  }
1164
- if (s6 !== peg$FAILED) {
1165
- s7 = peg$currPos;
1166
- peg$silentFails++;
1167
- s8 = peg$parsetemplate_body();
1168
- peg$silentFails--;
1169
- if (s8 === peg$FAILED) {
1170
- s7 = undefined;
869
+ if (s7 !== peg$FAILED) {
870
+ if (input.length > peg$currPos) {
871
+ s8 = input.charAt(peg$currPos);
872
+ peg$currPos++;
1171
873
  }
1172
874
  else {
1173
- peg$currPos = s7;
1174
- s7 = peg$FAILED;
1175
- }
1176
- if (s7 !== peg$FAILED) {
1177
- if (input.length > peg$currPos) {
1178
- s8 = input.charAt(peg$currPos);
1179
- peg$currPos++;
1180
- }
1181
- else {
1182
- s8 = peg$FAILED;
1183
- if (peg$silentFails === 0) {
1184
- peg$fail(peg$e2);
1185
- }
1186
- }
1187
- if (s8 !== peg$FAILED) {
1188
- s4 = [s4, s5, s6, s7, s8];
1189
- s3 = s4;
1190
- }
1191
- else {
1192
- peg$currPos = s3;
1193
- s3 = peg$FAILED;
875
+ s8 = peg$FAILED;
876
+ if (peg$silentFails === 0) {
877
+ peg$fail(peg$e2);
1194
878
  }
1195
879
  }
880
+ if (s8 !== peg$FAILED) {
881
+ s4 = [s4, s5, s6, s7, s8];
882
+ s3 = s4;
883
+ }
1196
884
  else {
1197
885
  peg$currPos = s3;
1198
886
  s3 = peg$FAILED;
@@ -1213,8 +901,16 @@ function peg$parse(input, options) {
1213
901
  s3 = peg$FAILED;
1214
902
  }
1215
903
  }
904
+ else {
905
+ peg$currPos = s3;
906
+ s3 = peg$FAILED;
907
+ }
908
+ if (s3 === peg$FAILED) {
909
+ break;
910
+ }
911
+ s2.push(s3);
1216
912
  }
1217
- else {
913
+ if (s2.length < 1) {
1218
914
  s2 = peg$FAILED;
1219
915
  }
1220
916
  if (s2 !== peg$FAILED) {