@wireweave/core 2.8.0 → 3.0.0-beta.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.
- package/dist/index.cjs +534 -299
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +530 -299
- package/dist/parser.cjs +409 -284
- package/dist/parser.d.cts +1 -1
- package/dist/parser.d.ts +1 -1
- package/dist/parser.js +409 -284
- package/dist/renderer.cjs +127 -17
- package/dist/renderer.d.cts +120 -7
- package/dist/renderer.d.ts +120 -7
- package/dist/renderer.js +122 -16
- package/dist/{types-CQDDIeyC.d.cts → types-hEr_afgw.d.cts} +23 -0
- package/dist/{types-CQDDIeyC.d.ts → types-hEr_afgw.d.ts} +23 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -455,27 +455,30 @@ function peg$parse(input, options) {
|
|
|
455
455
|
const peg$c51 = "breadcrumb";
|
|
456
456
|
const peg$c52 = "marker";
|
|
457
457
|
const peg$c53 = "annotations";
|
|
458
|
-
const peg$c54 = "
|
|
459
|
-
const peg$c55 = "
|
|
460
|
-
const peg$c56 = "
|
|
461
|
-
const peg$c57 =
|
|
462
|
-
const peg$c58 = "
|
|
463
|
-
const peg$c59 = "
|
|
464
|
-
const peg$c60 = "
|
|
465
|
-
const peg$c61 = "
|
|
466
|
-
const peg$c62 = "
|
|
467
|
-
const peg$c63 = "
|
|
468
|
-
const peg$c64 = "
|
|
469
|
-
const peg$c65 = "
|
|
470
|
-
const peg$c66 = "
|
|
471
|
-
const peg$c67 = "
|
|
472
|
-
const peg$c68 = "
|
|
473
|
-
const peg$c69 = "
|
|
474
|
-
const peg$c70 = "
|
|
475
|
-
const peg$c71 = "
|
|
476
|
-
const peg$c72 = "
|
|
477
|
-
const peg$c73 = "
|
|
478
|
-
const peg$c74 = "
|
|
458
|
+
const peg$c54 = "at";
|
|
459
|
+
const peg$c55 = "(";
|
|
460
|
+
const peg$c56 = ")";
|
|
461
|
+
const peg$c57 = "=";
|
|
462
|
+
const peg$c58 = "//";
|
|
463
|
+
const peg$c59 = "/*";
|
|
464
|
+
const peg$c60 = '"';
|
|
465
|
+
const peg$c61 = "'";
|
|
466
|
+
const peg$c62 = "\\";
|
|
467
|
+
const peg$c63 = "n";
|
|
468
|
+
const peg$c64 = "r";
|
|
469
|
+
const peg$c65 = "t";
|
|
470
|
+
const peg$c66 = "-";
|
|
471
|
+
const peg$c67 = ".";
|
|
472
|
+
const peg$c68 = "px";
|
|
473
|
+
const peg$c69 = "%";
|
|
474
|
+
const peg$c70 = "em";
|
|
475
|
+
const peg$c71 = "rem";
|
|
476
|
+
const peg$c72 = "vh";
|
|
477
|
+
const peg$c73 = "vw";
|
|
478
|
+
const peg$c74 = "true";
|
|
479
|
+
const peg$c75 = "false";
|
|
480
|
+
const peg$c76 = "\n";
|
|
481
|
+
const peg$c77 = "*/";
|
|
479
482
|
const peg$r0 = /^[0-9]/;
|
|
480
483
|
const peg$r1 = /^[=[{}]/;
|
|
481
484
|
const peg$r2 = /^[a-zA-Z0-9_\-]/;
|
|
@@ -538,41 +541,46 @@ function peg$parse(input, options) {
|
|
|
538
541
|
const peg$e53 = peg$literalExpectation("annotations", false);
|
|
539
542
|
const peg$e54 = peg$otherExpectation("integer");
|
|
540
543
|
const peg$e55 = peg$classExpectation([["0", "9"]], false, false, false);
|
|
541
|
-
const peg$e56 = peg$literalExpectation("
|
|
542
|
-
const peg$e57 = peg$
|
|
543
|
-
const peg$e58 = peg$literalExpectation("
|
|
544
|
-
const peg$e59 = peg$literalExpectation("
|
|
545
|
-
const peg$e60 = peg$
|
|
546
|
-
const peg$e61 = peg$
|
|
547
|
-
const peg$e62 = peg$
|
|
548
|
-
const peg$e63 = peg$
|
|
549
|
-
const peg$e64 = peg$
|
|
550
|
-
const peg$e65 = peg$
|
|
551
|
-
const peg$e66 = peg$literalExpectation("
|
|
552
|
-
const peg$e67 = peg$literalExpectation("
|
|
553
|
-
const peg$e68 = peg$literalExpectation("
|
|
554
|
-
const peg$e69 = peg$
|
|
555
|
-
const peg$e70 = peg$literalExpectation("
|
|
556
|
-
const peg$e71 = peg$literalExpectation("
|
|
557
|
-
const peg$e72 = peg$otherExpectation("
|
|
558
|
-
const peg$e73 = peg$literalExpectation("
|
|
559
|
-
const peg$e74 = peg$literalExpectation("
|
|
560
|
-
const peg$e75 = peg$
|
|
561
|
-
const peg$e76 = peg$literalExpectation("
|
|
562
|
-
const peg$e77 = peg$literalExpectation("
|
|
563
|
-
const peg$e78 = peg$literalExpectation("
|
|
564
|
-
const peg$e79 = peg$
|
|
565
|
-
const peg$e80 = peg$literalExpectation("
|
|
566
|
-
const peg$e81 = peg$literalExpectation("
|
|
567
|
-
const peg$e82 = peg$otherExpectation("
|
|
568
|
-
const peg$e83 = peg$
|
|
569
|
-
const peg$e84 = peg$
|
|
570
|
-
const peg$e85 = peg$otherExpectation("
|
|
571
|
-
const peg$e86 = peg$classExpectation(["
|
|
572
|
-
const peg$e87 = peg$
|
|
573
|
-
const peg$e88 = peg$
|
|
544
|
+
const peg$e56 = peg$literalExpectation("at", false);
|
|
545
|
+
const peg$e57 = peg$literalExpectation("(", false);
|
|
546
|
+
const peg$e58 = peg$literalExpectation(")", false);
|
|
547
|
+
const peg$e59 = peg$literalExpectation("=", false);
|
|
548
|
+
const peg$e60 = peg$classExpectation(["=", "[", "{", "}"], false, false, false);
|
|
549
|
+
const peg$e61 = peg$literalExpectation("//", false);
|
|
550
|
+
const peg$e62 = peg$literalExpectation("/*", false);
|
|
551
|
+
const peg$e63 = peg$anyExpectation();
|
|
552
|
+
const peg$e64 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"], "_", "-"], false, false, false);
|
|
553
|
+
const peg$e65 = peg$otherExpectation("string");
|
|
554
|
+
const peg$e66 = peg$literalExpectation('"', false);
|
|
555
|
+
const peg$e67 = peg$literalExpectation("'", false);
|
|
556
|
+
const peg$e68 = peg$literalExpectation("\\", false);
|
|
557
|
+
const peg$e69 = peg$literalExpectation("n", false);
|
|
558
|
+
const peg$e70 = peg$literalExpectation("r", false);
|
|
559
|
+
const peg$e71 = peg$literalExpectation("t", false);
|
|
560
|
+
const peg$e72 = peg$otherExpectation("number");
|
|
561
|
+
const peg$e73 = peg$literalExpectation("-", false);
|
|
562
|
+
const peg$e74 = peg$literalExpectation(".", false);
|
|
563
|
+
const peg$e75 = peg$otherExpectation("value with unit");
|
|
564
|
+
const peg$e76 = peg$literalExpectation("px", false);
|
|
565
|
+
const peg$e77 = peg$literalExpectation("%", false);
|
|
566
|
+
const peg$e78 = peg$literalExpectation("em", false);
|
|
567
|
+
const peg$e79 = peg$literalExpectation("rem", false);
|
|
568
|
+
const peg$e80 = peg$literalExpectation("vh", false);
|
|
569
|
+
const peg$e81 = peg$literalExpectation("vw", false);
|
|
570
|
+
const peg$e82 = peg$otherExpectation("boolean");
|
|
571
|
+
const peg$e83 = peg$literalExpectation("true", false);
|
|
572
|
+
const peg$e84 = peg$literalExpectation("false", false);
|
|
573
|
+
const peg$e85 = peg$otherExpectation("identifier");
|
|
574
|
+
const peg$e86 = peg$classExpectation([["a", "z"], ["A", "Z"], "_"], false, false, false);
|
|
575
|
+
const peg$e87 = peg$classExpectation([" ", " ", "\n", "\r"], false, false, false);
|
|
576
|
+
const peg$e88 = peg$otherExpectation("comment");
|
|
577
|
+
const peg$e89 = peg$classExpectation(["\n"], true, false, false);
|
|
578
|
+
const peg$e90 = peg$literalExpectation("\n", false);
|
|
579
|
+
const peg$e91 = peg$literalExpectation("*/", false);
|
|
574
580
|
function peg$f0(children) {
|
|
575
|
-
return createNode("Document", {
|
|
581
|
+
return createNode("Document", {
|
|
582
|
+
children: children.map((c) => c[0]).filter((c) => c !== null)
|
|
583
|
+
});
|
|
576
584
|
}
|
|
577
585
|
function peg$f1() {
|
|
578
586
|
return null;
|
|
@@ -1008,75 +1016,81 @@ function peg$parse(input, options) {
|
|
|
1008
1016
|
function peg$f78(attrs) {
|
|
1009
1017
|
return attrs;
|
|
1010
1018
|
}
|
|
1011
|
-
function peg$f79(
|
|
1019
|
+
function peg$f79(x, y) {
|
|
1020
|
+
return [
|
|
1021
|
+
{ name: "x", value: x },
|
|
1022
|
+
{ name: "y", value: y }
|
|
1023
|
+
];
|
|
1024
|
+
}
|
|
1025
|
+
function peg$f80(name, value) {
|
|
1012
1026
|
return { name, value };
|
|
1013
1027
|
}
|
|
1014
|
-
function peg$
|
|
1028
|
+
function peg$f81(flag) {
|
|
1015
1029
|
return { name: flag, value: true };
|
|
1016
1030
|
}
|
|
1017
|
-
function peg$
|
|
1031
|
+
function peg$f82(name) {
|
|
1018
1032
|
return name;
|
|
1019
1033
|
}
|
|
1020
|
-
function peg$
|
|
1034
|
+
function peg$f83(chars) {
|
|
1021
1035
|
return chars.join("");
|
|
1022
1036
|
}
|
|
1023
|
-
function peg$
|
|
1037
|
+
function peg$f84(chars) {
|
|
1024
1038
|
return chars.join("");
|
|
1025
1039
|
}
|
|
1026
|
-
function peg$
|
|
1040
|
+
function peg$f85(char) {
|
|
1027
1041
|
return char;
|
|
1028
1042
|
}
|
|
1029
|
-
function peg$
|
|
1043
|
+
function peg$f86(seq) {
|
|
1030
1044
|
return seq;
|
|
1031
1045
|
}
|
|
1032
|
-
function peg$
|
|
1046
|
+
function peg$f87(char) {
|
|
1033
1047
|
return char;
|
|
1034
1048
|
}
|
|
1035
|
-
function peg$
|
|
1049
|
+
function peg$f88(seq) {
|
|
1036
1050
|
return seq;
|
|
1037
1051
|
}
|
|
1038
|
-
function peg$
|
|
1052
|
+
function peg$f89() {
|
|
1039
1053
|
return "\n";
|
|
1040
1054
|
}
|
|
1041
|
-
function peg$
|
|
1055
|
+
function peg$f90() {
|
|
1042
1056
|
return "\r";
|
|
1043
1057
|
}
|
|
1044
|
-
function peg$
|
|
1058
|
+
function peg$f91() {
|
|
1045
1059
|
return " ";
|
|
1046
1060
|
}
|
|
1047
|
-
function peg$
|
|
1061
|
+
function peg$f92() {
|
|
1048
1062
|
return "\\";
|
|
1049
1063
|
}
|
|
1050
|
-
function peg$
|
|
1064
|
+
function peg$f93() {
|
|
1051
1065
|
return '"';
|
|
1052
1066
|
}
|
|
1053
|
-
function peg$
|
|
1067
|
+
function peg$f94() {
|
|
1054
1068
|
return "'";
|
|
1055
1069
|
}
|
|
1056
|
-
function peg$
|
|
1070
|
+
function peg$f95(sign, digits, decimal) {
|
|
1057
1071
|
const num = (sign || "") + digits.join("") + (decimal ? "." + decimal[1].join("") : "");
|
|
1058
1072
|
return parseFloat(num);
|
|
1059
1073
|
}
|
|
1060
|
-
function peg$
|
|
1074
|
+
function peg$f96(sign, digits, decimal, unit) {
|
|
1061
1075
|
const num = (sign || "") + digits.join("") + (decimal ? "." + decimal[1].join("") : "");
|
|
1062
1076
|
return { value: parseFloat(num), unit };
|
|
1063
1077
|
}
|
|
1064
|
-
function peg$
|
|
1078
|
+
function peg$f97() {
|
|
1065
1079
|
return true;
|
|
1066
1080
|
}
|
|
1067
|
-
function peg$
|
|
1081
|
+
function peg$f98() {
|
|
1068
1082
|
return false;
|
|
1069
1083
|
}
|
|
1070
|
-
function peg$
|
|
1084
|
+
function peg$f99(head, tail) {
|
|
1071
1085
|
return head + tail.join("");
|
|
1072
1086
|
}
|
|
1073
|
-
function peg$
|
|
1087
|
+
function peg$f100(items) {
|
|
1074
1088
|
return items || [];
|
|
1075
1089
|
}
|
|
1076
|
-
function peg$
|
|
1090
|
+
function peg$f101(head, tail) {
|
|
1077
1091
|
return [head, ...tail.map((t) => t[3])];
|
|
1078
1092
|
}
|
|
1079
|
-
function peg$
|
|
1093
|
+
function peg$f102(props) {
|
|
1080
1094
|
const result = {};
|
|
1081
1095
|
if (props) {
|
|
1082
1096
|
for (const p of props) {
|
|
@@ -1085,13 +1099,13 @@ function peg$parse(input, options) {
|
|
|
1085
1099
|
}
|
|
1086
1100
|
return result;
|
|
1087
1101
|
}
|
|
1088
|
-
function peg$
|
|
1102
|
+
function peg$f103(head, tail) {
|
|
1089
1103
|
return [head, ...tail.map((t) => t[3])];
|
|
1090
1104
|
}
|
|
1091
|
-
function peg$
|
|
1105
|
+
function peg$f104(name, value) {
|
|
1092
1106
|
return { name, value };
|
|
1093
1107
|
}
|
|
1094
|
-
function peg$
|
|
1108
|
+
function peg$f105(name) {
|
|
1095
1109
|
return { name, value: true };
|
|
1096
1110
|
}
|
|
1097
1111
|
let peg$currPos = options.peg$currPos | 0;
|
|
@@ -1232,16 +1246,33 @@ function peg$parse(input, options) {
|
|
|
1232
1246
|
);
|
|
1233
1247
|
}
|
|
1234
1248
|
function peg$parseDocument() {
|
|
1235
|
-
let s0, s1, s2, s3;
|
|
1249
|
+
let s0, s1, s2, s3, s4, s5;
|
|
1236
1250
|
s0 = peg$currPos;
|
|
1237
1251
|
s1 = peg$parse_();
|
|
1238
1252
|
s2 = [];
|
|
1239
|
-
s3 = peg$
|
|
1253
|
+
s3 = peg$currPos;
|
|
1254
|
+
s4 = peg$parseTopLevelElement();
|
|
1255
|
+
if (s4 !== peg$FAILED) {
|
|
1256
|
+
s5 = peg$parse_();
|
|
1257
|
+
s4 = [s4, s5];
|
|
1258
|
+
s3 = s4;
|
|
1259
|
+
} else {
|
|
1260
|
+
peg$currPos = s3;
|
|
1261
|
+
s3 = peg$FAILED;
|
|
1262
|
+
}
|
|
1240
1263
|
while (s3 !== peg$FAILED) {
|
|
1241
1264
|
s2.push(s3);
|
|
1242
|
-
s3 = peg$
|
|
1265
|
+
s3 = peg$currPos;
|
|
1266
|
+
s4 = peg$parseTopLevelElement();
|
|
1267
|
+
if (s4 !== peg$FAILED) {
|
|
1268
|
+
s5 = peg$parse_();
|
|
1269
|
+
s4 = [s4, s5];
|
|
1270
|
+
s3 = s4;
|
|
1271
|
+
} else {
|
|
1272
|
+
peg$currPos = s3;
|
|
1273
|
+
s3 = peg$FAILED;
|
|
1274
|
+
}
|
|
1243
1275
|
}
|
|
1244
|
-
s3 = peg$parse_();
|
|
1245
1276
|
peg$savedPos = s0;
|
|
1246
1277
|
s0 = peg$f0(s2);
|
|
1247
1278
|
return s0;
|
|
@@ -4587,27 +4618,87 @@ function peg$parse(input, options) {
|
|
|
4587
4618
|
return s0;
|
|
4588
4619
|
}
|
|
4589
4620
|
function peg$parseAttribute() {
|
|
4590
|
-
let s0, s1, s2, s3, s4, s5, s6, s7;
|
|
4621
|
+
let s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13;
|
|
4591
4622
|
s0 = peg$currPos;
|
|
4592
4623
|
s1 = peg$parse_();
|
|
4593
|
-
|
|
4624
|
+
if (input.substr(peg$currPos, 2) === peg$c54) {
|
|
4625
|
+
s2 = peg$c54;
|
|
4626
|
+
peg$currPos += 2;
|
|
4627
|
+
} else {
|
|
4628
|
+
s2 = peg$FAILED;
|
|
4629
|
+
if (peg$silentFails === 0) {
|
|
4630
|
+
peg$fail(peg$e56);
|
|
4631
|
+
}
|
|
4632
|
+
}
|
|
4594
4633
|
if (s2 !== peg$FAILED) {
|
|
4595
|
-
s3 = peg$
|
|
4596
|
-
|
|
4597
|
-
|
|
4598
|
-
|
|
4634
|
+
s3 = peg$currPos;
|
|
4635
|
+
peg$silentFails++;
|
|
4636
|
+
s4 = peg$parseIdentifierChar();
|
|
4637
|
+
peg$silentFails--;
|
|
4638
|
+
if (s4 === peg$FAILED) {
|
|
4639
|
+
s3 = void 0;
|
|
4599
4640
|
} else {
|
|
4600
|
-
|
|
4601
|
-
|
|
4602
|
-
peg$fail(peg$e56);
|
|
4603
|
-
}
|
|
4641
|
+
peg$currPos = s3;
|
|
4642
|
+
s3 = peg$FAILED;
|
|
4604
4643
|
}
|
|
4605
|
-
if (
|
|
4606
|
-
|
|
4607
|
-
|
|
4608
|
-
|
|
4609
|
-
peg$
|
|
4610
|
-
|
|
4644
|
+
if (s3 !== peg$FAILED) {
|
|
4645
|
+
s4 = peg$parse_();
|
|
4646
|
+
if (input.charCodeAt(peg$currPos) === 40) {
|
|
4647
|
+
s5 = peg$c55;
|
|
4648
|
+
peg$currPos++;
|
|
4649
|
+
} else {
|
|
4650
|
+
s5 = peg$FAILED;
|
|
4651
|
+
if (peg$silentFails === 0) {
|
|
4652
|
+
peg$fail(peg$e57);
|
|
4653
|
+
}
|
|
4654
|
+
}
|
|
4655
|
+
if (s5 !== peg$FAILED) {
|
|
4656
|
+
s6 = peg$parse_();
|
|
4657
|
+
s7 = peg$parseNumber();
|
|
4658
|
+
if (s7 !== peg$FAILED) {
|
|
4659
|
+
s8 = peg$parse_();
|
|
4660
|
+
if (input.charCodeAt(peg$currPos) === 44) {
|
|
4661
|
+
s9 = peg$c34;
|
|
4662
|
+
peg$currPos++;
|
|
4663
|
+
} else {
|
|
4664
|
+
s9 = peg$FAILED;
|
|
4665
|
+
if (peg$silentFails === 0) {
|
|
4666
|
+
peg$fail(peg$e34);
|
|
4667
|
+
}
|
|
4668
|
+
}
|
|
4669
|
+
if (s9 !== peg$FAILED) {
|
|
4670
|
+
s10 = peg$parse_();
|
|
4671
|
+
s11 = peg$parseNumber();
|
|
4672
|
+
if (s11 !== peg$FAILED) {
|
|
4673
|
+
s12 = peg$parse_();
|
|
4674
|
+
if (input.charCodeAt(peg$currPos) === 41) {
|
|
4675
|
+
s13 = peg$c56;
|
|
4676
|
+
peg$currPos++;
|
|
4677
|
+
} else {
|
|
4678
|
+
s13 = peg$FAILED;
|
|
4679
|
+
if (peg$silentFails === 0) {
|
|
4680
|
+
peg$fail(peg$e58);
|
|
4681
|
+
}
|
|
4682
|
+
}
|
|
4683
|
+
if (s13 !== peg$FAILED) {
|
|
4684
|
+
peg$savedPos = s0;
|
|
4685
|
+
s0 = peg$f79(s7, s11);
|
|
4686
|
+
} else {
|
|
4687
|
+
peg$currPos = s0;
|
|
4688
|
+
s0 = peg$FAILED;
|
|
4689
|
+
}
|
|
4690
|
+
} else {
|
|
4691
|
+
peg$currPos = s0;
|
|
4692
|
+
s0 = peg$FAILED;
|
|
4693
|
+
}
|
|
4694
|
+
} else {
|
|
4695
|
+
peg$currPos = s0;
|
|
4696
|
+
s0 = peg$FAILED;
|
|
4697
|
+
}
|
|
4698
|
+
} else {
|
|
4699
|
+
peg$currPos = s0;
|
|
4700
|
+
s0 = peg$FAILED;
|
|
4701
|
+
}
|
|
4611
4702
|
} else {
|
|
4612
4703
|
peg$currPos = s0;
|
|
4613
4704
|
s0 = peg$FAILED;
|
|
@@ -4625,91 +4716,125 @@ function peg$parse(input, options) {
|
|
|
4625
4716
|
s1 = peg$parse_();
|
|
4626
4717
|
s2 = peg$parseAttributeName();
|
|
4627
4718
|
if (s2 !== peg$FAILED) {
|
|
4628
|
-
s3 = peg$
|
|
4629
|
-
peg$
|
|
4630
|
-
|
|
4631
|
-
|
|
4632
|
-
|
|
4633
|
-
|
|
4634
|
-
|
|
4719
|
+
s3 = peg$parse_();
|
|
4720
|
+
if (input.charCodeAt(peg$currPos) === 61) {
|
|
4721
|
+
s4 = peg$c57;
|
|
4722
|
+
peg$currPos++;
|
|
4723
|
+
} else {
|
|
4724
|
+
s4 = peg$FAILED;
|
|
4725
|
+
if (peg$silentFails === 0) {
|
|
4726
|
+
peg$fail(peg$e59);
|
|
4727
|
+
}
|
|
4728
|
+
}
|
|
4729
|
+
if (s4 !== peg$FAILED) {
|
|
4730
|
+
s5 = peg$parse_();
|
|
4731
|
+
s6 = peg$parseAttributeValue();
|
|
4732
|
+
if (s6 !== peg$FAILED) {
|
|
4733
|
+
peg$savedPos = s0;
|
|
4734
|
+
s0 = peg$f80(s2, s6);
|
|
4735
|
+
} else {
|
|
4736
|
+
peg$currPos = s0;
|
|
4737
|
+
s0 = peg$FAILED;
|
|
4738
|
+
}
|
|
4739
|
+
} else {
|
|
4740
|
+
peg$currPos = s0;
|
|
4741
|
+
s0 = peg$FAILED;
|
|
4742
|
+
}
|
|
4743
|
+
} else {
|
|
4744
|
+
peg$currPos = s0;
|
|
4745
|
+
s0 = peg$FAILED;
|
|
4746
|
+
}
|
|
4747
|
+
if (s0 === peg$FAILED) {
|
|
4748
|
+
s0 = peg$currPos;
|
|
4749
|
+
s1 = peg$parse_();
|
|
4750
|
+
s2 = peg$parseAttributeName();
|
|
4751
|
+
if (s2 !== peg$FAILED) {
|
|
4752
|
+
s3 = peg$currPos;
|
|
4753
|
+
peg$silentFails++;
|
|
4754
|
+
s4 = peg$currPos;
|
|
4755
|
+
s5 = peg$parse_();
|
|
4756
|
+
s6 = peg$parseChildKeyword();
|
|
4635
4757
|
if (s6 === peg$FAILED) {
|
|
4636
|
-
s6 =
|
|
4637
|
-
if (peg$r1.test(s6)) {
|
|
4638
|
-
peg$currPos++;
|
|
4639
|
-
} else {
|
|
4640
|
-
s6 = peg$FAILED;
|
|
4641
|
-
if (peg$silentFails === 0) {
|
|
4642
|
-
peg$fail(peg$e57);
|
|
4643
|
-
}
|
|
4644
|
-
}
|
|
4758
|
+
s6 = peg$parseAttributeName();
|
|
4645
4759
|
if (s6 === peg$FAILED) {
|
|
4646
|
-
|
|
4647
|
-
|
|
4648
|
-
peg$currPos
|
|
4760
|
+
s6 = input.charAt(peg$currPos);
|
|
4761
|
+
if (peg$r1.test(s6)) {
|
|
4762
|
+
peg$currPos++;
|
|
4649
4763
|
} else {
|
|
4650
4764
|
s6 = peg$FAILED;
|
|
4651
4765
|
if (peg$silentFails === 0) {
|
|
4652
|
-
peg$fail(peg$
|
|
4766
|
+
peg$fail(peg$e60);
|
|
4653
4767
|
}
|
|
4654
4768
|
}
|
|
4655
4769
|
if (s6 === peg$FAILED) {
|
|
4656
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
4657
|
-
s6 = peg$
|
|
4770
|
+
if (input.substr(peg$currPos, 2) === peg$c58) {
|
|
4771
|
+
s6 = peg$c58;
|
|
4658
4772
|
peg$currPos += 2;
|
|
4659
4773
|
} else {
|
|
4660
4774
|
s6 = peg$FAILED;
|
|
4661
4775
|
if (peg$silentFails === 0) {
|
|
4662
|
-
peg$fail(peg$
|
|
4776
|
+
peg$fail(peg$e61);
|
|
4663
4777
|
}
|
|
4664
4778
|
}
|
|
4665
4779
|
if (s6 === peg$FAILED) {
|
|
4666
|
-
|
|
4667
|
-
|
|
4668
|
-
|
|
4669
|
-
s7 = input.charAt(peg$currPos);
|
|
4670
|
-
peg$currPos++;
|
|
4780
|
+
if (input.substr(peg$currPos, 2) === peg$c59) {
|
|
4781
|
+
s6 = peg$c59;
|
|
4782
|
+
peg$currPos += 2;
|
|
4671
4783
|
} else {
|
|
4672
|
-
|
|
4784
|
+
s6 = peg$FAILED;
|
|
4673
4785
|
if (peg$silentFails === 0) {
|
|
4674
|
-
peg$fail(peg$
|
|
4786
|
+
peg$fail(peg$e62);
|
|
4675
4787
|
}
|
|
4676
4788
|
}
|
|
4677
|
-
peg$
|
|
4678
|
-
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
|
|
4682
|
-
|
|
4789
|
+
if (s6 === peg$FAILED) {
|
|
4790
|
+
s6 = peg$currPos;
|
|
4791
|
+
peg$silentFails++;
|
|
4792
|
+
if (input.length > peg$currPos) {
|
|
4793
|
+
s7 = input.charAt(peg$currPos);
|
|
4794
|
+
peg$currPos++;
|
|
4795
|
+
} else {
|
|
4796
|
+
s7 = peg$FAILED;
|
|
4797
|
+
if (peg$silentFails === 0) {
|
|
4798
|
+
peg$fail(peg$e63);
|
|
4799
|
+
}
|
|
4800
|
+
}
|
|
4801
|
+
peg$silentFails--;
|
|
4802
|
+
if (s7 === peg$FAILED) {
|
|
4803
|
+
s6 = void 0;
|
|
4804
|
+
} else {
|
|
4805
|
+
peg$currPos = s6;
|
|
4806
|
+
s6 = peg$FAILED;
|
|
4807
|
+
}
|
|
4683
4808
|
}
|
|
4684
4809
|
}
|
|
4685
4810
|
}
|
|
4686
4811
|
}
|
|
4687
4812
|
}
|
|
4688
|
-
|
|
4689
|
-
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
|
|
4694
|
-
|
|
4695
|
-
|
|
4696
|
-
|
|
4697
|
-
|
|
4698
|
-
|
|
4699
|
-
|
|
4700
|
-
|
|
4701
|
-
|
|
4702
|
-
|
|
4703
|
-
|
|
4704
|
-
|
|
4705
|
-
|
|
4813
|
+
if (s6 !== peg$FAILED) {
|
|
4814
|
+
s5 = [s5, s6];
|
|
4815
|
+
s4 = s5;
|
|
4816
|
+
} else {
|
|
4817
|
+
peg$currPos = s4;
|
|
4818
|
+
s4 = peg$FAILED;
|
|
4819
|
+
}
|
|
4820
|
+
peg$silentFails--;
|
|
4821
|
+
if (s4 !== peg$FAILED) {
|
|
4822
|
+
peg$currPos = s3;
|
|
4823
|
+
s3 = void 0;
|
|
4824
|
+
} else {
|
|
4825
|
+
s3 = peg$FAILED;
|
|
4826
|
+
}
|
|
4827
|
+
if (s3 !== peg$FAILED) {
|
|
4828
|
+
peg$savedPos = s0;
|
|
4829
|
+
s0 = peg$f81(s2);
|
|
4830
|
+
} else {
|
|
4831
|
+
peg$currPos = s0;
|
|
4832
|
+
s0 = peg$FAILED;
|
|
4833
|
+
}
|
|
4706
4834
|
} else {
|
|
4707
4835
|
peg$currPos = s0;
|
|
4708
4836
|
s0 = peg$FAILED;
|
|
4709
4837
|
}
|
|
4710
|
-
} else {
|
|
4711
|
-
peg$currPos = s0;
|
|
4712
|
-
s0 = peg$FAILED;
|
|
4713
4838
|
}
|
|
4714
4839
|
}
|
|
4715
4840
|
return s0;
|
|
@@ -4731,7 +4856,7 @@ function peg$parse(input, options) {
|
|
|
4731
4856
|
s2 = peg$parseIdentifier();
|
|
4732
4857
|
if (s2 !== peg$FAILED) {
|
|
4733
4858
|
peg$savedPos = s0;
|
|
4734
|
-
s0 = peg$
|
|
4859
|
+
s0 = peg$f82(s2);
|
|
4735
4860
|
} else {
|
|
4736
4861
|
peg$currPos = s0;
|
|
4737
4862
|
s0 = peg$FAILED;
|
|
@@ -5281,7 +5406,7 @@ function peg$parse(input, options) {
|
|
|
5281
5406
|
} else {
|
|
5282
5407
|
s0 = peg$FAILED;
|
|
5283
5408
|
if (peg$silentFails === 0) {
|
|
5284
|
-
peg$fail(peg$
|
|
5409
|
+
peg$fail(peg$e64);
|
|
5285
5410
|
}
|
|
5286
5411
|
}
|
|
5287
5412
|
return s0;
|
|
@@ -5314,12 +5439,12 @@ function peg$parse(input, options) {
|
|
|
5314
5439
|
peg$silentFails++;
|
|
5315
5440
|
s0 = peg$currPos;
|
|
5316
5441
|
if (input.charCodeAt(peg$currPos) === 34) {
|
|
5317
|
-
s1 = peg$
|
|
5442
|
+
s1 = peg$c60;
|
|
5318
5443
|
peg$currPos++;
|
|
5319
5444
|
} else {
|
|
5320
5445
|
s1 = peg$FAILED;
|
|
5321
5446
|
if (peg$silentFails === 0) {
|
|
5322
|
-
peg$fail(peg$
|
|
5447
|
+
peg$fail(peg$e66);
|
|
5323
5448
|
}
|
|
5324
5449
|
}
|
|
5325
5450
|
if (s1 !== peg$FAILED) {
|
|
@@ -5330,17 +5455,17 @@ function peg$parse(input, options) {
|
|
|
5330
5455
|
s3 = peg$parseDoubleStringChar();
|
|
5331
5456
|
}
|
|
5332
5457
|
if (input.charCodeAt(peg$currPos) === 34) {
|
|
5333
|
-
s3 = peg$
|
|
5458
|
+
s3 = peg$c60;
|
|
5334
5459
|
peg$currPos++;
|
|
5335
5460
|
} else {
|
|
5336
5461
|
s3 = peg$FAILED;
|
|
5337
5462
|
if (peg$silentFails === 0) {
|
|
5338
|
-
peg$fail(peg$
|
|
5463
|
+
peg$fail(peg$e66);
|
|
5339
5464
|
}
|
|
5340
5465
|
}
|
|
5341
5466
|
if (s3 !== peg$FAILED) {
|
|
5342
5467
|
peg$savedPos = s0;
|
|
5343
|
-
s0 = peg$
|
|
5468
|
+
s0 = peg$f83(s2);
|
|
5344
5469
|
} else {
|
|
5345
5470
|
peg$currPos = s0;
|
|
5346
5471
|
s0 = peg$FAILED;
|
|
@@ -5352,12 +5477,12 @@ function peg$parse(input, options) {
|
|
|
5352
5477
|
if (s0 === peg$FAILED) {
|
|
5353
5478
|
s0 = peg$currPos;
|
|
5354
5479
|
if (input.charCodeAt(peg$currPos) === 39) {
|
|
5355
|
-
s1 = peg$
|
|
5480
|
+
s1 = peg$c61;
|
|
5356
5481
|
peg$currPos++;
|
|
5357
5482
|
} else {
|
|
5358
5483
|
s1 = peg$FAILED;
|
|
5359
5484
|
if (peg$silentFails === 0) {
|
|
5360
|
-
peg$fail(peg$
|
|
5485
|
+
peg$fail(peg$e67);
|
|
5361
5486
|
}
|
|
5362
5487
|
}
|
|
5363
5488
|
if (s1 !== peg$FAILED) {
|
|
@@ -5368,17 +5493,17 @@ function peg$parse(input, options) {
|
|
|
5368
5493
|
s3 = peg$parseSingleStringChar();
|
|
5369
5494
|
}
|
|
5370
5495
|
if (input.charCodeAt(peg$currPos) === 39) {
|
|
5371
|
-
s3 = peg$
|
|
5496
|
+
s3 = peg$c61;
|
|
5372
5497
|
peg$currPos++;
|
|
5373
5498
|
} else {
|
|
5374
5499
|
s3 = peg$FAILED;
|
|
5375
5500
|
if (peg$silentFails === 0) {
|
|
5376
|
-
peg$fail(peg$
|
|
5501
|
+
peg$fail(peg$e67);
|
|
5377
5502
|
}
|
|
5378
5503
|
}
|
|
5379
5504
|
if (s3 !== peg$FAILED) {
|
|
5380
5505
|
peg$savedPos = s0;
|
|
5381
|
-
s0 = peg$
|
|
5506
|
+
s0 = peg$f84(s2);
|
|
5382
5507
|
} else {
|
|
5383
5508
|
peg$currPos = s0;
|
|
5384
5509
|
s0 = peg$FAILED;
|
|
@@ -5392,7 +5517,7 @@ function peg$parse(input, options) {
|
|
|
5392
5517
|
if (s0 === peg$FAILED) {
|
|
5393
5518
|
s1 = peg$FAILED;
|
|
5394
5519
|
if (peg$silentFails === 0) {
|
|
5395
|
-
peg$fail(peg$
|
|
5520
|
+
peg$fail(peg$e65);
|
|
5396
5521
|
}
|
|
5397
5522
|
}
|
|
5398
5523
|
return s0;
|
|
@@ -5403,12 +5528,12 @@ function peg$parse(input, options) {
|
|
|
5403
5528
|
s1 = peg$currPos;
|
|
5404
5529
|
peg$silentFails++;
|
|
5405
5530
|
if (input.charCodeAt(peg$currPos) === 34) {
|
|
5406
|
-
s2 = peg$
|
|
5531
|
+
s2 = peg$c60;
|
|
5407
5532
|
peg$currPos++;
|
|
5408
5533
|
} else {
|
|
5409
5534
|
s2 = peg$FAILED;
|
|
5410
5535
|
if (peg$silentFails === 0) {
|
|
5411
|
-
peg$fail(peg$
|
|
5536
|
+
peg$fail(peg$e66);
|
|
5412
5537
|
}
|
|
5413
5538
|
}
|
|
5414
5539
|
peg$silentFails--;
|
|
@@ -5422,12 +5547,12 @@ function peg$parse(input, options) {
|
|
|
5422
5547
|
s2 = peg$currPos;
|
|
5423
5548
|
peg$silentFails++;
|
|
5424
5549
|
if (input.charCodeAt(peg$currPos) === 92) {
|
|
5425
|
-
s3 = peg$
|
|
5550
|
+
s3 = peg$c62;
|
|
5426
5551
|
peg$currPos++;
|
|
5427
5552
|
} else {
|
|
5428
5553
|
s3 = peg$FAILED;
|
|
5429
5554
|
if (peg$silentFails === 0) {
|
|
5430
|
-
peg$fail(peg$
|
|
5555
|
+
peg$fail(peg$e68);
|
|
5431
5556
|
}
|
|
5432
5557
|
}
|
|
5433
5558
|
peg$silentFails--;
|
|
@@ -5444,12 +5569,12 @@ function peg$parse(input, options) {
|
|
|
5444
5569
|
} else {
|
|
5445
5570
|
s3 = peg$FAILED;
|
|
5446
5571
|
if (peg$silentFails === 0) {
|
|
5447
|
-
peg$fail(peg$
|
|
5572
|
+
peg$fail(peg$e63);
|
|
5448
5573
|
}
|
|
5449
5574
|
}
|
|
5450
5575
|
if (s3 !== peg$FAILED) {
|
|
5451
5576
|
peg$savedPos = s0;
|
|
5452
|
-
s0 = peg$
|
|
5577
|
+
s0 = peg$f85(s3);
|
|
5453
5578
|
} else {
|
|
5454
5579
|
peg$currPos = s0;
|
|
5455
5580
|
s0 = peg$FAILED;
|
|
@@ -5465,19 +5590,19 @@ function peg$parse(input, options) {
|
|
|
5465
5590
|
if (s0 === peg$FAILED) {
|
|
5466
5591
|
s0 = peg$currPos;
|
|
5467
5592
|
if (input.charCodeAt(peg$currPos) === 92) {
|
|
5468
|
-
s1 = peg$
|
|
5593
|
+
s1 = peg$c62;
|
|
5469
5594
|
peg$currPos++;
|
|
5470
5595
|
} else {
|
|
5471
5596
|
s1 = peg$FAILED;
|
|
5472
5597
|
if (peg$silentFails === 0) {
|
|
5473
|
-
peg$fail(peg$
|
|
5598
|
+
peg$fail(peg$e68);
|
|
5474
5599
|
}
|
|
5475
5600
|
}
|
|
5476
5601
|
if (s1 !== peg$FAILED) {
|
|
5477
5602
|
s2 = peg$parseEscapeSequence();
|
|
5478
5603
|
if (s2 !== peg$FAILED) {
|
|
5479
5604
|
peg$savedPos = s0;
|
|
5480
|
-
s0 = peg$
|
|
5605
|
+
s0 = peg$f86(s2);
|
|
5481
5606
|
} else {
|
|
5482
5607
|
peg$currPos = s0;
|
|
5483
5608
|
s0 = peg$FAILED;
|
|
@@ -5495,12 +5620,12 @@ function peg$parse(input, options) {
|
|
|
5495
5620
|
s1 = peg$currPos;
|
|
5496
5621
|
peg$silentFails++;
|
|
5497
5622
|
if (input.charCodeAt(peg$currPos) === 39) {
|
|
5498
|
-
s2 = peg$
|
|
5623
|
+
s2 = peg$c61;
|
|
5499
5624
|
peg$currPos++;
|
|
5500
5625
|
} else {
|
|
5501
5626
|
s2 = peg$FAILED;
|
|
5502
5627
|
if (peg$silentFails === 0) {
|
|
5503
|
-
peg$fail(peg$
|
|
5628
|
+
peg$fail(peg$e67);
|
|
5504
5629
|
}
|
|
5505
5630
|
}
|
|
5506
5631
|
peg$silentFails--;
|
|
@@ -5514,12 +5639,12 @@ function peg$parse(input, options) {
|
|
|
5514
5639
|
s2 = peg$currPos;
|
|
5515
5640
|
peg$silentFails++;
|
|
5516
5641
|
if (input.charCodeAt(peg$currPos) === 92) {
|
|
5517
|
-
s3 = peg$
|
|
5642
|
+
s3 = peg$c62;
|
|
5518
5643
|
peg$currPos++;
|
|
5519
5644
|
} else {
|
|
5520
5645
|
s3 = peg$FAILED;
|
|
5521
5646
|
if (peg$silentFails === 0) {
|
|
5522
|
-
peg$fail(peg$
|
|
5647
|
+
peg$fail(peg$e68);
|
|
5523
5648
|
}
|
|
5524
5649
|
}
|
|
5525
5650
|
peg$silentFails--;
|
|
@@ -5536,12 +5661,12 @@ function peg$parse(input, options) {
|
|
|
5536
5661
|
} else {
|
|
5537
5662
|
s3 = peg$FAILED;
|
|
5538
5663
|
if (peg$silentFails === 0) {
|
|
5539
|
-
peg$fail(peg$
|
|
5664
|
+
peg$fail(peg$e63);
|
|
5540
5665
|
}
|
|
5541
5666
|
}
|
|
5542
5667
|
if (s3 !== peg$FAILED) {
|
|
5543
5668
|
peg$savedPos = s0;
|
|
5544
|
-
s0 = peg$
|
|
5669
|
+
s0 = peg$f87(s3);
|
|
5545
5670
|
} else {
|
|
5546
5671
|
peg$currPos = s0;
|
|
5547
5672
|
s0 = peg$FAILED;
|
|
@@ -5557,19 +5682,19 @@ function peg$parse(input, options) {
|
|
|
5557
5682
|
if (s0 === peg$FAILED) {
|
|
5558
5683
|
s0 = peg$currPos;
|
|
5559
5684
|
if (input.charCodeAt(peg$currPos) === 92) {
|
|
5560
|
-
s1 = peg$
|
|
5685
|
+
s1 = peg$c62;
|
|
5561
5686
|
peg$currPos++;
|
|
5562
5687
|
} else {
|
|
5563
5688
|
s1 = peg$FAILED;
|
|
5564
5689
|
if (peg$silentFails === 0) {
|
|
5565
|
-
peg$fail(peg$
|
|
5690
|
+
peg$fail(peg$e68);
|
|
5566
5691
|
}
|
|
5567
5692
|
}
|
|
5568
5693
|
if (s1 !== peg$FAILED) {
|
|
5569
5694
|
s2 = peg$parseEscapeSequence();
|
|
5570
5695
|
if (s2 !== peg$FAILED) {
|
|
5571
5696
|
peg$savedPos = s0;
|
|
5572
|
-
s0 = peg$
|
|
5697
|
+
s0 = peg$f88(s2);
|
|
5573
5698
|
} else {
|
|
5574
5699
|
peg$currPos = s0;
|
|
5575
5700
|
s0 = peg$FAILED;
|
|
@@ -5585,97 +5710,97 @@ function peg$parse(input, options) {
|
|
|
5585
5710
|
let s0, s1;
|
|
5586
5711
|
s0 = peg$currPos;
|
|
5587
5712
|
if (input.charCodeAt(peg$currPos) === 110) {
|
|
5588
|
-
s1 = peg$
|
|
5713
|
+
s1 = peg$c63;
|
|
5589
5714
|
peg$currPos++;
|
|
5590
5715
|
} else {
|
|
5591
5716
|
s1 = peg$FAILED;
|
|
5592
5717
|
if (peg$silentFails === 0) {
|
|
5593
|
-
peg$fail(peg$
|
|
5718
|
+
peg$fail(peg$e69);
|
|
5594
5719
|
}
|
|
5595
5720
|
}
|
|
5596
5721
|
if (s1 !== peg$FAILED) {
|
|
5597
5722
|
peg$savedPos = s0;
|
|
5598
|
-
s1 = peg$
|
|
5723
|
+
s1 = peg$f89();
|
|
5599
5724
|
}
|
|
5600
5725
|
s0 = s1;
|
|
5601
5726
|
if (s0 === peg$FAILED) {
|
|
5602
5727
|
s0 = peg$currPos;
|
|
5603
5728
|
if (input.charCodeAt(peg$currPos) === 114) {
|
|
5604
|
-
s1 = peg$
|
|
5729
|
+
s1 = peg$c64;
|
|
5605
5730
|
peg$currPos++;
|
|
5606
5731
|
} else {
|
|
5607
5732
|
s1 = peg$FAILED;
|
|
5608
5733
|
if (peg$silentFails === 0) {
|
|
5609
|
-
peg$fail(peg$
|
|
5734
|
+
peg$fail(peg$e70);
|
|
5610
5735
|
}
|
|
5611
5736
|
}
|
|
5612
5737
|
if (s1 !== peg$FAILED) {
|
|
5613
5738
|
peg$savedPos = s0;
|
|
5614
|
-
s1 = peg$
|
|
5739
|
+
s1 = peg$f90();
|
|
5615
5740
|
}
|
|
5616
5741
|
s0 = s1;
|
|
5617
5742
|
if (s0 === peg$FAILED) {
|
|
5618
5743
|
s0 = peg$currPos;
|
|
5619
5744
|
if (input.charCodeAt(peg$currPos) === 116) {
|
|
5620
|
-
s1 = peg$
|
|
5745
|
+
s1 = peg$c65;
|
|
5621
5746
|
peg$currPos++;
|
|
5622
5747
|
} else {
|
|
5623
5748
|
s1 = peg$FAILED;
|
|
5624
5749
|
if (peg$silentFails === 0) {
|
|
5625
|
-
peg$fail(peg$
|
|
5750
|
+
peg$fail(peg$e71);
|
|
5626
5751
|
}
|
|
5627
5752
|
}
|
|
5628
5753
|
if (s1 !== peg$FAILED) {
|
|
5629
5754
|
peg$savedPos = s0;
|
|
5630
|
-
s1 = peg$
|
|
5755
|
+
s1 = peg$f91();
|
|
5631
5756
|
}
|
|
5632
5757
|
s0 = s1;
|
|
5633
5758
|
if (s0 === peg$FAILED) {
|
|
5634
5759
|
s0 = peg$currPos;
|
|
5635
5760
|
if (input.charCodeAt(peg$currPos) === 92) {
|
|
5636
|
-
s1 = peg$
|
|
5761
|
+
s1 = peg$c62;
|
|
5637
5762
|
peg$currPos++;
|
|
5638
5763
|
} else {
|
|
5639
5764
|
s1 = peg$FAILED;
|
|
5640
5765
|
if (peg$silentFails === 0) {
|
|
5641
|
-
peg$fail(peg$
|
|
5766
|
+
peg$fail(peg$e68);
|
|
5642
5767
|
}
|
|
5643
5768
|
}
|
|
5644
5769
|
if (s1 !== peg$FAILED) {
|
|
5645
5770
|
peg$savedPos = s0;
|
|
5646
|
-
s1 = peg$
|
|
5771
|
+
s1 = peg$f92();
|
|
5647
5772
|
}
|
|
5648
5773
|
s0 = s1;
|
|
5649
5774
|
if (s0 === peg$FAILED) {
|
|
5650
5775
|
s0 = peg$currPos;
|
|
5651
5776
|
if (input.charCodeAt(peg$currPos) === 34) {
|
|
5652
|
-
s1 = peg$
|
|
5777
|
+
s1 = peg$c60;
|
|
5653
5778
|
peg$currPos++;
|
|
5654
5779
|
} else {
|
|
5655
5780
|
s1 = peg$FAILED;
|
|
5656
5781
|
if (peg$silentFails === 0) {
|
|
5657
|
-
peg$fail(peg$
|
|
5782
|
+
peg$fail(peg$e66);
|
|
5658
5783
|
}
|
|
5659
5784
|
}
|
|
5660
5785
|
if (s1 !== peg$FAILED) {
|
|
5661
5786
|
peg$savedPos = s0;
|
|
5662
|
-
s1 = peg$
|
|
5787
|
+
s1 = peg$f93();
|
|
5663
5788
|
}
|
|
5664
5789
|
s0 = s1;
|
|
5665
5790
|
if (s0 === peg$FAILED) {
|
|
5666
5791
|
s0 = peg$currPos;
|
|
5667
5792
|
if (input.charCodeAt(peg$currPos) === 39) {
|
|
5668
|
-
s1 = peg$
|
|
5793
|
+
s1 = peg$c61;
|
|
5669
5794
|
peg$currPos++;
|
|
5670
5795
|
} else {
|
|
5671
5796
|
s1 = peg$FAILED;
|
|
5672
5797
|
if (peg$silentFails === 0) {
|
|
5673
|
-
peg$fail(peg$
|
|
5798
|
+
peg$fail(peg$e67);
|
|
5674
5799
|
}
|
|
5675
5800
|
}
|
|
5676
5801
|
if (s1 !== peg$FAILED) {
|
|
5677
5802
|
peg$savedPos = s0;
|
|
5678
|
-
s1 = peg$
|
|
5803
|
+
s1 = peg$f94();
|
|
5679
5804
|
}
|
|
5680
5805
|
s0 = s1;
|
|
5681
5806
|
}
|
|
@@ -5690,12 +5815,12 @@ function peg$parse(input, options) {
|
|
|
5690
5815
|
peg$silentFails++;
|
|
5691
5816
|
s0 = peg$currPos;
|
|
5692
5817
|
if (input.charCodeAt(peg$currPos) === 45) {
|
|
5693
|
-
s1 = peg$
|
|
5818
|
+
s1 = peg$c66;
|
|
5694
5819
|
peg$currPos++;
|
|
5695
5820
|
} else {
|
|
5696
5821
|
s1 = peg$FAILED;
|
|
5697
5822
|
if (peg$silentFails === 0) {
|
|
5698
|
-
peg$fail(peg$
|
|
5823
|
+
peg$fail(peg$e73);
|
|
5699
5824
|
}
|
|
5700
5825
|
}
|
|
5701
5826
|
if (s1 === peg$FAILED) {
|
|
@@ -5730,12 +5855,12 @@ function peg$parse(input, options) {
|
|
|
5730
5855
|
if (s2 !== peg$FAILED) {
|
|
5731
5856
|
s3 = peg$currPos;
|
|
5732
5857
|
if (input.charCodeAt(peg$currPos) === 46) {
|
|
5733
|
-
s4 = peg$
|
|
5858
|
+
s4 = peg$c67;
|
|
5734
5859
|
peg$currPos++;
|
|
5735
5860
|
} else {
|
|
5736
5861
|
s4 = peg$FAILED;
|
|
5737
5862
|
if (peg$silentFails === 0) {
|
|
5738
|
-
peg$fail(peg$
|
|
5863
|
+
peg$fail(peg$e74);
|
|
5739
5864
|
}
|
|
5740
5865
|
}
|
|
5741
5866
|
if (s4 !== peg$FAILED) {
|
|
@@ -5780,7 +5905,7 @@ function peg$parse(input, options) {
|
|
|
5780
5905
|
s3 = null;
|
|
5781
5906
|
}
|
|
5782
5907
|
peg$savedPos = s0;
|
|
5783
|
-
s0 = peg$
|
|
5908
|
+
s0 = peg$f95(s1, s2, s3);
|
|
5784
5909
|
} else {
|
|
5785
5910
|
peg$currPos = s0;
|
|
5786
5911
|
s0 = peg$FAILED;
|
|
@@ -5789,7 +5914,7 @@ function peg$parse(input, options) {
|
|
|
5789
5914
|
if (s0 === peg$FAILED) {
|
|
5790
5915
|
s1 = peg$FAILED;
|
|
5791
5916
|
if (peg$silentFails === 0) {
|
|
5792
|
-
peg$fail(peg$
|
|
5917
|
+
peg$fail(peg$e72);
|
|
5793
5918
|
}
|
|
5794
5919
|
}
|
|
5795
5920
|
return s0;
|
|
@@ -5799,12 +5924,12 @@ function peg$parse(input, options) {
|
|
|
5799
5924
|
peg$silentFails++;
|
|
5800
5925
|
s0 = peg$currPos;
|
|
5801
5926
|
if (input.charCodeAt(peg$currPos) === 45) {
|
|
5802
|
-
s1 = peg$
|
|
5927
|
+
s1 = peg$c66;
|
|
5803
5928
|
peg$currPos++;
|
|
5804
5929
|
} else {
|
|
5805
5930
|
s1 = peg$FAILED;
|
|
5806
5931
|
if (peg$silentFails === 0) {
|
|
5807
|
-
peg$fail(peg$
|
|
5932
|
+
peg$fail(peg$e73);
|
|
5808
5933
|
}
|
|
5809
5934
|
}
|
|
5810
5935
|
if (s1 === peg$FAILED) {
|
|
@@ -5839,12 +5964,12 @@ function peg$parse(input, options) {
|
|
|
5839
5964
|
if (s2 !== peg$FAILED) {
|
|
5840
5965
|
s3 = peg$currPos;
|
|
5841
5966
|
if (input.charCodeAt(peg$currPos) === 46) {
|
|
5842
|
-
s4 = peg$
|
|
5967
|
+
s4 = peg$c67;
|
|
5843
5968
|
peg$currPos++;
|
|
5844
5969
|
} else {
|
|
5845
5970
|
s4 = peg$FAILED;
|
|
5846
5971
|
if (peg$silentFails === 0) {
|
|
5847
|
-
peg$fail(peg$
|
|
5972
|
+
peg$fail(peg$e74);
|
|
5848
5973
|
}
|
|
5849
5974
|
}
|
|
5850
5975
|
if (s4 !== peg$FAILED) {
|
|
@@ -5888,63 +6013,63 @@ function peg$parse(input, options) {
|
|
|
5888
6013
|
if (s3 === peg$FAILED) {
|
|
5889
6014
|
s3 = null;
|
|
5890
6015
|
}
|
|
5891
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
5892
|
-
s4 = peg$
|
|
6016
|
+
if (input.substr(peg$currPos, 2) === peg$c68) {
|
|
6017
|
+
s4 = peg$c68;
|
|
5893
6018
|
peg$currPos += 2;
|
|
5894
6019
|
} else {
|
|
5895
6020
|
s4 = peg$FAILED;
|
|
5896
6021
|
if (peg$silentFails === 0) {
|
|
5897
|
-
peg$fail(peg$
|
|
6022
|
+
peg$fail(peg$e76);
|
|
5898
6023
|
}
|
|
5899
6024
|
}
|
|
5900
6025
|
if (s4 === peg$FAILED) {
|
|
5901
6026
|
if (input.charCodeAt(peg$currPos) === 37) {
|
|
5902
|
-
s4 = peg$
|
|
6027
|
+
s4 = peg$c69;
|
|
5903
6028
|
peg$currPos++;
|
|
5904
6029
|
} else {
|
|
5905
6030
|
s4 = peg$FAILED;
|
|
5906
6031
|
if (peg$silentFails === 0) {
|
|
5907
|
-
peg$fail(peg$
|
|
6032
|
+
peg$fail(peg$e77);
|
|
5908
6033
|
}
|
|
5909
6034
|
}
|
|
5910
6035
|
if (s4 === peg$FAILED) {
|
|
5911
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
5912
|
-
s4 = peg$
|
|
6036
|
+
if (input.substr(peg$currPos, 2) === peg$c70) {
|
|
6037
|
+
s4 = peg$c70;
|
|
5913
6038
|
peg$currPos += 2;
|
|
5914
6039
|
} else {
|
|
5915
6040
|
s4 = peg$FAILED;
|
|
5916
6041
|
if (peg$silentFails === 0) {
|
|
5917
|
-
peg$fail(peg$
|
|
6042
|
+
peg$fail(peg$e78);
|
|
5918
6043
|
}
|
|
5919
6044
|
}
|
|
5920
6045
|
if (s4 === peg$FAILED) {
|
|
5921
|
-
if (input.substr(peg$currPos, 3) === peg$
|
|
5922
|
-
s4 = peg$
|
|
6046
|
+
if (input.substr(peg$currPos, 3) === peg$c71) {
|
|
6047
|
+
s4 = peg$c71;
|
|
5923
6048
|
peg$currPos += 3;
|
|
5924
6049
|
} else {
|
|
5925
6050
|
s4 = peg$FAILED;
|
|
5926
6051
|
if (peg$silentFails === 0) {
|
|
5927
|
-
peg$fail(peg$
|
|
6052
|
+
peg$fail(peg$e79);
|
|
5928
6053
|
}
|
|
5929
6054
|
}
|
|
5930
6055
|
if (s4 === peg$FAILED) {
|
|
5931
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
5932
|
-
s4 = peg$
|
|
6056
|
+
if (input.substr(peg$currPos, 2) === peg$c72) {
|
|
6057
|
+
s4 = peg$c72;
|
|
5933
6058
|
peg$currPos += 2;
|
|
5934
6059
|
} else {
|
|
5935
6060
|
s4 = peg$FAILED;
|
|
5936
6061
|
if (peg$silentFails === 0) {
|
|
5937
|
-
peg$fail(peg$
|
|
6062
|
+
peg$fail(peg$e80);
|
|
5938
6063
|
}
|
|
5939
6064
|
}
|
|
5940
6065
|
if (s4 === peg$FAILED) {
|
|
5941
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
5942
|
-
s4 = peg$
|
|
6066
|
+
if (input.substr(peg$currPos, 2) === peg$c73) {
|
|
6067
|
+
s4 = peg$c73;
|
|
5943
6068
|
peg$currPos += 2;
|
|
5944
6069
|
} else {
|
|
5945
6070
|
s4 = peg$FAILED;
|
|
5946
6071
|
if (peg$silentFails === 0) {
|
|
5947
|
-
peg$fail(peg$
|
|
6072
|
+
peg$fail(peg$e81);
|
|
5948
6073
|
}
|
|
5949
6074
|
}
|
|
5950
6075
|
}
|
|
@@ -5954,7 +6079,7 @@ function peg$parse(input, options) {
|
|
|
5954
6079
|
}
|
|
5955
6080
|
if (s4 !== peg$FAILED) {
|
|
5956
6081
|
peg$savedPos = s0;
|
|
5957
|
-
s0 = peg$
|
|
6082
|
+
s0 = peg$f96(s1, s2, s3, s4);
|
|
5958
6083
|
} else {
|
|
5959
6084
|
peg$currPos = s0;
|
|
5960
6085
|
s0 = peg$FAILED;
|
|
@@ -5967,7 +6092,7 @@ function peg$parse(input, options) {
|
|
|
5967
6092
|
if (s0 === peg$FAILED) {
|
|
5968
6093
|
s1 = peg$FAILED;
|
|
5969
6094
|
if (peg$silentFails === 0) {
|
|
5970
|
-
peg$fail(peg$
|
|
6095
|
+
peg$fail(peg$e75);
|
|
5971
6096
|
}
|
|
5972
6097
|
}
|
|
5973
6098
|
return s0;
|
|
@@ -5976,34 +6101,34 @@ function peg$parse(input, options) {
|
|
|
5976
6101
|
let s0, s1;
|
|
5977
6102
|
peg$silentFails++;
|
|
5978
6103
|
s0 = peg$currPos;
|
|
5979
|
-
if (input.substr(peg$currPos, 4) === peg$
|
|
5980
|
-
s1 = peg$
|
|
6104
|
+
if (input.substr(peg$currPos, 4) === peg$c74) {
|
|
6105
|
+
s1 = peg$c74;
|
|
5981
6106
|
peg$currPos += 4;
|
|
5982
6107
|
} else {
|
|
5983
6108
|
s1 = peg$FAILED;
|
|
5984
6109
|
if (peg$silentFails === 0) {
|
|
5985
|
-
peg$fail(peg$
|
|
6110
|
+
peg$fail(peg$e83);
|
|
5986
6111
|
}
|
|
5987
6112
|
}
|
|
5988
6113
|
if (s1 !== peg$FAILED) {
|
|
5989
6114
|
peg$savedPos = s0;
|
|
5990
|
-
s1 = peg$
|
|
6115
|
+
s1 = peg$f97();
|
|
5991
6116
|
}
|
|
5992
6117
|
s0 = s1;
|
|
5993
6118
|
if (s0 === peg$FAILED) {
|
|
5994
6119
|
s0 = peg$currPos;
|
|
5995
|
-
if (input.substr(peg$currPos, 5) === peg$
|
|
5996
|
-
s1 = peg$
|
|
6120
|
+
if (input.substr(peg$currPos, 5) === peg$c75) {
|
|
6121
|
+
s1 = peg$c75;
|
|
5997
6122
|
peg$currPos += 5;
|
|
5998
6123
|
} else {
|
|
5999
6124
|
s1 = peg$FAILED;
|
|
6000
6125
|
if (peg$silentFails === 0) {
|
|
6001
|
-
peg$fail(peg$
|
|
6126
|
+
peg$fail(peg$e84);
|
|
6002
6127
|
}
|
|
6003
6128
|
}
|
|
6004
6129
|
if (s1 !== peg$FAILED) {
|
|
6005
6130
|
peg$savedPos = s0;
|
|
6006
|
-
s1 = peg$
|
|
6131
|
+
s1 = peg$f98();
|
|
6007
6132
|
}
|
|
6008
6133
|
s0 = s1;
|
|
6009
6134
|
}
|
|
@@ -6011,7 +6136,7 @@ function peg$parse(input, options) {
|
|
|
6011
6136
|
if (s0 === peg$FAILED) {
|
|
6012
6137
|
s1 = peg$FAILED;
|
|
6013
6138
|
if (peg$silentFails === 0) {
|
|
6014
|
-
peg$fail(peg$
|
|
6139
|
+
peg$fail(peg$e82);
|
|
6015
6140
|
}
|
|
6016
6141
|
}
|
|
6017
6142
|
return s0;
|
|
@@ -6026,7 +6151,7 @@ function peg$parse(input, options) {
|
|
|
6026
6151
|
} else {
|
|
6027
6152
|
s1 = peg$FAILED;
|
|
6028
6153
|
if (peg$silentFails === 0) {
|
|
6029
|
-
peg$fail(peg$
|
|
6154
|
+
peg$fail(peg$e86);
|
|
6030
6155
|
}
|
|
6031
6156
|
}
|
|
6032
6157
|
if (s1 !== peg$FAILED) {
|
|
@@ -6037,7 +6162,7 @@ function peg$parse(input, options) {
|
|
|
6037
6162
|
} else {
|
|
6038
6163
|
s3 = peg$FAILED;
|
|
6039
6164
|
if (peg$silentFails === 0) {
|
|
6040
|
-
peg$fail(peg$
|
|
6165
|
+
peg$fail(peg$e64);
|
|
6041
6166
|
}
|
|
6042
6167
|
}
|
|
6043
6168
|
while (s3 !== peg$FAILED) {
|
|
@@ -6048,12 +6173,12 @@ function peg$parse(input, options) {
|
|
|
6048
6173
|
} else {
|
|
6049
6174
|
s3 = peg$FAILED;
|
|
6050
6175
|
if (peg$silentFails === 0) {
|
|
6051
|
-
peg$fail(peg$
|
|
6176
|
+
peg$fail(peg$e64);
|
|
6052
6177
|
}
|
|
6053
6178
|
}
|
|
6054
6179
|
}
|
|
6055
6180
|
peg$savedPos = s0;
|
|
6056
|
-
s0 = peg$
|
|
6181
|
+
s0 = peg$f99(s1, s2);
|
|
6057
6182
|
} else {
|
|
6058
6183
|
peg$currPos = s0;
|
|
6059
6184
|
s0 = peg$FAILED;
|
|
@@ -6062,7 +6187,7 @@ function peg$parse(input, options) {
|
|
|
6062
6187
|
if (s0 === peg$FAILED) {
|
|
6063
6188
|
s1 = peg$FAILED;
|
|
6064
6189
|
if (peg$silentFails === 0) {
|
|
6065
|
-
peg$fail(peg$
|
|
6190
|
+
peg$fail(peg$e85);
|
|
6066
6191
|
}
|
|
6067
6192
|
}
|
|
6068
6193
|
return s0;
|
|
@@ -6097,7 +6222,7 @@ function peg$parse(input, options) {
|
|
|
6097
6222
|
}
|
|
6098
6223
|
if (s5 !== peg$FAILED) {
|
|
6099
6224
|
peg$savedPos = s0;
|
|
6100
|
-
s0 = peg$
|
|
6225
|
+
s0 = peg$f100(s3);
|
|
6101
6226
|
} else {
|
|
6102
6227
|
peg$currPos = s0;
|
|
6103
6228
|
s0 = peg$FAILED;
|
|
@@ -6185,7 +6310,7 @@ function peg$parse(input, options) {
|
|
|
6185
6310
|
s3 = null;
|
|
6186
6311
|
}
|
|
6187
6312
|
peg$savedPos = s0;
|
|
6188
|
-
s0 = peg$
|
|
6313
|
+
s0 = peg$f101(s1, s2);
|
|
6189
6314
|
} else {
|
|
6190
6315
|
peg$currPos = s0;
|
|
6191
6316
|
s0 = peg$FAILED;
|
|
@@ -6239,7 +6364,7 @@ function peg$parse(input, options) {
|
|
|
6239
6364
|
}
|
|
6240
6365
|
if (s5 !== peg$FAILED) {
|
|
6241
6366
|
peg$savedPos = s0;
|
|
6242
|
-
s0 = peg$
|
|
6367
|
+
s0 = peg$f102(s3);
|
|
6243
6368
|
} else {
|
|
6244
6369
|
peg$currPos = s0;
|
|
6245
6370
|
s0 = peg$FAILED;
|
|
@@ -6306,7 +6431,7 @@ function peg$parse(input, options) {
|
|
|
6306
6431
|
}
|
|
6307
6432
|
}
|
|
6308
6433
|
peg$savedPos = s0;
|
|
6309
|
-
s0 = peg$
|
|
6434
|
+
s0 = peg$f103(s1, s2);
|
|
6310
6435
|
} else {
|
|
6311
6436
|
peg$currPos = s0;
|
|
6312
6437
|
s0 = peg$FAILED;
|
|
@@ -6320,12 +6445,12 @@ function peg$parse(input, options) {
|
|
|
6320
6445
|
if (s1 !== peg$FAILED) {
|
|
6321
6446
|
s2 = peg$parse_();
|
|
6322
6447
|
if (input.charCodeAt(peg$currPos) === 61) {
|
|
6323
|
-
s3 = peg$
|
|
6448
|
+
s3 = peg$c57;
|
|
6324
6449
|
peg$currPos++;
|
|
6325
6450
|
} else {
|
|
6326
6451
|
s3 = peg$FAILED;
|
|
6327
6452
|
if (peg$silentFails === 0) {
|
|
6328
|
-
peg$fail(peg$
|
|
6453
|
+
peg$fail(peg$e59);
|
|
6329
6454
|
}
|
|
6330
6455
|
}
|
|
6331
6456
|
if (s3 !== peg$FAILED) {
|
|
@@ -6333,7 +6458,7 @@ function peg$parse(input, options) {
|
|
|
6333
6458
|
s5 = peg$parseAttributeValue();
|
|
6334
6459
|
if (s5 !== peg$FAILED) {
|
|
6335
6460
|
peg$savedPos = s0;
|
|
6336
|
-
s0 = peg$
|
|
6461
|
+
s0 = peg$f104(s1, s5);
|
|
6337
6462
|
} else {
|
|
6338
6463
|
peg$currPos = s0;
|
|
6339
6464
|
s0 = peg$FAILED;
|
|
@@ -6351,7 +6476,7 @@ function peg$parse(input, options) {
|
|
|
6351
6476
|
s1 = peg$parseIdentifier();
|
|
6352
6477
|
if (s1 !== peg$FAILED) {
|
|
6353
6478
|
peg$savedPos = s0;
|
|
6354
|
-
s1 = peg$
|
|
6479
|
+
s1 = peg$f105(s1);
|
|
6355
6480
|
}
|
|
6356
6481
|
s0 = s1;
|
|
6357
6482
|
}
|
|
@@ -6384,7 +6509,7 @@ function peg$parse(input, options) {
|
|
|
6384
6509
|
} else {
|
|
6385
6510
|
s1 = peg$FAILED;
|
|
6386
6511
|
if (peg$silentFails === 0) {
|
|
6387
|
-
peg$fail(peg$
|
|
6512
|
+
peg$fail(peg$e87);
|
|
6388
6513
|
}
|
|
6389
6514
|
}
|
|
6390
6515
|
if (s1 !== peg$FAILED) {
|
|
@@ -6396,7 +6521,7 @@ function peg$parse(input, options) {
|
|
|
6396
6521
|
} else {
|
|
6397
6522
|
s1 = peg$FAILED;
|
|
6398
6523
|
if (peg$silentFails === 0) {
|
|
6399
|
-
peg$fail(peg$
|
|
6524
|
+
peg$fail(peg$e87);
|
|
6400
6525
|
}
|
|
6401
6526
|
}
|
|
6402
6527
|
}
|
|
@@ -6416,7 +6541,7 @@ function peg$parse(input, options) {
|
|
|
6416
6541
|
if (s0 === peg$FAILED) {
|
|
6417
6542
|
s1 = peg$FAILED;
|
|
6418
6543
|
if (peg$silentFails === 0) {
|
|
6419
|
-
peg$fail(peg$
|
|
6544
|
+
peg$fail(peg$e88);
|
|
6420
6545
|
}
|
|
6421
6546
|
}
|
|
6422
6547
|
return s0;
|
|
@@ -6424,13 +6549,13 @@ function peg$parse(input, options) {
|
|
|
6424
6549
|
function peg$parseLineComment() {
|
|
6425
6550
|
let s0, s1, s2, s3, s4;
|
|
6426
6551
|
s0 = peg$currPos;
|
|
6427
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
6428
|
-
s1 = peg$
|
|
6552
|
+
if (input.substr(peg$currPos, 2) === peg$c58) {
|
|
6553
|
+
s1 = peg$c58;
|
|
6429
6554
|
peg$currPos += 2;
|
|
6430
6555
|
} else {
|
|
6431
6556
|
s1 = peg$FAILED;
|
|
6432
6557
|
if (peg$silentFails === 0) {
|
|
6433
|
-
peg$fail(peg$
|
|
6558
|
+
peg$fail(peg$e61);
|
|
6434
6559
|
}
|
|
6435
6560
|
}
|
|
6436
6561
|
if (s1 !== peg$FAILED) {
|
|
@@ -6441,7 +6566,7 @@ function peg$parse(input, options) {
|
|
|
6441
6566
|
} else {
|
|
6442
6567
|
s3 = peg$FAILED;
|
|
6443
6568
|
if (peg$silentFails === 0) {
|
|
6444
|
-
peg$fail(peg$
|
|
6569
|
+
peg$fail(peg$e89);
|
|
6445
6570
|
}
|
|
6446
6571
|
}
|
|
6447
6572
|
while (s3 !== peg$FAILED) {
|
|
@@ -6452,17 +6577,17 @@ function peg$parse(input, options) {
|
|
|
6452
6577
|
} else {
|
|
6453
6578
|
s3 = peg$FAILED;
|
|
6454
6579
|
if (peg$silentFails === 0) {
|
|
6455
|
-
peg$fail(peg$
|
|
6580
|
+
peg$fail(peg$e89);
|
|
6456
6581
|
}
|
|
6457
6582
|
}
|
|
6458
6583
|
}
|
|
6459
6584
|
if (input.charCodeAt(peg$currPos) === 10) {
|
|
6460
|
-
s3 = peg$
|
|
6585
|
+
s3 = peg$c76;
|
|
6461
6586
|
peg$currPos++;
|
|
6462
6587
|
} else {
|
|
6463
6588
|
s3 = peg$FAILED;
|
|
6464
6589
|
if (peg$silentFails === 0) {
|
|
6465
|
-
peg$fail(peg$
|
|
6590
|
+
peg$fail(peg$e90);
|
|
6466
6591
|
}
|
|
6467
6592
|
}
|
|
6468
6593
|
if (s3 === peg$FAILED) {
|
|
@@ -6474,7 +6599,7 @@ function peg$parse(input, options) {
|
|
|
6474
6599
|
} else {
|
|
6475
6600
|
s4 = peg$FAILED;
|
|
6476
6601
|
if (peg$silentFails === 0) {
|
|
6477
|
-
peg$fail(peg$
|
|
6602
|
+
peg$fail(peg$e63);
|
|
6478
6603
|
}
|
|
6479
6604
|
}
|
|
6480
6605
|
peg$silentFails--;
|
|
@@ -6501,13 +6626,13 @@ function peg$parse(input, options) {
|
|
|
6501
6626
|
function peg$parseBlockComment() {
|
|
6502
6627
|
let s0, s1, s2, s3, s4, s5;
|
|
6503
6628
|
s0 = peg$currPos;
|
|
6504
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
6505
|
-
s1 = peg$
|
|
6629
|
+
if (input.substr(peg$currPos, 2) === peg$c59) {
|
|
6630
|
+
s1 = peg$c59;
|
|
6506
6631
|
peg$currPos += 2;
|
|
6507
6632
|
} else {
|
|
6508
6633
|
s1 = peg$FAILED;
|
|
6509
6634
|
if (peg$silentFails === 0) {
|
|
6510
|
-
peg$fail(peg$
|
|
6635
|
+
peg$fail(peg$e62);
|
|
6511
6636
|
}
|
|
6512
6637
|
}
|
|
6513
6638
|
if (s1 !== peg$FAILED) {
|
|
@@ -6515,13 +6640,13 @@ function peg$parse(input, options) {
|
|
|
6515
6640
|
s3 = peg$currPos;
|
|
6516
6641
|
s4 = peg$currPos;
|
|
6517
6642
|
peg$silentFails++;
|
|
6518
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
6519
|
-
s5 = peg$
|
|
6643
|
+
if (input.substr(peg$currPos, 2) === peg$c77) {
|
|
6644
|
+
s5 = peg$c77;
|
|
6520
6645
|
peg$currPos += 2;
|
|
6521
6646
|
} else {
|
|
6522
6647
|
s5 = peg$FAILED;
|
|
6523
6648
|
if (peg$silentFails === 0) {
|
|
6524
|
-
peg$fail(peg$
|
|
6649
|
+
peg$fail(peg$e91);
|
|
6525
6650
|
}
|
|
6526
6651
|
}
|
|
6527
6652
|
peg$silentFails--;
|
|
@@ -6538,7 +6663,7 @@ function peg$parse(input, options) {
|
|
|
6538
6663
|
} else {
|
|
6539
6664
|
s5 = peg$FAILED;
|
|
6540
6665
|
if (peg$silentFails === 0) {
|
|
6541
|
-
peg$fail(peg$
|
|
6666
|
+
peg$fail(peg$e63);
|
|
6542
6667
|
}
|
|
6543
6668
|
}
|
|
6544
6669
|
if (s5 !== peg$FAILED) {
|
|
@@ -6557,13 +6682,13 @@ function peg$parse(input, options) {
|
|
|
6557
6682
|
s3 = peg$currPos;
|
|
6558
6683
|
s4 = peg$currPos;
|
|
6559
6684
|
peg$silentFails++;
|
|
6560
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
6561
|
-
s5 = peg$
|
|
6685
|
+
if (input.substr(peg$currPos, 2) === peg$c77) {
|
|
6686
|
+
s5 = peg$c77;
|
|
6562
6687
|
peg$currPos += 2;
|
|
6563
6688
|
} else {
|
|
6564
6689
|
s5 = peg$FAILED;
|
|
6565
6690
|
if (peg$silentFails === 0) {
|
|
6566
|
-
peg$fail(peg$
|
|
6691
|
+
peg$fail(peg$e91);
|
|
6567
6692
|
}
|
|
6568
6693
|
}
|
|
6569
6694
|
peg$silentFails--;
|
|
@@ -6580,7 +6705,7 @@ function peg$parse(input, options) {
|
|
|
6580
6705
|
} else {
|
|
6581
6706
|
s5 = peg$FAILED;
|
|
6582
6707
|
if (peg$silentFails === 0) {
|
|
6583
|
-
peg$fail(peg$
|
|
6708
|
+
peg$fail(peg$e63);
|
|
6584
6709
|
}
|
|
6585
6710
|
}
|
|
6586
6711
|
if (s5 !== peg$FAILED) {
|
|
@@ -6595,13 +6720,13 @@ function peg$parse(input, options) {
|
|
|
6595
6720
|
s3 = peg$FAILED;
|
|
6596
6721
|
}
|
|
6597
6722
|
}
|
|
6598
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
6599
|
-
s3 = peg$
|
|
6723
|
+
if (input.substr(peg$currPos, 2) === peg$c77) {
|
|
6724
|
+
s3 = peg$c77;
|
|
6600
6725
|
peg$currPos += 2;
|
|
6601
6726
|
} else {
|
|
6602
6727
|
s3 = peg$FAILED;
|
|
6603
6728
|
if (peg$silentFails === 0) {
|
|
6604
|
-
peg$fail(peg$
|
|
6729
|
+
peg$fail(peg$e91);
|
|
6605
6730
|
}
|
|
6606
6731
|
}
|
|
6607
6732
|
if (s3 !== peg$FAILED) {
|
|
@@ -6627,7 +6752,7 @@ function peg$parse(input, options) {
|
|
|
6627
6752
|
function attrsToObject(attrs) {
|
|
6628
6753
|
if (!attrs || attrs.length === 0) return {};
|
|
6629
6754
|
const result = {};
|
|
6630
|
-
for (const attr of attrs) {
|
|
6755
|
+
for (const attr of attrs.flat()) {
|
|
6631
6756
|
result[attr.name] = attr.value;
|
|
6632
6757
|
}
|
|
6633
6758
|
return result;
|
|
@@ -56119,7 +56244,6 @@ function renderDropdown(node, ctx) {
|
|
|
56119
56244
|
"data-action": dropdownItem.action
|
|
56120
56245
|
};
|
|
56121
56246
|
const interactiveAttrStr = ctx.buildAttrsString(interactiveAttrs);
|
|
56122
|
-
const hrefAttr = dropdownItem.href ? ` href="${ctx.escapeHtml(dropdownItem.href)}"` : "";
|
|
56123
56247
|
const disabledAttr = dropdownItem.disabled ? ' disabled="disabled"' : "";
|
|
56124
56248
|
if (dropdownItem.href || dropdownItem.navigate) {
|
|
56125
56249
|
const href = dropdownItem.href || dropdownItem.navigate || "#";
|
|
@@ -56637,7 +56761,10 @@ var HtmlRenderer = class extends BaseRenderer {
|
|
|
56637
56761
|
const uiContent = this.renderChildren(uiChildren);
|
|
56638
56762
|
const title = node.title ? `<title>${this.escapeHtml(node.title)}</title>
|
|
56639
56763
|
` : "";
|
|
56640
|
-
const
|
|
56764
|
+
const { x: _canvasX, y: _canvasY, ...nodeWithoutCanvasPos } = node;
|
|
56765
|
+
void _canvasX;
|
|
56766
|
+
void _canvasY;
|
|
56767
|
+
const commonStyles = this.buildCommonStyles(nodeWithoutCanvasPos);
|
|
56641
56768
|
let viewportStyle = `position: relative; width: ${viewport.width}px; height: ${viewport.height}px; overflow: hidden`;
|
|
56642
56769
|
if (this.context.options.background) {
|
|
56643
56770
|
viewportStyle += `; background: ${this.context.options.background}`;
|
|
@@ -57056,8 +57183,99 @@ function createHtmlRenderer(options) {
|
|
|
57056
57183
|
return new HtmlRenderer(options);
|
|
57057
57184
|
}
|
|
57058
57185
|
|
|
57186
|
+
// src/renderer/page-renderer.ts
|
|
57187
|
+
function renderPage(page, options = {}) {
|
|
57188
|
+
const renderer = new HtmlRenderer(options);
|
|
57189
|
+
const { html, css } = renderer.render({
|
|
57190
|
+
type: "Document",
|
|
57191
|
+
children: [page]
|
|
57192
|
+
});
|
|
57193
|
+
const { width, height } = resolvePageDimensions(page);
|
|
57194
|
+
return { html, css, width, height };
|
|
57195
|
+
}
|
|
57196
|
+
function resolvePageDimensions(page) {
|
|
57197
|
+
const pageAny = page;
|
|
57198
|
+
const explicitW = page.w ?? pageAny.width;
|
|
57199
|
+
const explicitH = page.h ?? pageAny.height;
|
|
57200
|
+
if (typeof explicitW === "number" && typeof explicitH === "number") {
|
|
57201
|
+
return { width: explicitW, height: explicitH };
|
|
57202
|
+
}
|
|
57203
|
+
const viewport = resolveViewport(page.viewport, page.device);
|
|
57204
|
+
return { width: viewport.width, height: viewport.height };
|
|
57205
|
+
}
|
|
57206
|
+
|
|
57207
|
+
// src/renderer/canvas-renderer.ts
|
|
57208
|
+
var DEFAULT_GAP = 64;
|
|
57209
|
+
var DEFAULT_PREFIX = "wf";
|
|
57210
|
+
function layoutCanvas(pages, gap = DEFAULT_GAP) {
|
|
57211
|
+
const placed = [];
|
|
57212
|
+
let cursorX = 0;
|
|
57213
|
+
let maxRight = 0;
|
|
57214
|
+
let maxBottom = 0;
|
|
57215
|
+
for (const page of pages) {
|
|
57216
|
+
const { width, height } = resolvePageDimensions(page);
|
|
57217
|
+
const explicitX = typeof page.x === "number" ? page.x : void 0;
|
|
57218
|
+
const explicitY = typeof page.y === "number" ? page.y : void 0;
|
|
57219
|
+
const x = explicitX ?? cursorX;
|
|
57220
|
+
const y = explicitY ?? 0;
|
|
57221
|
+
placed.push({ page, x, y, w: width, h: height });
|
|
57222
|
+
if (explicitX === void 0) {
|
|
57223
|
+
cursorX = x + width + gap;
|
|
57224
|
+
}
|
|
57225
|
+
maxRight = Math.max(maxRight, x + width);
|
|
57226
|
+
maxBottom = Math.max(maxBottom, y + height);
|
|
57227
|
+
}
|
|
57228
|
+
return { placed, width: maxRight, height: maxBottom };
|
|
57229
|
+
}
|
|
57230
|
+
function renderCanvas(doc, options = {}) {
|
|
57231
|
+
const gap = options.gap ?? DEFAULT_GAP;
|
|
57232
|
+
const prefix = options.classPrefix ?? DEFAULT_PREFIX;
|
|
57233
|
+
const includeStyles = options.includeStyles !== false;
|
|
57234
|
+
const theme = options.theme === "dark" ? darkTheme : defaultTheme;
|
|
57235
|
+
const css = includeStyles ? generateStyles(theme, prefix) : "";
|
|
57236
|
+
if (doc.children.length === 0) {
|
|
57237
|
+
return {
|
|
57238
|
+
html: `<div class="${prefix}-canvas" data-empty="true"></div>`,
|
|
57239
|
+
css,
|
|
57240
|
+
width: 0,
|
|
57241
|
+
height: 0
|
|
57242
|
+
};
|
|
57243
|
+
}
|
|
57244
|
+
const { placed, width, height } = layoutCanvas(doc.children, gap);
|
|
57245
|
+
const pageRenderer = new HtmlRenderer({ ...options, includeStyles: false });
|
|
57246
|
+
const boards = placed.map((p) => {
|
|
57247
|
+
const { html: pageHtml } = pageRenderer.render({
|
|
57248
|
+
type: "Document",
|
|
57249
|
+
children: [p.page]
|
|
57250
|
+
});
|
|
57251
|
+
return wrapBoard(pageHtml, p, prefix);
|
|
57252
|
+
}).join("\n");
|
|
57253
|
+
const canvasStyle = `position: relative; width: ${width}px; height: ${height}px;`;
|
|
57254
|
+
const html = `<div class="${prefix}-canvas" style="${canvasStyle}" data-page-count="${placed.length}">
|
|
57255
|
+
${boards}
|
|
57256
|
+
</div>`;
|
|
57257
|
+
return { html, css, width, height };
|
|
57258
|
+
}
|
|
57259
|
+
function wrapBoard(pageHtml, placed, prefix) {
|
|
57260
|
+
const { x, y, w, h, page } = placed;
|
|
57261
|
+
const positionStyle = `position: absolute; left: ${x}px; top: ${y}px; width: ${w}px; height: ${h}px;`;
|
|
57262
|
+
const titleAttr = page.title ? ` data-page-title="${escapeAttr(page.title)}"` : "";
|
|
57263
|
+
const dataAttrs = ` data-page-x="${x}" data-page-y="${y}" data-page-w="${w}" data-page-h="${h}"${titleAttr}`;
|
|
57264
|
+
return `<div class="${prefix}-canvas-board" style="${positionStyle}"${dataAttrs}>
|
|
57265
|
+
${pageHtml}
|
|
57266
|
+
</div>`;
|
|
57267
|
+
}
|
|
57268
|
+
function escapeAttr(s) {
|
|
57269
|
+
return s.replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<");
|
|
57270
|
+
}
|
|
57271
|
+
|
|
57059
57272
|
// src/renderer/index.ts
|
|
57060
57273
|
function render(document, options = {}) {
|
|
57274
|
+
const isMultiPage = document.children.length > 1;
|
|
57275
|
+
if (isMultiPage) {
|
|
57276
|
+
const result = renderCanvas(document, options);
|
|
57277
|
+
return { html: result.html, css: result.css };
|
|
57278
|
+
}
|
|
57061
57279
|
const renderer = createHtmlRenderer(options);
|
|
57062
57280
|
return renderer.render(document);
|
|
57063
57281
|
}
|
|
@@ -57093,24 +57311,33 @@ ${html}
|
|
|
57093
57311
|
</html>`;
|
|
57094
57312
|
}
|
|
57095
57313
|
function renderToSvg(document, options = {}) {
|
|
57096
|
-
const
|
|
57314
|
+
const isMultiPage = document.children.length > 1;
|
|
57097
57315
|
let width = options.width ?? 800;
|
|
57098
57316
|
let height = options.height ?? 600;
|
|
57099
|
-
|
|
57100
|
-
|
|
57101
|
-
|
|
57102
|
-
const
|
|
57103
|
-
|
|
57104
|
-
|
|
57105
|
-
|
|
57106
|
-
|
|
57107
|
-
|
|
57108
|
-
|
|
57109
|
-
|
|
57317
|
+
let html;
|
|
57318
|
+
let css;
|
|
57319
|
+
if (isMultiPage) {
|
|
57320
|
+
const canvas = renderCanvas(document, {
|
|
57321
|
+
theme: options.theme ?? "light"
|
|
57322
|
+
});
|
|
57323
|
+
if (options.width === void 0 && options.height === void 0) {
|
|
57324
|
+
width = canvas.width;
|
|
57325
|
+
height = canvas.height;
|
|
57326
|
+
}
|
|
57327
|
+
html = canvas.html;
|
|
57328
|
+
css = canvas.css;
|
|
57329
|
+
} else {
|
|
57330
|
+
const firstPage = document.children[0];
|
|
57331
|
+
if (firstPage && options.width === void 0 && options.height === void 0) {
|
|
57332
|
+
const dims = resolvePageDimensions(firstPage);
|
|
57333
|
+
width = dims.width;
|
|
57334
|
+
height = dims.height;
|
|
57110
57335
|
}
|
|
57336
|
+
const result = render(document, { theme: options.theme ?? "light" });
|
|
57337
|
+
html = result.html;
|
|
57338
|
+
css = result.css;
|
|
57111
57339
|
}
|
|
57112
57340
|
const background = options.background ?? "#ffffff";
|
|
57113
|
-
const { html, css } = render(document, { theme: options.theme ?? "light" });
|
|
57114
57341
|
const svg = `<?xml version="1.0" encoding="UTF-8"?>
|
|
57115
57342
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
57116
57343
|
viewBox="0 0 ${width} ${height}" width="${width}" height="${height}">
|
|
@@ -59034,15 +59261,19 @@ export {
|
|
|
59034
59261
|
isValidAst,
|
|
59035
59262
|
isValidAttribute,
|
|
59036
59263
|
isValidDevicePreset,
|
|
59264
|
+
layoutCanvas,
|
|
59037
59265
|
lucideIcons,
|
|
59038
59266
|
mapNodes,
|
|
59039
59267
|
parse,
|
|
59040
59268
|
parseViewportString,
|
|
59041
59269
|
render,
|
|
59270
|
+
renderCanvas,
|
|
59042
59271
|
renderIconSvg,
|
|
59272
|
+
renderPage,
|
|
59043
59273
|
renderToHtml,
|
|
59044
59274
|
renderToSvg,
|
|
59045
59275
|
resetFigmaIdCounter,
|
|
59276
|
+
resolvePageDimensions,
|
|
59046
59277
|
resolveViewport,
|
|
59047
59278
|
tryParse,
|
|
59048
59279
|
validate,
|