@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.cjs
CHANGED
|
@@ -120,15 +120,19 @@ __export(src_exports, {
|
|
|
120
120
|
isValidAst: () => isValidAst,
|
|
121
121
|
isValidAttribute: () => isValidAttribute,
|
|
122
122
|
isValidDevicePreset: () => isValidDevicePreset,
|
|
123
|
+
layoutCanvas: () => layoutCanvas,
|
|
123
124
|
lucideIcons: () => lucideIcons,
|
|
124
125
|
mapNodes: () => mapNodes,
|
|
125
126
|
parse: () => parse,
|
|
126
127
|
parseViewportString: () => parseViewportString,
|
|
127
128
|
render: () => render,
|
|
129
|
+
renderCanvas: () => renderCanvas,
|
|
128
130
|
renderIconSvg: () => renderIconSvg,
|
|
131
|
+
renderPage: () => renderPage,
|
|
129
132
|
renderToHtml: () => renderToHtml,
|
|
130
133
|
renderToSvg: () => renderToSvg,
|
|
131
134
|
resetFigmaIdCounter: () => resetFigmaIdCounter,
|
|
135
|
+
resolvePageDimensions: () => resolvePageDimensions,
|
|
132
136
|
resolveViewport: () => resolveViewport,
|
|
133
137
|
tryParse: () => tryParse,
|
|
134
138
|
validate: () => validate,
|
|
@@ -595,27 +599,30 @@ function peg$parse(input, options) {
|
|
|
595
599
|
const peg$c51 = "breadcrumb";
|
|
596
600
|
const peg$c52 = "marker";
|
|
597
601
|
const peg$c53 = "annotations";
|
|
598
|
-
const peg$c54 = "
|
|
599
|
-
const peg$c55 = "
|
|
600
|
-
const peg$c56 = "
|
|
601
|
-
const peg$c57 =
|
|
602
|
-
const peg$c58 = "
|
|
603
|
-
const peg$c59 = "
|
|
604
|
-
const peg$c60 = "
|
|
605
|
-
const peg$c61 = "
|
|
606
|
-
const peg$c62 = "
|
|
607
|
-
const peg$c63 = "
|
|
608
|
-
const peg$c64 = "
|
|
609
|
-
const peg$c65 = "
|
|
610
|
-
const peg$c66 = "
|
|
611
|
-
const peg$c67 = "
|
|
612
|
-
const peg$c68 = "
|
|
613
|
-
const peg$c69 = "
|
|
614
|
-
const peg$c70 = "
|
|
615
|
-
const peg$c71 = "
|
|
616
|
-
const peg$c72 = "
|
|
617
|
-
const peg$c73 = "
|
|
618
|
-
const peg$c74 = "
|
|
602
|
+
const peg$c54 = "at";
|
|
603
|
+
const peg$c55 = "(";
|
|
604
|
+
const peg$c56 = ")";
|
|
605
|
+
const peg$c57 = "=";
|
|
606
|
+
const peg$c58 = "//";
|
|
607
|
+
const peg$c59 = "/*";
|
|
608
|
+
const peg$c60 = '"';
|
|
609
|
+
const peg$c61 = "'";
|
|
610
|
+
const peg$c62 = "\\";
|
|
611
|
+
const peg$c63 = "n";
|
|
612
|
+
const peg$c64 = "r";
|
|
613
|
+
const peg$c65 = "t";
|
|
614
|
+
const peg$c66 = "-";
|
|
615
|
+
const peg$c67 = ".";
|
|
616
|
+
const peg$c68 = "px";
|
|
617
|
+
const peg$c69 = "%";
|
|
618
|
+
const peg$c70 = "em";
|
|
619
|
+
const peg$c71 = "rem";
|
|
620
|
+
const peg$c72 = "vh";
|
|
621
|
+
const peg$c73 = "vw";
|
|
622
|
+
const peg$c74 = "true";
|
|
623
|
+
const peg$c75 = "false";
|
|
624
|
+
const peg$c76 = "\n";
|
|
625
|
+
const peg$c77 = "*/";
|
|
619
626
|
const peg$r0 = /^[0-9]/;
|
|
620
627
|
const peg$r1 = /^[=[{}]/;
|
|
621
628
|
const peg$r2 = /^[a-zA-Z0-9_\-]/;
|
|
@@ -678,41 +685,46 @@ function peg$parse(input, options) {
|
|
|
678
685
|
const peg$e53 = peg$literalExpectation("annotations", false);
|
|
679
686
|
const peg$e54 = peg$otherExpectation("integer");
|
|
680
687
|
const peg$e55 = peg$classExpectation([["0", "9"]], false, false, false);
|
|
681
|
-
const peg$e56 = peg$literalExpectation("
|
|
682
|
-
const peg$e57 = peg$
|
|
683
|
-
const peg$e58 = peg$literalExpectation("
|
|
684
|
-
const peg$e59 = peg$literalExpectation("
|
|
685
|
-
const peg$e60 = peg$
|
|
686
|
-
const peg$e61 = peg$
|
|
687
|
-
const peg$e62 = peg$
|
|
688
|
-
const peg$e63 = peg$
|
|
689
|
-
const peg$e64 = peg$
|
|
690
|
-
const peg$e65 = peg$
|
|
691
|
-
const peg$e66 = peg$literalExpectation("
|
|
692
|
-
const peg$e67 = peg$literalExpectation("
|
|
693
|
-
const peg$e68 = peg$literalExpectation("
|
|
694
|
-
const peg$e69 = peg$
|
|
695
|
-
const peg$e70 = peg$literalExpectation("
|
|
696
|
-
const peg$e71 = peg$literalExpectation("
|
|
697
|
-
const peg$e72 = peg$otherExpectation("
|
|
698
|
-
const peg$e73 = peg$literalExpectation("
|
|
699
|
-
const peg$e74 = peg$literalExpectation("
|
|
700
|
-
const peg$e75 = peg$
|
|
701
|
-
const peg$e76 = peg$literalExpectation("
|
|
702
|
-
const peg$e77 = peg$literalExpectation("
|
|
703
|
-
const peg$e78 = peg$literalExpectation("
|
|
704
|
-
const peg$e79 = peg$
|
|
705
|
-
const peg$e80 = peg$literalExpectation("
|
|
706
|
-
const peg$e81 = peg$literalExpectation("
|
|
707
|
-
const peg$e82 = peg$otherExpectation("
|
|
708
|
-
const peg$e83 = peg$
|
|
709
|
-
const peg$e84 = peg$
|
|
710
|
-
const peg$e85 = peg$otherExpectation("
|
|
711
|
-
const peg$e86 = peg$classExpectation(["
|
|
712
|
-
const peg$e87 = peg$
|
|
713
|
-
const peg$e88 = peg$
|
|
688
|
+
const peg$e56 = peg$literalExpectation("at", false);
|
|
689
|
+
const peg$e57 = peg$literalExpectation("(", false);
|
|
690
|
+
const peg$e58 = peg$literalExpectation(")", false);
|
|
691
|
+
const peg$e59 = peg$literalExpectation("=", false);
|
|
692
|
+
const peg$e60 = peg$classExpectation(["=", "[", "{", "}"], false, false, false);
|
|
693
|
+
const peg$e61 = peg$literalExpectation("//", false);
|
|
694
|
+
const peg$e62 = peg$literalExpectation("/*", false);
|
|
695
|
+
const peg$e63 = peg$anyExpectation();
|
|
696
|
+
const peg$e64 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"], "_", "-"], false, false, false);
|
|
697
|
+
const peg$e65 = peg$otherExpectation("string");
|
|
698
|
+
const peg$e66 = peg$literalExpectation('"', false);
|
|
699
|
+
const peg$e67 = peg$literalExpectation("'", false);
|
|
700
|
+
const peg$e68 = peg$literalExpectation("\\", false);
|
|
701
|
+
const peg$e69 = peg$literalExpectation("n", false);
|
|
702
|
+
const peg$e70 = peg$literalExpectation("r", false);
|
|
703
|
+
const peg$e71 = peg$literalExpectation("t", false);
|
|
704
|
+
const peg$e72 = peg$otherExpectation("number");
|
|
705
|
+
const peg$e73 = peg$literalExpectation("-", false);
|
|
706
|
+
const peg$e74 = peg$literalExpectation(".", false);
|
|
707
|
+
const peg$e75 = peg$otherExpectation("value with unit");
|
|
708
|
+
const peg$e76 = peg$literalExpectation("px", false);
|
|
709
|
+
const peg$e77 = peg$literalExpectation("%", false);
|
|
710
|
+
const peg$e78 = peg$literalExpectation("em", false);
|
|
711
|
+
const peg$e79 = peg$literalExpectation("rem", false);
|
|
712
|
+
const peg$e80 = peg$literalExpectation("vh", false);
|
|
713
|
+
const peg$e81 = peg$literalExpectation("vw", false);
|
|
714
|
+
const peg$e82 = peg$otherExpectation("boolean");
|
|
715
|
+
const peg$e83 = peg$literalExpectation("true", false);
|
|
716
|
+
const peg$e84 = peg$literalExpectation("false", false);
|
|
717
|
+
const peg$e85 = peg$otherExpectation("identifier");
|
|
718
|
+
const peg$e86 = peg$classExpectation([["a", "z"], ["A", "Z"], "_"], false, false, false);
|
|
719
|
+
const peg$e87 = peg$classExpectation([" ", " ", "\n", "\r"], false, false, false);
|
|
720
|
+
const peg$e88 = peg$otherExpectation("comment");
|
|
721
|
+
const peg$e89 = peg$classExpectation(["\n"], true, false, false);
|
|
722
|
+
const peg$e90 = peg$literalExpectation("\n", false);
|
|
723
|
+
const peg$e91 = peg$literalExpectation("*/", false);
|
|
714
724
|
function peg$f0(children) {
|
|
715
|
-
return createNode("Document", {
|
|
725
|
+
return createNode("Document", {
|
|
726
|
+
children: children.map((c) => c[0]).filter((c) => c !== null)
|
|
727
|
+
});
|
|
716
728
|
}
|
|
717
729
|
function peg$f1() {
|
|
718
730
|
return null;
|
|
@@ -1148,75 +1160,81 @@ function peg$parse(input, options) {
|
|
|
1148
1160
|
function peg$f78(attrs) {
|
|
1149
1161
|
return attrs;
|
|
1150
1162
|
}
|
|
1151
|
-
function peg$f79(
|
|
1163
|
+
function peg$f79(x, y) {
|
|
1164
|
+
return [
|
|
1165
|
+
{ name: "x", value: x },
|
|
1166
|
+
{ name: "y", value: y }
|
|
1167
|
+
];
|
|
1168
|
+
}
|
|
1169
|
+
function peg$f80(name, value) {
|
|
1152
1170
|
return { name, value };
|
|
1153
1171
|
}
|
|
1154
|
-
function peg$
|
|
1172
|
+
function peg$f81(flag) {
|
|
1155
1173
|
return { name: flag, value: true };
|
|
1156
1174
|
}
|
|
1157
|
-
function peg$
|
|
1175
|
+
function peg$f82(name) {
|
|
1158
1176
|
return name;
|
|
1159
1177
|
}
|
|
1160
|
-
function peg$
|
|
1178
|
+
function peg$f83(chars) {
|
|
1161
1179
|
return chars.join("");
|
|
1162
1180
|
}
|
|
1163
|
-
function peg$
|
|
1181
|
+
function peg$f84(chars) {
|
|
1164
1182
|
return chars.join("");
|
|
1165
1183
|
}
|
|
1166
|
-
function peg$
|
|
1184
|
+
function peg$f85(char) {
|
|
1167
1185
|
return char;
|
|
1168
1186
|
}
|
|
1169
|
-
function peg$
|
|
1187
|
+
function peg$f86(seq) {
|
|
1170
1188
|
return seq;
|
|
1171
1189
|
}
|
|
1172
|
-
function peg$
|
|
1190
|
+
function peg$f87(char) {
|
|
1173
1191
|
return char;
|
|
1174
1192
|
}
|
|
1175
|
-
function peg$
|
|
1193
|
+
function peg$f88(seq) {
|
|
1176
1194
|
return seq;
|
|
1177
1195
|
}
|
|
1178
|
-
function peg$
|
|
1196
|
+
function peg$f89() {
|
|
1179
1197
|
return "\n";
|
|
1180
1198
|
}
|
|
1181
|
-
function peg$
|
|
1199
|
+
function peg$f90() {
|
|
1182
1200
|
return "\r";
|
|
1183
1201
|
}
|
|
1184
|
-
function peg$
|
|
1202
|
+
function peg$f91() {
|
|
1185
1203
|
return " ";
|
|
1186
1204
|
}
|
|
1187
|
-
function peg$
|
|
1205
|
+
function peg$f92() {
|
|
1188
1206
|
return "\\";
|
|
1189
1207
|
}
|
|
1190
|
-
function peg$
|
|
1208
|
+
function peg$f93() {
|
|
1191
1209
|
return '"';
|
|
1192
1210
|
}
|
|
1193
|
-
function peg$
|
|
1211
|
+
function peg$f94() {
|
|
1194
1212
|
return "'";
|
|
1195
1213
|
}
|
|
1196
|
-
function peg$
|
|
1214
|
+
function peg$f95(sign, digits, decimal) {
|
|
1197
1215
|
const num = (sign || "") + digits.join("") + (decimal ? "." + decimal[1].join("") : "");
|
|
1198
1216
|
return parseFloat(num);
|
|
1199
1217
|
}
|
|
1200
|
-
function peg$
|
|
1218
|
+
function peg$f96(sign, digits, decimal, unit) {
|
|
1201
1219
|
const num = (sign || "") + digits.join("") + (decimal ? "." + decimal[1].join("") : "");
|
|
1202
1220
|
return { value: parseFloat(num), unit };
|
|
1203
1221
|
}
|
|
1204
|
-
function peg$
|
|
1222
|
+
function peg$f97() {
|
|
1205
1223
|
return true;
|
|
1206
1224
|
}
|
|
1207
|
-
function peg$
|
|
1225
|
+
function peg$f98() {
|
|
1208
1226
|
return false;
|
|
1209
1227
|
}
|
|
1210
|
-
function peg$
|
|
1228
|
+
function peg$f99(head, tail) {
|
|
1211
1229
|
return head + tail.join("");
|
|
1212
1230
|
}
|
|
1213
|
-
function peg$
|
|
1231
|
+
function peg$f100(items) {
|
|
1214
1232
|
return items || [];
|
|
1215
1233
|
}
|
|
1216
|
-
function peg$
|
|
1234
|
+
function peg$f101(head, tail) {
|
|
1217
1235
|
return [head, ...tail.map((t) => t[3])];
|
|
1218
1236
|
}
|
|
1219
|
-
function peg$
|
|
1237
|
+
function peg$f102(props) {
|
|
1220
1238
|
const result = {};
|
|
1221
1239
|
if (props) {
|
|
1222
1240
|
for (const p of props) {
|
|
@@ -1225,13 +1243,13 @@ function peg$parse(input, options) {
|
|
|
1225
1243
|
}
|
|
1226
1244
|
return result;
|
|
1227
1245
|
}
|
|
1228
|
-
function peg$
|
|
1246
|
+
function peg$f103(head, tail) {
|
|
1229
1247
|
return [head, ...tail.map((t) => t[3])];
|
|
1230
1248
|
}
|
|
1231
|
-
function peg$
|
|
1249
|
+
function peg$f104(name, value) {
|
|
1232
1250
|
return { name, value };
|
|
1233
1251
|
}
|
|
1234
|
-
function peg$
|
|
1252
|
+
function peg$f105(name) {
|
|
1235
1253
|
return { name, value: true };
|
|
1236
1254
|
}
|
|
1237
1255
|
let peg$currPos = options.peg$currPos | 0;
|
|
@@ -1372,16 +1390,33 @@ function peg$parse(input, options) {
|
|
|
1372
1390
|
);
|
|
1373
1391
|
}
|
|
1374
1392
|
function peg$parseDocument() {
|
|
1375
|
-
let s0, s1, s2, s3;
|
|
1393
|
+
let s0, s1, s2, s3, s4, s5;
|
|
1376
1394
|
s0 = peg$currPos;
|
|
1377
1395
|
s1 = peg$parse_();
|
|
1378
1396
|
s2 = [];
|
|
1379
|
-
s3 = peg$
|
|
1397
|
+
s3 = peg$currPos;
|
|
1398
|
+
s4 = peg$parseTopLevelElement();
|
|
1399
|
+
if (s4 !== peg$FAILED) {
|
|
1400
|
+
s5 = peg$parse_();
|
|
1401
|
+
s4 = [s4, s5];
|
|
1402
|
+
s3 = s4;
|
|
1403
|
+
} else {
|
|
1404
|
+
peg$currPos = s3;
|
|
1405
|
+
s3 = peg$FAILED;
|
|
1406
|
+
}
|
|
1380
1407
|
while (s3 !== peg$FAILED) {
|
|
1381
1408
|
s2.push(s3);
|
|
1382
|
-
s3 = peg$
|
|
1409
|
+
s3 = peg$currPos;
|
|
1410
|
+
s4 = peg$parseTopLevelElement();
|
|
1411
|
+
if (s4 !== peg$FAILED) {
|
|
1412
|
+
s5 = peg$parse_();
|
|
1413
|
+
s4 = [s4, s5];
|
|
1414
|
+
s3 = s4;
|
|
1415
|
+
} else {
|
|
1416
|
+
peg$currPos = s3;
|
|
1417
|
+
s3 = peg$FAILED;
|
|
1418
|
+
}
|
|
1383
1419
|
}
|
|
1384
|
-
s3 = peg$parse_();
|
|
1385
1420
|
peg$savedPos = s0;
|
|
1386
1421
|
s0 = peg$f0(s2);
|
|
1387
1422
|
return s0;
|
|
@@ -4727,27 +4762,87 @@ function peg$parse(input, options) {
|
|
|
4727
4762
|
return s0;
|
|
4728
4763
|
}
|
|
4729
4764
|
function peg$parseAttribute() {
|
|
4730
|
-
let s0, s1, s2, s3, s4, s5, s6, s7;
|
|
4765
|
+
let s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13;
|
|
4731
4766
|
s0 = peg$currPos;
|
|
4732
4767
|
s1 = peg$parse_();
|
|
4733
|
-
|
|
4768
|
+
if (input.substr(peg$currPos, 2) === peg$c54) {
|
|
4769
|
+
s2 = peg$c54;
|
|
4770
|
+
peg$currPos += 2;
|
|
4771
|
+
} else {
|
|
4772
|
+
s2 = peg$FAILED;
|
|
4773
|
+
if (peg$silentFails === 0) {
|
|
4774
|
+
peg$fail(peg$e56);
|
|
4775
|
+
}
|
|
4776
|
+
}
|
|
4734
4777
|
if (s2 !== peg$FAILED) {
|
|
4735
|
-
s3 = peg$
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
|
|
4778
|
+
s3 = peg$currPos;
|
|
4779
|
+
peg$silentFails++;
|
|
4780
|
+
s4 = peg$parseIdentifierChar();
|
|
4781
|
+
peg$silentFails--;
|
|
4782
|
+
if (s4 === peg$FAILED) {
|
|
4783
|
+
s3 = void 0;
|
|
4739
4784
|
} else {
|
|
4740
|
-
|
|
4741
|
-
|
|
4742
|
-
peg$fail(peg$e56);
|
|
4743
|
-
}
|
|
4785
|
+
peg$currPos = s3;
|
|
4786
|
+
s3 = peg$FAILED;
|
|
4744
4787
|
}
|
|
4745
|
-
if (
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
peg$
|
|
4750
|
-
|
|
4788
|
+
if (s3 !== peg$FAILED) {
|
|
4789
|
+
s4 = peg$parse_();
|
|
4790
|
+
if (input.charCodeAt(peg$currPos) === 40) {
|
|
4791
|
+
s5 = peg$c55;
|
|
4792
|
+
peg$currPos++;
|
|
4793
|
+
} else {
|
|
4794
|
+
s5 = peg$FAILED;
|
|
4795
|
+
if (peg$silentFails === 0) {
|
|
4796
|
+
peg$fail(peg$e57);
|
|
4797
|
+
}
|
|
4798
|
+
}
|
|
4799
|
+
if (s5 !== peg$FAILED) {
|
|
4800
|
+
s6 = peg$parse_();
|
|
4801
|
+
s7 = peg$parseNumber();
|
|
4802
|
+
if (s7 !== peg$FAILED) {
|
|
4803
|
+
s8 = peg$parse_();
|
|
4804
|
+
if (input.charCodeAt(peg$currPos) === 44) {
|
|
4805
|
+
s9 = peg$c34;
|
|
4806
|
+
peg$currPos++;
|
|
4807
|
+
} else {
|
|
4808
|
+
s9 = peg$FAILED;
|
|
4809
|
+
if (peg$silentFails === 0) {
|
|
4810
|
+
peg$fail(peg$e34);
|
|
4811
|
+
}
|
|
4812
|
+
}
|
|
4813
|
+
if (s9 !== peg$FAILED) {
|
|
4814
|
+
s10 = peg$parse_();
|
|
4815
|
+
s11 = peg$parseNumber();
|
|
4816
|
+
if (s11 !== peg$FAILED) {
|
|
4817
|
+
s12 = peg$parse_();
|
|
4818
|
+
if (input.charCodeAt(peg$currPos) === 41) {
|
|
4819
|
+
s13 = peg$c56;
|
|
4820
|
+
peg$currPos++;
|
|
4821
|
+
} else {
|
|
4822
|
+
s13 = peg$FAILED;
|
|
4823
|
+
if (peg$silentFails === 0) {
|
|
4824
|
+
peg$fail(peg$e58);
|
|
4825
|
+
}
|
|
4826
|
+
}
|
|
4827
|
+
if (s13 !== peg$FAILED) {
|
|
4828
|
+
peg$savedPos = s0;
|
|
4829
|
+
s0 = peg$f79(s7, s11);
|
|
4830
|
+
} else {
|
|
4831
|
+
peg$currPos = s0;
|
|
4832
|
+
s0 = peg$FAILED;
|
|
4833
|
+
}
|
|
4834
|
+
} else {
|
|
4835
|
+
peg$currPos = s0;
|
|
4836
|
+
s0 = peg$FAILED;
|
|
4837
|
+
}
|
|
4838
|
+
} else {
|
|
4839
|
+
peg$currPos = s0;
|
|
4840
|
+
s0 = peg$FAILED;
|
|
4841
|
+
}
|
|
4842
|
+
} else {
|
|
4843
|
+
peg$currPos = s0;
|
|
4844
|
+
s0 = peg$FAILED;
|
|
4845
|
+
}
|
|
4751
4846
|
} else {
|
|
4752
4847
|
peg$currPos = s0;
|
|
4753
4848
|
s0 = peg$FAILED;
|
|
@@ -4765,91 +4860,125 @@ function peg$parse(input, options) {
|
|
|
4765
4860
|
s1 = peg$parse_();
|
|
4766
4861
|
s2 = peg$parseAttributeName();
|
|
4767
4862
|
if (s2 !== peg$FAILED) {
|
|
4768
|
-
s3 = peg$
|
|
4769
|
-
peg$
|
|
4770
|
-
|
|
4771
|
-
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
|
|
4863
|
+
s3 = peg$parse_();
|
|
4864
|
+
if (input.charCodeAt(peg$currPos) === 61) {
|
|
4865
|
+
s4 = peg$c57;
|
|
4866
|
+
peg$currPos++;
|
|
4867
|
+
} else {
|
|
4868
|
+
s4 = peg$FAILED;
|
|
4869
|
+
if (peg$silentFails === 0) {
|
|
4870
|
+
peg$fail(peg$e59);
|
|
4871
|
+
}
|
|
4872
|
+
}
|
|
4873
|
+
if (s4 !== peg$FAILED) {
|
|
4874
|
+
s5 = peg$parse_();
|
|
4875
|
+
s6 = peg$parseAttributeValue();
|
|
4876
|
+
if (s6 !== peg$FAILED) {
|
|
4877
|
+
peg$savedPos = s0;
|
|
4878
|
+
s0 = peg$f80(s2, s6);
|
|
4879
|
+
} else {
|
|
4880
|
+
peg$currPos = s0;
|
|
4881
|
+
s0 = peg$FAILED;
|
|
4882
|
+
}
|
|
4883
|
+
} else {
|
|
4884
|
+
peg$currPos = s0;
|
|
4885
|
+
s0 = peg$FAILED;
|
|
4886
|
+
}
|
|
4887
|
+
} else {
|
|
4888
|
+
peg$currPos = s0;
|
|
4889
|
+
s0 = peg$FAILED;
|
|
4890
|
+
}
|
|
4891
|
+
if (s0 === peg$FAILED) {
|
|
4892
|
+
s0 = peg$currPos;
|
|
4893
|
+
s1 = peg$parse_();
|
|
4894
|
+
s2 = peg$parseAttributeName();
|
|
4895
|
+
if (s2 !== peg$FAILED) {
|
|
4896
|
+
s3 = peg$currPos;
|
|
4897
|
+
peg$silentFails++;
|
|
4898
|
+
s4 = peg$currPos;
|
|
4899
|
+
s5 = peg$parse_();
|
|
4900
|
+
s6 = peg$parseChildKeyword();
|
|
4775
4901
|
if (s6 === peg$FAILED) {
|
|
4776
|
-
s6 =
|
|
4777
|
-
if (peg$r1.test(s6)) {
|
|
4778
|
-
peg$currPos++;
|
|
4779
|
-
} else {
|
|
4780
|
-
s6 = peg$FAILED;
|
|
4781
|
-
if (peg$silentFails === 0) {
|
|
4782
|
-
peg$fail(peg$e57);
|
|
4783
|
-
}
|
|
4784
|
-
}
|
|
4902
|
+
s6 = peg$parseAttributeName();
|
|
4785
4903
|
if (s6 === peg$FAILED) {
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
peg$currPos
|
|
4904
|
+
s6 = input.charAt(peg$currPos);
|
|
4905
|
+
if (peg$r1.test(s6)) {
|
|
4906
|
+
peg$currPos++;
|
|
4789
4907
|
} else {
|
|
4790
4908
|
s6 = peg$FAILED;
|
|
4791
4909
|
if (peg$silentFails === 0) {
|
|
4792
|
-
peg$fail(peg$
|
|
4910
|
+
peg$fail(peg$e60);
|
|
4793
4911
|
}
|
|
4794
4912
|
}
|
|
4795
4913
|
if (s6 === peg$FAILED) {
|
|
4796
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
4797
|
-
s6 = peg$
|
|
4914
|
+
if (input.substr(peg$currPos, 2) === peg$c58) {
|
|
4915
|
+
s6 = peg$c58;
|
|
4798
4916
|
peg$currPos += 2;
|
|
4799
4917
|
} else {
|
|
4800
4918
|
s6 = peg$FAILED;
|
|
4801
4919
|
if (peg$silentFails === 0) {
|
|
4802
|
-
peg$fail(peg$
|
|
4920
|
+
peg$fail(peg$e61);
|
|
4803
4921
|
}
|
|
4804
4922
|
}
|
|
4805
4923
|
if (s6 === peg$FAILED) {
|
|
4806
|
-
|
|
4807
|
-
|
|
4808
|
-
|
|
4809
|
-
s7 = input.charAt(peg$currPos);
|
|
4810
|
-
peg$currPos++;
|
|
4924
|
+
if (input.substr(peg$currPos, 2) === peg$c59) {
|
|
4925
|
+
s6 = peg$c59;
|
|
4926
|
+
peg$currPos += 2;
|
|
4811
4927
|
} else {
|
|
4812
|
-
|
|
4928
|
+
s6 = peg$FAILED;
|
|
4813
4929
|
if (peg$silentFails === 0) {
|
|
4814
|
-
peg$fail(peg$
|
|
4930
|
+
peg$fail(peg$e62);
|
|
4815
4931
|
}
|
|
4816
4932
|
}
|
|
4817
|
-
peg$
|
|
4818
|
-
|
|
4819
|
-
|
|
4820
|
-
|
|
4821
|
-
|
|
4822
|
-
|
|
4933
|
+
if (s6 === peg$FAILED) {
|
|
4934
|
+
s6 = peg$currPos;
|
|
4935
|
+
peg$silentFails++;
|
|
4936
|
+
if (input.length > peg$currPos) {
|
|
4937
|
+
s7 = input.charAt(peg$currPos);
|
|
4938
|
+
peg$currPos++;
|
|
4939
|
+
} else {
|
|
4940
|
+
s7 = peg$FAILED;
|
|
4941
|
+
if (peg$silentFails === 0) {
|
|
4942
|
+
peg$fail(peg$e63);
|
|
4943
|
+
}
|
|
4944
|
+
}
|
|
4945
|
+
peg$silentFails--;
|
|
4946
|
+
if (s7 === peg$FAILED) {
|
|
4947
|
+
s6 = void 0;
|
|
4948
|
+
} else {
|
|
4949
|
+
peg$currPos = s6;
|
|
4950
|
+
s6 = peg$FAILED;
|
|
4951
|
+
}
|
|
4823
4952
|
}
|
|
4824
4953
|
}
|
|
4825
4954
|
}
|
|
4826
4955
|
}
|
|
4827
4956
|
}
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4957
|
+
if (s6 !== peg$FAILED) {
|
|
4958
|
+
s5 = [s5, s6];
|
|
4959
|
+
s4 = s5;
|
|
4960
|
+
} else {
|
|
4961
|
+
peg$currPos = s4;
|
|
4962
|
+
s4 = peg$FAILED;
|
|
4963
|
+
}
|
|
4964
|
+
peg$silentFails--;
|
|
4965
|
+
if (s4 !== peg$FAILED) {
|
|
4966
|
+
peg$currPos = s3;
|
|
4967
|
+
s3 = void 0;
|
|
4968
|
+
} else {
|
|
4969
|
+
s3 = peg$FAILED;
|
|
4970
|
+
}
|
|
4971
|
+
if (s3 !== peg$FAILED) {
|
|
4972
|
+
peg$savedPos = s0;
|
|
4973
|
+
s0 = peg$f81(s2);
|
|
4974
|
+
} else {
|
|
4975
|
+
peg$currPos = s0;
|
|
4976
|
+
s0 = peg$FAILED;
|
|
4977
|
+
}
|
|
4846
4978
|
} else {
|
|
4847
4979
|
peg$currPos = s0;
|
|
4848
4980
|
s0 = peg$FAILED;
|
|
4849
4981
|
}
|
|
4850
|
-
} else {
|
|
4851
|
-
peg$currPos = s0;
|
|
4852
|
-
s0 = peg$FAILED;
|
|
4853
4982
|
}
|
|
4854
4983
|
}
|
|
4855
4984
|
return s0;
|
|
@@ -4871,7 +5000,7 @@ function peg$parse(input, options) {
|
|
|
4871
5000
|
s2 = peg$parseIdentifier();
|
|
4872
5001
|
if (s2 !== peg$FAILED) {
|
|
4873
5002
|
peg$savedPos = s0;
|
|
4874
|
-
s0 = peg$
|
|
5003
|
+
s0 = peg$f82(s2);
|
|
4875
5004
|
} else {
|
|
4876
5005
|
peg$currPos = s0;
|
|
4877
5006
|
s0 = peg$FAILED;
|
|
@@ -5421,7 +5550,7 @@ function peg$parse(input, options) {
|
|
|
5421
5550
|
} else {
|
|
5422
5551
|
s0 = peg$FAILED;
|
|
5423
5552
|
if (peg$silentFails === 0) {
|
|
5424
|
-
peg$fail(peg$
|
|
5553
|
+
peg$fail(peg$e64);
|
|
5425
5554
|
}
|
|
5426
5555
|
}
|
|
5427
5556
|
return s0;
|
|
@@ -5454,12 +5583,12 @@ function peg$parse(input, options) {
|
|
|
5454
5583
|
peg$silentFails++;
|
|
5455
5584
|
s0 = peg$currPos;
|
|
5456
5585
|
if (input.charCodeAt(peg$currPos) === 34) {
|
|
5457
|
-
s1 = peg$
|
|
5586
|
+
s1 = peg$c60;
|
|
5458
5587
|
peg$currPos++;
|
|
5459
5588
|
} else {
|
|
5460
5589
|
s1 = peg$FAILED;
|
|
5461
5590
|
if (peg$silentFails === 0) {
|
|
5462
|
-
peg$fail(peg$
|
|
5591
|
+
peg$fail(peg$e66);
|
|
5463
5592
|
}
|
|
5464
5593
|
}
|
|
5465
5594
|
if (s1 !== peg$FAILED) {
|
|
@@ -5470,17 +5599,17 @@ function peg$parse(input, options) {
|
|
|
5470
5599
|
s3 = peg$parseDoubleStringChar();
|
|
5471
5600
|
}
|
|
5472
5601
|
if (input.charCodeAt(peg$currPos) === 34) {
|
|
5473
|
-
s3 = peg$
|
|
5602
|
+
s3 = peg$c60;
|
|
5474
5603
|
peg$currPos++;
|
|
5475
5604
|
} else {
|
|
5476
5605
|
s3 = peg$FAILED;
|
|
5477
5606
|
if (peg$silentFails === 0) {
|
|
5478
|
-
peg$fail(peg$
|
|
5607
|
+
peg$fail(peg$e66);
|
|
5479
5608
|
}
|
|
5480
5609
|
}
|
|
5481
5610
|
if (s3 !== peg$FAILED) {
|
|
5482
5611
|
peg$savedPos = s0;
|
|
5483
|
-
s0 = peg$
|
|
5612
|
+
s0 = peg$f83(s2);
|
|
5484
5613
|
} else {
|
|
5485
5614
|
peg$currPos = s0;
|
|
5486
5615
|
s0 = peg$FAILED;
|
|
@@ -5492,12 +5621,12 @@ function peg$parse(input, options) {
|
|
|
5492
5621
|
if (s0 === peg$FAILED) {
|
|
5493
5622
|
s0 = peg$currPos;
|
|
5494
5623
|
if (input.charCodeAt(peg$currPos) === 39) {
|
|
5495
|
-
s1 = peg$
|
|
5624
|
+
s1 = peg$c61;
|
|
5496
5625
|
peg$currPos++;
|
|
5497
5626
|
} else {
|
|
5498
5627
|
s1 = peg$FAILED;
|
|
5499
5628
|
if (peg$silentFails === 0) {
|
|
5500
|
-
peg$fail(peg$
|
|
5629
|
+
peg$fail(peg$e67);
|
|
5501
5630
|
}
|
|
5502
5631
|
}
|
|
5503
5632
|
if (s1 !== peg$FAILED) {
|
|
@@ -5508,17 +5637,17 @@ function peg$parse(input, options) {
|
|
|
5508
5637
|
s3 = peg$parseSingleStringChar();
|
|
5509
5638
|
}
|
|
5510
5639
|
if (input.charCodeAt(peg$currPos) === 39) {
|
|
5511
|
-
s3 = peg$
|
|
5640
|
+
s3 = peg$c61;
|
|
5512
5641
|
peg$currPos++;
|
|
5513
5642
|
} else {
|
|
5514
5643
|
s3 = peg$FAILED;
|
|
5515
5644
|
if (peg$silentFails === 0) {
|
|
5516
|
-
peg$fail(peg$
|
|
5645
|
+
peg$fail(peg$e67);
|
|
5517
5646
|
}
|
|
5518
5647
|
}
|
|
5519
5648
|
if (s3 !== peg$FAILED) {
|
|
5520
5649
|
peg$savedPos = s0;
|
|
5521
|
-
s0 = peg$
|
|
5650
|
+
s0 = peg$f84(s2);
|
|
5522
5651
|
} else {
|
|
5523
5652
|
peg$currPos = s0;
|
|
5524
5653
|
s0 = peg$FAILED;
|
|
@@ -5532,7 +5661,7 @@ function peg$parse(input, options) {
|
|
|
5532
5661
|
if (s0 === peg$FAILED) {
|
|
5533
5662
|
s1 = peg$FAILED;
|
|
5534
5663
|
if (peg$silentFails === 0) {
|
|
5535
|
-
peg$fail(peg$
|
|
5664
|
+
peg$fail(peg$e65);
|
|
5536
5665
|
}
|
|
5537
5666
|
}
|
|
5538
5667
|
return s0;
|
|
@@ -5543,12 +5672,12 @@ function peg$parse(input, options) {
|
|
|
5543
5672
|
s1 = peg$currPos;
|
|
5544
5673
|
peg$silentFails++;
|
|
5545
5674
|
if (input.charCodeAt(peg$currPos) === 34) {
|
|
5546
|
-
s2 = peg$
|
|
5675
|
+
s2 = peg$c60;
|
|
5547
5676
|
peg$currPos++;
|
|
5548
5677
|
} else {
|
|
5549
5678
|
s2 = peg$FAILED;
|
|
5550
5679
|
if (peg$silentFails === 0) {
|
|
5551
|
-
peg$fail(peg$
|
|
5680
|
+
peg$fail(peg$e66);
|
|
5552
5681
|
}
|
|
5553
5682
|
}
|
|
5554
5683
|
peg$silentFails--;
|
|
@@ -5562,12 +5691,12 @@ function peg$parse(input, options) {
|
|
|
5562
5691
|
s2 = peg$currPos;
|
|
5563
5692
|
peg$silentFails++;
|
|
5564
5693
|
if (input.charCodeAt(peg$currPos) === 92) {
|
|
5565
|
-
s3 = peg$
|
|
5694
|
+
s3 = peg$c62;
|
|
5566
5695
|
peg$currPos++;
|
|
5567
5696
|
} else {
|
|
5568
5697
|
s3 = peg$FAILED;
|
|
5569
5698
|
if (peg$silentFails === 0) {
|
|
5570
|
-
peg$fail(peg$
|
|
5699
|
+
peg$fail(peg$e68);
|
|
5571
5700
|
}
|
|
5572
5701
|
}
|
|
5573
5702
|
peg$silentFails--;
|
|
@@ -5584,12 +5713,12 @@ function peg$parse(input, options) {
|
|
|
5584
5713
|
} else {
|
|
5585
5714
|
s3 = peg$FAILED;
|
|
5586
5715
|
if (peg$silentFails === 0) {
|
|
5587
|
-
peg$fail(peg$
|
|
5716
|
+
peg$fail(peg$e63);
|
|
5588
5717
|
}
|
|
5589
5718
|
}
|
|
5590
5719
|
if (s3 !== peg$FAILED) {
|
|
5591
5720
|
peg$savedPos = s0;
|
|
5592
|
-
s0 = peg$
|
|
5721
|
+
s0 = peg$f85(s3);
|
|
5593
5722
|
} else {
|
|
5594
5723
|
peg$currPos = s0;
|
|
5595
5724
|
s0 = peg$FAILED;
|
|
@@ -5605,19 +5734,19 @@ function peg$parse(input, options) {
|
|
|
5605
5734
|
if (s0 === peg$FAILED) {
|
|
5606
5735
|
s0 = peg$currPos;
|
|
5607
5736
|
if (input.charCodeAt(peg$currPos) === 92) {
|
|
5608
|
-
s1 = peg$
|
|
5737
|
+
s1 = peg$c62;
|
|
5609
5738
|
peg$currPos++;
|
|
5610
5739
|
} else {
|
|
5611
5740
|
s1 = peg$FAILED;
|
|
5612
5741
|
if (peg$silentFails === 0) {
|
|
5613
|
-
peg$fail(peg$
|
|
5742
|
+
peg$fail(peg$e68);
|
|
5614
5743
|
}
|
|
5615
5744
|
}
|
|
5616
5745
|
if (s1 !== peg$FAILED) {
|
|
5617
5746
|
s2 = peg$parseEscapeSequence();
|
|
5618
5747
|
if (s2 !== peg$FAILED) {
|
|
5619
5748
|
peg$savedPos = s0;
|
|
5620
|
-
s0 = peg$
|
|
5749
|
+
s0 = peg$f86(s2);
|
|
5621
5750
|
} else {
|
|
5622
5751
|
peg$currPos = s0;
|
|
5623
5752
|
s0 = peg$FAILED;
|
|
@@ -5635,12 +5764,12 @@ function peg$parse(input, options) {
|
|
|
5635
5764
|
s1 = peg$currPos;
|
|
5636
5765
|
peg$silentFails++;
|
|
5637
5766
|
if (input.charCodeAt(peg$currPos) === 39) {
|
|
5638
|
-
s2 = peg$
|
|
5767
|
+
s2 = peg$c61;
|
|
5639
5768
|
peg$currPos++;
|
|
5640
5769
|
} else {
|
|
5641
5770
|
s2 = peg$FAILED;
|
|
5642
5771
|
if (peg$silentFails === 0) {
|
|
5643
|
-
peg$fail(peg$
|
|
5772
|
+
peg$fail(peg$e67);
|
|
5644
5773
|
}
|
|
5645
5774
|
}
|
|
5646
5775
|
peg$silentFails--;
|
|
@@ -5654,12 +5783,12 @@ function peg$parse(input, options) {
|
|
|
5654
5783
|
s2 = peg$currPos;
|
|
5655
5784
|
peg$silentFails++;
|
|
5656
5785
|
if (input.charCodeAt(peg$currPos) === 92) {
|
|
5657
|
-
s3 = peg$
|
|
5786
|
+
s3 = peg$c62;
|
|
5658
5787
|
peg$currPos++;
|
|
5659
5788
|
} else {
|
|
5660
5789
|
s3 = peg$FAILED;
|
|
5661
5790
|
if (peg$silentFails === 0) {
|
|
5662
|
-
peg$fail(peg$
|
|
5791
|
+
peg$fail(peg$e68);
|
|
5663
5792
|
}
|
|
5664
5793
|
}
|
|
5665
5794
|
peg$silentFails--;
|
|
@@ -5676,12 +5805,12 @@ function peg$parse(input, options) {
|
|
|
5676
5805
|
} else {
|
|
5677
5806
|
s3 = peg$FAILED;
|
|
5678
5807
|
if (peg$silentFails === 0) {
|
|
5679
|
-
peg$fail(peg$
|
|
5808
|
+
peg$fail(peg$e63);
|
|
5680
5809
|
}
|
|
5681
5810
|
}
|
|
5682
5811
|
if (s3 !== peg$FAILED) {
|
|
5683
5812
|
peg$savedPos = s0;
|
|
5684
|
-
s0 = peg$
|
|
5813
|
+
s0 = peg$f87(s3);
|
|
5685
5814
|
} else {
|
|
5686
5815
|
peg$currPos = s0;
|
|
5687
5816
|
s0 = peg$FAILED;
|
|
@@ -5697,19 +5826,19 @@ function peg$parse(input, options) {
|
|
|
5697
5826
|
if (s0 === peg$FAILED) {
|
|
5698
5827
|
s0 = peg$currPos;
|
|
5699
5828
|
if (input.charCodeAt(peg$currPos) === 92) {
|
|
5700
|
-
s1 = peg$
|
|
5829
|
+
s1 = peg$c62;
|
|
5701
5830
|
peg$currPos++;
|
|
5702
5831
|
} else {
|
|
5703
5832
|
s1 = peg$FAILED;
|
|
5704
5833
|
if (peg$silentFails === 0) {
|
|
5705
|
-
peg$fail(peg$
|
|
5834
|
+
peg$fail(peg$e68);
|
|
5706
5835
|
}
|
|
5707
5836
|
}
|
|
5708
5837
|
if (s1 !== peg$FAILED) {
|
|
5709
5838
|
s2 = peg$parseEscapeSequence();
|
|
5710
5839
|
if (s2 !== peg$FAILED) {
|
|
5711
5840
|
peg$savedPos = s0;
|
|
5712
|
-
s0 = peg$
|
|
5841
|
+
s0 = peg$f88(s2);
|
|
5713
5842
|
} else {
|
|
5714
5843
|
peg$currPos = s0;
|
|
5715
5844
|
s0 = peg$FAILED;
|
|
@@ -5725,97 +5854,97 @@ function peg$parse(input, options) {
|
|
|
5725
5854
|
let s0, s1;
|
|
5726
5855
|
s0 = peg$currPos;
|
|
5727
5856
|
if (input.charCodeAt(peg$currPos) === 110) {
|
|
5728
|
-
s1 = peg$
|
|
5857
|
+
s1 = peg$c63;
|
|
5729
5858
|
peg$currPos++;
|
|
5730
5859
|
} else {
|
|
5731
5860
|
s1 = peg$FAILED;
|
|
5732
5861
|
if (peg$silentFails === 0) {
|
|
5733
|
-
peg$fail(peg$
|
|
5862
|
+
peg$fail(peg$e69);
|
|
5734
5863
|
}
|
|
5735
5864
|
}
|
|
5736
5865
|
if (s1 !== peg$FAILED) {
|
|
5737
5866
|
peg$savedPos = s0;
|
|
5738
|
-
s1 = peg$
|
|
5867
|
+
s1 = peg$f89();
|
|
5739
5868
|
}
|
|
5740
5869
|
s0 = s1;
|
|
5741
5870
|
if (s0 === peg$FAILED) {
|
|
5742
5871
|
s0 = peg$currPos;
|
|
5743
5872
|
if (input.charCodeAt(peg$currPos) === 114) {
|
|
5744
|
-
s1 = peg$
|
|
5873
|
+
s1 = peg$c64;
|
|
5745
5874
|
peg$currPos++;
|
|
5746
5875
|
} else {
|
|
5747
5876
|
s1 = peg$FAILED;
|
|
5748
5877
|
if (peg$silentFails === 0) {
|
|
5749
|
-
peg$fail(peg$
|
|
5878
|
+
peg$fail(peg$e70);
|
|
5750
5879
|
}
|
|
5751
5880
|
}
|
|
5752
5881
|
if (s1 !== peg$FAILED) {
|
|
5753
5882
|
peg$savedPos = s0;
|
|
5754
|
-
s1 = peg$
|
|
5883
|
+
s1 = peg$f90();
|
|
5755
5884
|
}
|
|
5756
5885
|
s0 = s1;
|
|
5757
5886
|
if (s0 === peg$FAILED) {
|
|
5758
5887
|
s0 = peg$currPos;
|
|
5759
5888
|
if (input.charCodeAt(peg$currPos) === 116) {
|
|
5760
|
-
s1 = peg$
|
|
5889
|
+
s1 = peg$c65;
|
|
5761
5890
|
peg$currPos++;
|
|
5762
5891
|
} else {
|
|
5763
5892
|
s1 = peg$FAILED;
|
|
5764
5893
|
if (peg$silentFails === 0) {
|
|
5765
|
-
peg$fail(peg$
|
|
5894
|
+
peg$fail(peg$e71);
|
|
5766
5895
|
}
|
|
5767
5896
|
}
|
|
5768
5897
|
if (s1 !== peg$FAILED) {
|
|
5769
5898
|
peg$savedPos = s0;
|
|
5770
|
-
s1 = peg$
|
|
5899
|
+
s1 = peg$f91();
|
|
5771
5900
|
}
|
|
5772
5901
|
s0 = s1;
|
|
5773
5902
|
if (s0 === peg$FAILED) {
|
|
5774
5903
|
s0 = peg$currPos;
|
|
5775
5904
|
if (input.charCodeAt(peg$currPos) === 92) {
|
|
5776
|
-
s1 = peg$
|
|
5905
|
+
s1 = peg$c62;
|
|
5777
5906
|
peg$currPos++;
|
|
5778
5907
|
} else {
|
|
5779
5908
|
s1 = peg$FAILED;
|
|
5780
5909
|
if (peg$silentFails === 0) {
|
|
5781
|
-
peg$fail(peg$
|
|
5910
|
+
peg$fail(peg$e68);
|
|
5782
5911
|
}
|
|
5783
5912
|
}
|
|
5784
5913
|
if (s1 !== peg$FAILED) {
|
|
5785
5914
|
peg$savedPos = s0;
|
|
5786
|
-
s1 = peg$
|
|
5915
|
+
s1 = peg$f92();
|
|
5787
5916
|
}
|
|
5788
5917
|
s0 = s1;
|
|
5789
5918
|
if (s0 === peg$FAILED) {
|
|
5790
5919
|
s0 = peg$currPos;
|
|
5791
5920
|
if (input.charCodeAt(peg$currPos) === 34) {
|
|
5792
|
-
s1 = peg$
|
|
5921
|
+
s1 = peg$c60;
|
|
5793
5922
|
peg$currPos++;
|
|
5794
5923
|
} else {
|
|
5795
5924
|
s1 = peg$FAILED;
|
|
5796
5925
|
if (peg$silentFails === 0) {
|
|
5797
|
-
peg$fail(peg$
|
|
5926
|
+
peg$fail(peg$e66);
|
|
5798
5927
|
}
|
|
5799
5928
|
}
|
|
5800
5929
|
if (s1 !== peg$FAILED) {
|
|
5801
5930
|
peg$savedPos = s0;
|
|
5802
|
-
s1 = peg$
|
|
5931
|
+
s1 = peg$f93();
|
|
5803
5932
|
}
|
|
5804
5933
|
s0 = s1;
|
|
5805
5934
|
if (s0 === peg$FAILED) {
|
|
5806
5935
|
s0 = peg$currPos;
|
|
5807
5936
|
if (input.charCodeAt(peg$currPos) === 39) {
|
|
5808
|
-
s1 = peg$
|
|
5937
|
+
s1 = peg$c61;
|
|
5809
5938
|
peg$currPos++;
|
|
5810
5939
|
} else {
|
|
5811
5940
|
s1 = peg$FAILED;
|
|
5812
5941
|
if (peg$silentFails === 0) {
|
|
5813
|
-
peg$fail(peg$
|
|
5942
|
+
peg$fail(peg$e67);
|
|
5814
5943
|
}
|
|
5815
5944
|
}
|
|
5816
5945
|
if (s1 !== peg$FAILED) {
|
|
5817
5946
|
peg$savedPos = s0;
|
|
5818
|
-
s1 = peg$
|
|
5947
|
+
s1 = peg$f94();
|
|
5819
5948
|
}
|
|
5820
5949
|
s0 = s1;
|
|
5821
5950
|
}
|
|
@@ -5830,12 +5959,12 @@ function peg$parse(input, options) {
|
|
|
5830
5959
|
peg$silentFails++;
|
|
5831
5960
|
s0 = peg$currPos;
|
|
5832
5961
|
if (input.charCodeAt(peg$currPos) === 45) {
|
|
5833
|
-
s1 = peg$
|
|
5962
|
+
s1 = peg$c66;
|
|
5834
5963
|
peg$currPos++;
|
|
5835
5964
|
} else {
|
|
5836
5965
|
s1 = peg$FAILED;
|
|
5837
5966
|
if (peg$silentFails === 0) {
|
|
5838
|
-
peg$fail(peg$
|
|
5967
|
+
peg$fail(peg$e73);
|
|
5839
5968
|
}
|
|
5840
5969
|
}
|
|
5841
5970
|
if (s1 === peg$FAILED) {
|
|
@@ -5870,12 +5999,12 @@ function peg$parse(input, options) {
|
|
|
5870
5999
|
if (s2 !== peg$FAILED) {
|
|
5871
6000
|
s3 = peg$currPos;
|
|
5872
6001
|
if (input.charCodeAt(peg$currPos) === 46) {
|
|
5873
|
-
s4 = peg$
|
|
6002
|
+
s4 = peg$c67;
|
|
5874
6003
|
peg$currPos++;
|
|
5875
6004
|
} else {
|
|
5876
6005
|
s4 = peg$FAILED;
|
|
5877
6006
|
if (peg$silentFails === 0) {
|
|
5878
|
-
peg$fail(peg$
|
|
6007
|
+
peg$fail(peg$e74);
|
|
5879
6008
|
}
|
|
5880
6009
|
}
|
|
5881
6010
|
if (s4 !== peg$FAILED) {
|
|
@@ -5920,7 +6049,7 @@ function peg$parse(input, options) {
|
|
|
5920
6049
|
s3 = null;
|
|
5921
6050
|
}
|
|
5922
6051
|
peg$savedPos = s0;
|
|
5923
|
-
s0 = peg$
|
|
6052
|
+
s0 = peg$f95(s1, s2, s3);
|
|
5924
6053
|
} else {
|
|
5925
6054
|
peg$currPos = s0;
|
|
5926
6055
|
s0 = peg$FAILED;
|
|
@@ -5929,7 +6058,7 @@ function peg$parse(input, options) {
|
|
|
5929
6058
|
if (s0 === peg$FAILED) {
|
|
5930
6059
|
s1 = peg$FAILED;
|
|
5931
6060
|
if (peg$silentFails === 0) {
|
|
5932
|
-
peg$fail(peg$
|
|
6061
|
+
peg$fail(peg$e72);
|
|
5933
6062
|
}
|
|
5934
6063
|
}
|
|
5935
6064
|
return s0;
|
|
@@ -5939,12 +6068,12 @@ function peg$parse(input, options) {
|
|
|
5939
6068
|
peg$silentFails++;
|
|
5940
6069
|
s0 = peg$currPos;
|
|
5941
6070
|
if (input.charCodeAt(peg$currPos) === 45) {
|
|
5942
|
-
s1 = peg$
|
|
6071
|
+
s1 = peg$c66;
|
|
5943
6072
|
peg$currPos++;
|
|
5944
6073
|
} else {
|
|
5945
6074
|
s1 = peg$FAILED;
|
|
5946
6075
|
if (peg$silentFails === 0) {
|
|
5947
|
-
peg$fail(peg$
|
|
6076
|
+
peg$fail(peg$e73);
|
|
5948
6077
|
}
|
|
5949
6078
|
}
|
|
5950
6079
|
if (s1 === peg$FAILED) {
|
|
@@ -5979,12 +6108,12 @@ function peg$parse(input, options) {
|
|
|
5979
6108
|
if (s2 !== peg$FAILED) {
|
|
5980
6109
|
s3 = peg$currPos;
|
|
5981
6110
|
if (input.charCodeAt(peg$currPos) === 46) {
|
|
5982
|
-
s4 = peg$
|
|
6111
|
+
s4 = peg$c67;
|
|
5983
6112
|
peg$currPos++;
|
|
5984
6113
|
} else {
|
|
5985
6114
|
s4 = peg$FAILED;
|
|
5986
6115
|
if (peg$silentFails === 0) {
|
|
5987
|
-
peg$fail(peg$
|
|
6116
|
+
peg$fail(peg$e74);
|
|
5988
6117
|
}
|
|
5989
6118
|
}
|
|
5990
6119
|
if (s4 !== peg$FAILED) {
|
|
@@ -6028,63 +6157,63 @@ function peg$parse(input, options) {
|
|
|
6028
6157
|
if (s3 === peg$FAILED) {
|
|
6029
6158
|
s3 = null;
|
|
6030
6159
|
}
|
|
6031
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
6032
|
-
s4 = peg$
|
|
6160
|
+
if (input.substr(peg$currPos, 2) === peg$c68) {
|
|
6161
|
+
s4 = peg$c68;
|
|
6033
6162
|
peg$currPos += 2;
|
|
6034
6163
|
} else {
|
|
6035
6164
|
s4 = peg$FAILED;
|
|
6036
6165
|
if (peg$silentFails === 0) {
|
|
6037
|
-
peg$fail(peg$
|
|
6166
|
+
peg$fail(peg$e76);
|
|
6038
6167
|
}
|
|
6039
6168
|
}
|
|
6040
6169
|
if (s4 === peg$FAILED) {
|
|
6041
6170
|
if (input.charCodeAt(peg$currPos) === 37) {
|
|
6042
|
-
s4 = peg$
|
|
6171
|
+
s4 = peg$c69;
|
|
6043
6172
|
peg$currPos++;
|
|
6044
6173
|
} else {
|
|
6045
6174
|
s4 = peg$FAILED;
|
|
6046
6175
|
if (peg$silentFails === 0) {
|
|
6047
|
-
peg$fail(peg$
|
|
6176
|
+
peg$fail(peg$e77);
|
|
6048
6177
|
}
|
|
6049
6178
|
}
|
|
6050
6179
|
if (s4 === peg$FAILED) {
|
|
6051
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
6052
|
-
s4 = peg$
|
|
6180
|
+
if (input.substr(peg$currPos, 2) === peg$c70) {
|
|
6181
|
+
s4 = peg$c70;
|
|
6053
6182
|
peg$currPos += 2;
|
|
6054
6183
|
} else {
|
|
6055
6184
|
s4 = peg$FAILED;
|
|
6056
6185
|
if (peg$silentFails === 0) {
|
|
6057
|
-
peg$fail(peg$
|
|
6186
|
+
peg$fail(peg$e78);
|
|
6058
6187
|
}
|
|
6059
6188
|
}
|
|
6060
6189
|
if (s4 === peg$FAILED) {
|
|
6061
|
-
if (input.substr(peg$currPos, 3) === peg$
|
|
6062
|
-
s4 = peg$
|
|
6190
|
+
if (input.substr(peg$currPos, 3) === peg$c71) {
|
|
6191
|
+
s4 = peg$c71;
|
|
6063
6192
|
peg$currPos += 3;
|
|
6064
6193
|
} else {
|
|
6065
6194
|
s4 = peg$FAILED;
|
|
6066
6195
|
if (peg$silentFails === 0) {
|
|
6067
|
-
peg$fail(peg$
|
|
6196
|
+
peg$fail(peg$e79);
|
|
6068
6197
|
}
|
|
6069
6198
|
}
|
|
6070
6199
|
if (s4 === peg$FAILED) {
|
|
6071
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
6072
|
-
s4 = peg$
|
|
6200
|
+
if (input.substr(peg$currPos, 2) === peg$c72) {
|
|
6201
|
+
s4 = peg$c72;
|
|
6073
6202
|
peg$currPos += 2;
|
|
6074
6203
|
} else {
|
|
6075
6204
|
s4 = peg$FAILED;
|
|
6076
6205
|
if (peg$silentFails === 0) {
|
|
6077
|
-
peg$fail(peg$
|
|
6206
|
+
peg$fail(peg$e80);
|
|
6078
6207
|
}
|
|
6079
6208
|
}
|
|
6080
6209
|
if (s4 === peg$FAILED) {
|
|
6081
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
6082
|
-
s4 = peg$
|
|
6210
|
+
if (input.substr(peg$currPos, 2) === peg$c73) {
|
|
6211
|
+
s4 = peg$c73;
|
|
6083
6212
|
peg$currPos += 2;
|
|
6084
6213
|
} else {
|
|
6085
6214
|
s4 = peg$FAILED;
|
|
6086
6215
|
if (peg$silentFails === 0) {
|
|
6087
|
-
peg$fail(peg$
|
|
6216
|
+
peg$fail(peg$e81);
|
|
6088
6217
|
}
|
|
6089
6218
|
}
|
|
6090
6219
|
}
|
|
@@ -6094,7 +6223,7 @@ function peg$parse(input, options) {
|
|
|
6094
6223
|
}
|
|
6095
6224
|
if (s4 !== peg$FAILED) {
|
|
6096
6225
|
peg$savedPos = s0;
|
|
6097
|
-
s0 = peg$
|
|
6226
|
+
s0 = peg$f96(s1, s2, s3, s4);
|
|
6098
6227
|
} else {
|
|
6099
6228
|
peg$currPos = s0;
|
|
6100
6229
|
s0 = peg$FAILED;
|
|
@@ -6107,7 +6236,7 @@ function peg$parse(input, options) {
|
|
|
6107
6236
|
if (s0 === peg$FAILED) {
|
|
6108
6237
|
s1 = peg$FAILED;
|
|
6109
6238
|
if (peg$silentFails === 0) {
|
|
6110
|
-
peg$fail(peg$
|
|
6239
|
+
peg$fail(peg$e75);
|
|
6111
6240
|
}
|
|
6112
6241
|
}
|
|
6113
6242
|
return s0;
|
|
@@ -6116,34 +6245,34 @@ function peg$parse(input, options) {
|
|
|
6116
6245
|
let s0, s1;
|
|
6117
6246
|
peg$silentFails++;
|
|
6118
6247
|
s0 = peg$currPos;
|
|
6119
|
-
if (input.substr(peg$currPos, 4) === peg$
|
|
6120
|
-
s1 = peg$
|
|
6248
|
+
if (input.substr(peg$currPos, 4) === peg$c74) {
|
|
6249
|
+
s1 = peg$c74;
|
|
6121
6250
|
peg$currPos += 4;
|
|
6122
6251
|
} else {
|
|
6123
6252
|
s1 = peg$FAILED;
|
|
6124
6253
|
if (peg$silentFails === 0) {
|
|
6125
|
-
peg$fail(peg$
|
|
6254
|
+
peg$fail(peg$e83);
|
|
6126
6255
|
}
|
|
6127
6256
|
}
|
|
6128
6257
|
if (s1 !== peg$FAILED) {
|
|
6129
6258
|
peg$savedPos = s0;
|
|
6130
|
-
s1 = peg$
|
|
6259
|
+
s1 = peg$f97();
|
|
6131
6260
|
}
|
|
6132
6261
|
s0 = s1;
|
|
6133
6262
|
if (s0 === peg$FAILED) {
|
|
6134
6263
|
s0 = peg$currPos;
|
|
6135
|
-
if (input.substr(peg$currPos, 5) === peg$
|
|
6136
|
-
s1 = peg$
|
|
6264
|
+
if (input.substr(peg$currPos, 5) === peg$c75) {
|
|
6265
|
+
s1 = peg$c75;
|
|
6137
6266
|
peg$currPos += 5;
|
|
6138
6267
|
} else {
|
|
6139
6268
|
s1 = peg$FAILED;
|
|
6140
6269
|
if (peg$silentFails === 0) {
|
|
6141
|
-
peg$fail(peg$
|
|
6270
|
+
peg$fail(peg$e84);
|
|
6142
6271
|
}
|
|
6143
6272
|
}
|
|
6144
6273
|
if (s1 !== peg$FAILED) {
|
|
6145
6274
|
peg$savedPos = s0;
|
|
6146
|
-
s1 = peg$
|
|
6275
|
+
s1 = peg$f98();
|
|
6147
6276
|
}
|
|
6148
6277
|
s0 = s1;
|
|
6149
6278
|
}
|
|
@@ -6151,7 +6280,7 @@ function peg$parse(input, options) {
|
|
|
6151
6280
|
if (s0 === peg$FAILED) {
|
|
6152
6281
|
s1 = peg$FAILED;
|
|
6153
6282
|
if (peg$silentFails === 0) {
|
|
6154
|
-
peg$fail(peg$
|
|
6283
|
+
peg$fail(peg$e82);
|
|
6155
6284
|
}
|
|
6156
6285
|
}
|
|
6157
6286
|
return s0;
|
|
@@ -6166,7 +6295,7 @@ function peg$parse(input, options) {
|
|
|
6166
6295
|
} else {
|
|
6167
6296
|
s1 = peg$FAILED;
|
|
6168
6297
|
if (peg$silentFails === 0) {
|
|
6169
|
-
peg$fail(peg$
|
|
6298
|
+
peg$fail(peg$e86);
|
|
6170
6299
|
}
|
|
6171
6300
|
}
|
|
6172
6301
|
if (s1 !== peg$FAILED) {
|
|
@@ -6177,7 +6306,7 @@ function peg$parse(input, options) {
|
|
|
6177
6306
|
} else {
|
|
6178
6307
|
s3 = peg$FAILED;
|
|
6179
6308
|
if (peg$silentFails === 0) {
|
|
6180
|
-
peg$fail(peg$
|
|
6309
|
+
peg$fail(peg$e64);
|
|
6181
6310
|
}
|
|
6182
6311
|
}
|
|
6183
6312
|
while (s3 !== peg$FAILED) {
|
|
@@ -6188,12 +6317,12 @@ function peg$parse(input, options) {
|
|
|
6188
6317
|
} else {
|
|
6189
6318
|
s3 = peg$FAILED;
|
|
6190
6319
|
if (peg$silentFails === 0) {
|
|
6191
|
-
peg$fail(peg$
|
|
6320
|
+
peg$fail(peg$e64);
|
|
6192
6321
|
}
|
|
6193
6322
|
}
|
|
6194
6323
|
}
|
|
6195
6324
|
peg$savedPos = s0;
|
|
6196
|
-
s0 = peg$
|
|
6325
|
+
s0 = peg$f99(s1, s2);
|
|
6197
6326
|
} else {
|
|
6198
6327
|
peg$currPos = s0;
|
|
6199
6328
|
s0 = peg$FAILED;
|
|
@@ -6202,7 +6331,7 @@ function peg$parse(input, options) {
|
|
|
6202
6331
|
if (s0 === peg$FAILED) {
|
|
6203
6332
|
s1 = peg$FAILED;
|
|
6204
6333
|
if (peg$silentFails === 0) {
|
|
6205
|
-
peg$fail(peg$
|
|
6334
|
+
peg$fail(peg$e85);
|
|
6206
6335
|
}
|
|
6207
6336
|
}
|
|
6208
6337
|
return s0;
|
|
@@ -6237,7 +6366,7 @@ function peg$parse(input, options) {
|
|
|
6237
6366
|
}
|
|
6238
6367
|
if (s5 !== peg$FAILED) {
|
|
6239
6368
|
peg$savedPos = s0;
|
|
6240
|
-
s0 = peg$
|
|
6369
|
+
s0 = peg$f100(s3);
|
|
6241
6370
|
} else {
|
|
6242
6371
|
peg$currPos = s0;
|
|
6243
6372
|
s0 = peg$FAILED;
|
|
@@ -6325,7 +6454,7 @@ function peg$parse(input, options) {
|
|
|
6325
6454
|
s3 = null;
|
|
6326
6455
|
}
|
|
6327
6456
|
peg$savedPos = s0;
|
|
6328
|
-
s0 = peg$
|
|
6457
|
+
s0 = peg$f101(s1, s2);
|
|
6329
6458
|
} else {
|
|
6330
6459
|
peg$currPos = s0;
|
|
6331
6460
|
s0 = peg$FAILED;
|
|
@@ -6379,7 +6508,7 @@ function peg$parse(input, options) {
|
|
|
6379
6508
|
}
|
|
6380
6509
|
if (s5 !== peg$FAILED) {
|
|
6381
6510
|
peg$savedPos = s0;
|
|
6382
|
-
s0 = peg$
|
|
6511
|
+
s0 = peg$f102(s3);
|
|
6383
6512
|
} else {
|
|
6384
6513
|
peg$currPos = s0;
|
|
6385
6514
|
s0 = peg$FAILED;
|
|
@@ -6446,7 +6575,7 @@ function peg$parse(input, options) {
|
|
|
6446
6575
|
}
|
|
6447
6576
|
}
|
|
6448
6577
|
peg$savedPos = s0;
|
|
6449
|
-
s0 = peg$
|
|
6578
|
+
s0 = peg$f103(s1, s2);
|
|
6450
6579
|
} else {
|
|
6451
6580
|
peg$currPos = s0;
|
|
6452
6581
|
s0 = peg$FAILED;
|
|
@@ -6460,12 +6589,12 @@ function peg$parse(input, options) {
|
|
|
6460
6589
|
if (s1 !== peg$FAILED) {
|
|
6461
6590
|
s2 = peg$parse_();
|
|
6462
6591
|
if (input.charCodeAt(peg$currPos) === 61) {
|
|
6463
|
-
s3 = peg$
|
|
6592
|
+
s3 = peg$c57;
|
|
6464
6593
|
peg$currPos++;
|
|
6465
6594
|
} else {
|
|
6466
6595
|
s3 = peg$FAILED;
|
|
6467
6596
|
if (peg$silentFails === 0) {
|
|
6468
|
-
peg$fail(peg$
|
|
6597
|
+
peg$fail(peg$e59);
|
|
6469
6598
|
}
|
|
6470
6599
|
}
|
|
6471
6600
|
if (s3 !== peg$FAILED) {
|
|
@@ -6473,7 +6602,7 @@ function peg$parse(input, options) {
|
|
|
6473
6602
|
s5 = peg$parseAttributeValue();
|
|
6474
6603
|
if (s5 !== peg$FAILED) {
|
|
6475
6604
|
peg$savedPos = s0;
|
|
6476
|
-
s0 = peg$
|
|
6605
|
+
s0 = peg$f104(s1, s5);
|
|
6477
6606
|
} else {
|
|
6478
6607
|
peg$currPos = s0;
|
|
6479
6608
|
s0 = peg$FAILED;
|
|
@@ -6491,7 +6620,7 @@ function peg$parse(input, options) {
|
|
|
6491
6620
|
s1 = peg$parseIdentifier();
|
|
6492
6621
|
if (s1 !== peg$FAILED) {
|
|
6493
6622
|
peg$savedPos = s0;
|
|
6494
|
-
s1 = peg$
|
|
6623
|
+
s1 = peg$f105(s1);
|
|
6495
6624
|
}
|
|
6496
6625
|
s0 = s1;
|
|
6497
6626
|
}
|
|
@@ -6524,7 +6653,7 @@ function peg$parse(input, options) {
|
|
|
6524
6653
|
} else {
|
|
6525
6654
|
s1 = peg$FAILED;
|
|
6526
6655
|
if (peg$silentFails === 0) {
|
|
6527
|
-
peg$fail(peg$
|
|
6656
|
+
peg$fail(peg$e87);
|
|
6528
6657
|
}
|
|
6529
6658
|
}
|
|
6530
6659
|
if (s1 !== peg$FAILED) {
|
|
@@ -6536,7 +6665,7 @@ function peg$parse(input, options) {
|
|
|
6536
6665
|
} else {
|
|
6537
6666
|
s1 = peg$FAILED;
|
|
6538
6667
|
if (peg$silentFails === 0) {
|
|
6539
|
-
peg$fail(peg$
|
|
6668
|
+
peg$fail(peg$e87);
|
|
6540
6669
|
}
|
|
6541
6670
|
}
|
|
6542
6671
|
}
|
|
@@ -6556,7 +6685,7 @@ function peg$parse(input, options) {
|
|
|
6556
6685
|
if (s0 === peg$FAILED) {
|
|
6557
6686
|
s1 = peg$FAILED;
|
|
6558
6687
|
if (peg$silentFails === 0) {
|
|
6559
|
-
peg$fail(peg$
|
|
6688
|
+
peg$fail(peg$e88);
|
|
6560
6689
|
}
|
|
6561
6690
|
}
|
|
6562
6691
|
return s0;
|
|
@@ -6564,13 +6693,13 @@ function peg$parse(input, options) {
|
|
|
6564
6693
|
function peg$parseLineComment() {
|
|
6565
6694
|
let s0, s1, s2, s3, s4;
|
|
6566
6695
|
s0 = peg$currPos;
|
|
6567
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
6568
|
-
s1 = peg$
|
|
6696
|
+
if (input.substr(peg$currPos, 2) === peg$c58) {
|
|
6697
|
+
s1 = peg$c58;
|
|
6569
6698
|
peg$currPos += 2;
|
|
6570
6699
|
} else {
|
|
6571
6700
|
s1 = peg$FAILED;
|
|
6572
6701
|
if (peg$silentFails === 0) {
|
|
6573
|
-
peg$fail(peg$
|
|
6702
|
+
peg$fail(peg$e61);
|
|
6574
6703
|
}
|
|
6575
6704
|
}
|
|
6576
6705
|
if (s1 !== peg$FAILED) {
|
|
@@ -6581,7 +6710,7 @@ function peg$parse(input, options) {
|
|
|
6581
6710
|
} else {
|
|
6582
6711
|
s3 = peg$FAILED;
|
|
6583
6712
|
if (peg$silentFails === 0) {
|
|
6584
|
-
peg$fail(peg$
|
|
6713
|
+
peg$fail(peg$e89);
|
|
6585
6714
|
}
|
|
6586
6715
|
}
|
|
6587
6716
|
while (s3 !== peg$FAILED) {
|
|
@@ -6592,17 +6721,17 @@ function peg$parse(input, options) {
|
|
|
6592
6721
|
} else {
|
|
6593
6722
|
s3 = peg$FAILED;
|
|
6594
6723
|
if (peg$silentFails === 0) {
|
|
6595
|
-
peg$fail(peg$
|
|
6724
|
+
peg$fail(peg$e89);
|
|
6596
6725
|
}
|
|
6597
6726
|
}
|
|
6598
6727
|
}
|
|
6599
6728
|
if (input.charCodeAt(peg$currPos) === 10) {
|
|
6600
|
-
s3 = peg$
|
|
6729
|
+
s3 = peg$c76;
|
|
6601
6730
|
peg$currPos++;
|
|
6602
6731
|
} else {
|
|
6603
6732
|
s3 = peg$FAILED;
|
|
6604
6733
|
if (peg$silentFails === 0) {
|
|
6605
|
-
peg$fail(peg$
|
|
6734
|
+
peg$fail(peg$e90);
|
|
6606
6735
|
}
|
|
6607
6736
|
}
|
|
6608
6737
|
if (s3 === peg$FAILED) {
|
|
@@ -6614,7 +6743,7 @@ function peg$parse(input, options) {
|
|
|
6614
6743
|
} else {
|
|
6615
6744
|
s4 = peg$FAILED;
|
|
6616
6745
|
if (peg$silentFails === 0) {
|
|
6617
|
-
peg$fail(peg$
|
|
6746
|
+
peg$fail(peg$e63);
|
|
6618
6747
|
}
|
|
6619
6748
|
}
|
|
6620
6749
|
peg$silentFails--;
|
|
@@ -6641,13 +6770,13 @@ function peg$parse(input, options) {
|
|
|
6641
6770
|
function peg$parseBlockComment() {
|
|
6642
6771
|
let s0, s1, s2, s3, s4, s5;
|
|
6643
6772
|
s0 = peg$currPos;
|
|
6644
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
6645
|
-
s1 = peg$
|
|
6773
|
+
if (input.substr(peg$currPos, 2) === peg$c59) {
|
|
6774
|
+
s1 = peg$c59;
|
|
6646
6775
|
peg$currPos += 2;
|
|
6647
6776
|
} else {
|
|
6648
6777
|
s1 = peg$FAILED;
|
|
6649
6778
|
if (peg$silentFails === 0) {
|
|
6650
|
-
peg$fail(peg$
|
|
6779
|
+
peg$fail(peg$e62);
|
|
6651
6780
|
}
|
|
6652
6781
|
}
|
|
6653
6782
|
if (s1 !== peg$FAILED) {
|
|
@@ -6655,13 +6784,13 @@ function peg$parse(input, options) {
|
|
|
6655
6784
|
s3 = peg$currPos;
|
|
6656
6785
|
s4 = peg$currPos;
|
|
6657
6786
|
peg$silentFails++;
|
|
6658
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
6659
|
-
s5 = peg$
|
|
6787
|
+
if (input.substr(peg$currPos, 2) === peg$c77) {
|
|
6788
|
+
s5 = peg$c77;
|
|
6660
6789
|
peg$currPos += 2;
|
|
6661
6790
|
} else {
|
|
6662
6791
|
s5 = peg$FAILED;
|
|
6663
6792
|
if (peg$silentFails === 0) {
|
|
6664
|
-
peg$fail(peg$
|
|
6793
|
+
peg$fail(peg$e91);
|
|
6665
6794
|
}
|
|
6666
6795
|
}
|
|
6667
6796
|
peg$silentFails--;
|
|
@@ -6678,7 +6807,7 @@ function peg$parse(input, options) {
|
|
|
6678
6807
|
} else {
|
|
6679
6808
|
s5 = peg$FAILED;
|
|
6680
6809
|
if (peg$silentFails === 0) {
|
|
6681
|
-
peg$fail(peg$
|
|
6810
|
+
peg$fail(peg$e63);
|
|
6682
6811
|
}
|
|
6683
6812
|
}
|
|
6684
6813
|
if (s5 !== peg$FAILED) {
|
|
@@ -6697,13 +6826,13 @@ function peg$parse(input, options) {
|
|
|
6697
6826
|
s3 = peg$currPos;
|
|
6698
6827
|
s4 = peg$currPos;
|
|
6699
6828
|
peg$silentFails++;
|
|
6700
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
6701
|
-
s5 = peg$
|
|
6829
|
+
if (input.substr(peg$currPos, 2) === peg$c77) {
|
|
6830
|
+
s5 = peg$c77;
|
|
6702
6831
|
peg$currPos += 2;
|
|
6703
6832
|
} else {
|
|
6704
6833
|
s5 = peg$FAILED;
|
|
6705
6834
|
if (peg$silentFails === 0) {
|
|
6706
|
-
peg$fail(peg$
|
|
6835
|
+
peg$fail(peg$e91);
|
|
6707
6836
|
}
|
|
6708
6837
|
}
|
|
6709
6838
|
peg$silentFails--;
|
|
@@ -6720,7 +6849,7 @@ function peg$parse(input, options) {
|
|
|
6720
6849
|
} else {
|
|
6721
6850
|
s5 = peg$FAILED;
|
|
6722
6851
|
if (peg$silentFails === 0) {
|
|
6723
|
-
peg$fail(peg$
|
|
6852
|
+
peg$fail(peg$e63);
|
|
6724
6853
|
}
|
|
6725
6854
|
}
|
|
6726
6855
|
if (s5 !== peg$FAILED) {
|
|
@@ -6735,13 +6864,13 @@ function peg$parse(input, options) {
|
|
|
6735
6864
|
s3 = peg$FAILED;
|
|
6736
6865
|
}
|
|
6737
6866
|
}
|
|
6738
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
6739
|
-
s3 = peg$
|
|
6867
|
+
if (input.substr(peg$currPos, 2) === peg$c77) {
|
|
6868
|
+
s3 = peg$c77;
|
|
6740
6869
|
peg$currPos += 2;
|
|
6741
6870
|
} else {
|
|
6742
6871
|
s3 = peg$FAILED;
|
|
6743
6872
|
if (peg$silentFails === 0) {
|
|
6744
|
-
peg$fail(peg$
|
|
6873
|
+
peg$fail(peg$e91);
|
|
6745
6874
|
}
|
|
6746
6875
|
}
|
|
6747
6876
|
if (s3 !== peg$FAILED) {
|
|
@@ -6767,7 +6896,7 @@ function peg$parse(input, options) {
|
|
|
6767
6896
|
function attrsToObject(attrs) {
|
|
6768
6897
|
if (!attrs || attrs.length === 0) return {};
|
|
6769
6898
|
const result = {};
|
|
6770
|
-
for (const attr of attrs) {
|
|
6899
|
+
for (const attr of attrs.flat()) {
|
|
6771
6900
|
result[attr.name] = attr.value;
|
|
6772
6901
|
}
|
|
6773
6902
|
return result;
|
|
@@ -56259,7 +56388,6 @@ function renderDropdown(node, ctx) {
|
|
|
56259
56388
|
"data-action": dropdownItem.action
|
|
56260
56389
|
};
|
|
56261
56390
|
const interactiveAttrStr = ctx.buildAttrsString(interactiveAttrs);
|
|
56262
|
-
const hrefAttr = dropdownItem.href ? ` href="${ctx.escapeHtml(dropdownItem.href)}"` : "";
|
|
56263
56391
|
const disabledAttr = dropdownItem.disabled ? ' disabled="disabled"' : "";
|
|
56264
56392
|
if (dropdownItem.href || dropdownItem.navigate) {
|
|
56265
56393
|
const href = dropdownItem.href || dropdownItem.navigate || "#";
|
|
@@ -56777,7 +56905,10 @@ var HtmlRenderer = class extends BaseRenderer {
|
|
|
56777
56905
|
const uiContent = this.renderChildren(uiChildren);
|
|
56778
56906
|
const title = node.title ? `<title>${this.escapeHtml(node.title)}</title>
|
|
56779
56907
|
` : "";
|
|
56780
|
-
const
|
|
56908
|
+
const { x: _canvasX, y: _canvasY, ...nodeWithoutCanvasPos } = node;
|
|
56909
|
+
void _canvasX;
|
|
56910
|
+
void _canvasY;
|
|
56911
|
+
const commonStyles = this.buildCommonStyles(nodeWithoutCanvasPos);
|
|
56781
56912
|
let viewportStyle = `position: relative; width: ${viewport.width}px; height: ${viewport.height}px; overflow: hidden`;
|
|
56782
56913
|
if (this.context.options.background) {
|
|
56783
56914
|
viewportStyle += `; background: ${this.context.options.background}`;
|
|
@@ -57196,8 +57327,99 @@ function createHtmlRenderer(options) {
|
|
|
57196
57327
|
return new HtmlRenderer(options);
|
|
57197
57328
|
}
|
|
57198
57329
|
|
|
57330
|
+
// src/renderer/page-renderer.ts
|
|
57331
|
+
function renderPage(page, options = {}) {
|
|
57332
|
+
const renderer = new HtmlRenderer(options);
|
|
57333
|
+
const { html, css } = renderer.render({
|
|
57334
|
+
type: "Document",
|
|
57335
|
+
children: [page]
|
|
57336
|
+
});
|
|
57337
|
+
const { width, height } = resolvePageDimensions(page);
|
|
57338
|
+
return { html, css, width, height };
|
|
57339
|
+
}
|
|
57340
|
+
function resolvePageDimensions(page) {
|
|
57341
|
+
const pageAny = page;
|
|
57342
|
+
const explicitW = page.w ?? pageAny.width;
|
|
57343
|
+
const explicitH = page.h ?? pageAny.height;
|
|
57344
|
+
if (typeof explicitW === "number" && typeof explicitH === "number") {
|
|
57345
|
+
return { width: explicitW, height: explicitH };
|
|
57346
|
+
}
|
|
57347
|
+
const viewport = resolveViewport(page.viewport, page.device);
|
|
57348
|
+
return { width: viewport.width, height: viewport.height };
|
|
57349
|
+
}
|
|
57350
|
+
|
|
57351
|
+
// src/renderer/canvas-renderer.ts
|
|
57352
|
+
var DEFAULT_GAP = 64;
|
|
57353
|
+
var DEFAULT_PREFIX = "wf";
|
|
57354
|
+
function layoutCanvas(pages, gap = DEFAULT_GAP) {
|
|
57355
|
+
const placed = [];
|
|
57356
|
+
let cursorX = 0;
|
|
57357
|
+
let maxRight = 0;
|
|
57358
|
+
let maxBottom = 0;
|
|
57359
|
+
for (const page of pages) {
|
|
57360
|
+
const { width, height } = resolvePageDimensions(page);
|
|
57361
|
+
const explicitX = typeof page.x === "number" ? page.x : void 0;
|
|
57362
|
+
const explicitY = typeof page.y === "number" ? page.y : void 0;
|
|
57363
|
+
const x = explicitX ?? cursorX;
|
|
57364
|
+
const y = explicitY ?? 0;
|
|
57365
|
+
placed.push({ page, x, y, w: width, h: height });
|
|
57366
|
+
if (explicitX === void 0) {
|
|
57367
|
+
cursorX = x + width + gap;
|
|
57368
|
+
}
|
|
57369
|
+
maxRight = Math.max(maxRight, x + width);
|
|
57370
|
+
maxBottom = Math.max(maxBottom, y + height);
|
|
57371
|
+
}
|
|
57372
|
+
return { placed, width: maxRight, height: maxBottom };
|
|
57373
|
+
}
|
|
57374
|
+
function renderCanvas(doc, options = {}) {
|
|
57375
|
+
const gap = options.gap ?? DEFAULT_GAP;
|
|
57376
|
+
const prefix = options.classPrefix ?? DEFAULT_PREFIX;
|
|
57377
|
+
const includeStyles = options.includeStyles !== false;
|
|
57378
|
+
const theme = options.theme === "dark" ? darkTheme : defaultTheme;
|
|
57379
|
+
const css = includeStyles ? generateStyles(theme, prefix) : "";
|
|
57380
|
+
if (doc.children.length === 0) {
|
|
57381
|
+
return {
|
|
57382
|
+
html: `<div class="${prefix}-canvas" data-empty="true"></div>`,
|
|
57383
|
+
css,
|
|
57384
|
+
width: 0,
|
|
57385
|
+
height: 0
|
|
57386
|
+
};
|
|
57387
|
+
}
|
|
57388
|
+
const { placed, width, height } = layoutCanvas(doc.children, gap);
|
|
57389
|
+
const pageRenderer = new HtmlRenderer({ ...options, includeStyles: false });
|
|
57390
|
+
const boards = placed.map((p) => {
|
|
57391
|
+
const { html: pageHtml } = pageRenderer.render({
|
|
57392
|
+
type: "Document",
|
|
57393
|
+
children: [p.page]
|
|
57394
|
+
});
|
|
57395
|
+
return wrapBoard(pageHtml, p, prefix);
|
|
57396
|
+
}).join("\n");
|
|
57397
|
+
const canvasStyle = `position: relative; width: ${width}px; height: ${height}px;`;
|
|
57398
|
+
const html = `<div class="${prefix}-canvas" style="${canvasStyle}" data-page-count="${placed.length}">
|
|
57399
|
+
${boards}
|
|
57400
|
+
</div>`;
|
|
57401
|
+
return { html, css, width, height };
|
|
57402
|
+
}
|
|
57403
|
+
function wrapBoard(pageHtml, placed, prefix) {
|
|
57404
|
+
const { x, y, w, h, page } = placed;
|
|
57405
|
+
const positionStyle = `position: absolute; left: ${x}px; top: ${y}px; width: ${w}px; height: ${h}px;`;
|
|
57406
|
+
const titleAttr = page.title ? ` data-page-title="${escapeAttr(page.title)}"` : "";
|
|
57407
|
+
const dataAttrs = ` data-page-x="${x}" data-page-y="${y}" data-page-w="${w}" data-page-h="${h}"${titleAttr}`;
|
|
57408
|
+
return `<div class="${prefix}-canvas-board" style="${positionStyle}"${dataAttrs}>
|
|
57409
|
+
${pageHtml}
|
|
57410
|
+
</div>`;
|
|
57411
|
+
}
|
|
57412
|
+
function escapeAttr(s) {
|
|
57413
|
+
return s.replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<");
|
|
57414
|
+
}
|
|
57415
|
+
|
|
57199
57416
|
// src/renderer/index.ts
|
|
57200
57417
|
function render(document, options = {}) {
|
|
57418
|
+
const isMultiPage = document.children.length > 1;
|
|
57419
|
+
if (isMultiPage) {
|
|
57420
|
+
const result = renderCanvas(document, options);
|
|
57421
|
+
return { html: result.html, css: result.css };
|
|
57422
|
+
}
|
|
57201
57423
|
const renderer = createHtmlRenderer(options);
|
|
57202
57424
|
return renderer.render(document);
|
|
57203
57425
|
}
|
|
@@ -57233,24 +57455,33 @@ ${html}
|
|
|
57233
57455
|
</html>`;
|
|
57234
57456
|
}
|
|
57235
57457
|
function renderToSvg(document, options = {}) {
|
|
57236
|
-
const
|
|
57458
|
+
const isMultiPage = document.children.length > 1;
|
|
57237
57459
|
let width = options.width ?? 800;
|
|
57238
57460
|
let height = options.height ?? 600;
|
|
57239
|
-
|
|
57240
|
-
|
|
57241
|
-
|
|
57242
|
-
const
|
|
57243
|
-
|
|
57244
|
-
|
|
57245
|
-
|
|
57246
|
-
|
|
57247
|
-
|
|
57248
|
-
|
|
57249
|
-
|
|
57461
|
+
let html;
|
|
57462
|
+
let css;
|
|
57463
|
+
if (isMultiPage) {
|
|
57464
|
+
const canvas = renderCanvas(document, {
|
|
57465
|
+
theme: options.theme ?? "light"
|
|
57466
|
+
});
|
|
57467
|
+
if (options.width === void 0 && options.height === void 0) {
|
|
57468
|
+
width = canvas.width;
|
|
57469
|
+
height = canvas.height;
|
|
57470
|
+
}
|
|
57471
|
+
html = canvas.html;
|
|
57472
|
+
css = canvas.css;
|
|
57473
|
+
} else {
|
|
57474
|
+
const firstPage = document.children[0];
|
|
57475
|
+
if (firstPage && options.width === void 0 && options.height === void 0) {
|
|
57476
|
+
const dims = resolvePageDimensions(firstPage);
|
|
57477
|
+
width = dims.width;
|
|
57478
|
+
height = dims.height;
|
|
57250
57479
|
}
|
|
57480
|
+
const result = render(document, { theme: options.theme ?? "light" });
|
|
57481
|
+
html = result.html;
|
|
57482
|
+
css = result.css;
|
|
57251
57483
|
}
|
|
57252
57484
|
const background = options.background ?? "#ffffff";
|
|
57253
|
-
const { html, css } = render(document, { theme: options.theme ?? "light" });
|
|
57254
57485
|
const svg = `<?xml version="1.0" encoding="UTF-8"?>
|
|
57255
57486
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
57256
57487
|
viewBox="0 0 ${width} ${height}" width="${width}" height="${height}">
|
|
@@ -59175,15 +59406,19 @@ function analyze(doc, options = {}) {
|
|
|
59175
59406
|
isValidAst,
|
|
59176
59407
|
isValidAttribute,
|
|
59177
59408
|
isValidDevicePreset,
|
|
59409
|
+
layoutCanvas,
|
|
59178
59410
|
lucideIcons,
|
|
59179
59411
|
mapNodes,
|
|
59180
59412
|
parse,
|
|
59181
59413
|
parseViewportString,
|
|
59182
59414
|
render,
|
|
59415
|
+
renderCanvas,
|
|
59183
59416
|
renderIconSvg,
|
|
59417
|
+
renderPage,
|
|
59184
59418
|
renderToHtml,
|
|
59185
59419
|
renderToSvg,
|
|
59186
59420
|
resetFigmaIdCounter,
|
|
59421
|
+
resolvePageDimensions,
|
|
59187
59422
|
resolveViewport,
|
|
59188
59423
|
tryParse,
|
|
59189
59424
|
validate,
|