@rohal12/spindle 0.59.10 → 0.59.11
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/pkg/format.js +1 -1
- package/dist/pkg/headless.js +522 -342
- package/dist/pkg/macro-registry.json +1 -0
- package/dist/pkg/story-variables.js +480 -319
- package/package.json +1 -1
- package/src/components/macros/If.tsx +2 -7
- package/src/components/macros/SaveManager.tsx +5 -2
- package/src/components/macros/Switch.tsx +4 -2
- package/src/components/macros/WidgetInvocation.tsx +10 -13
- package/src/components/macros/branches.ts +20 -0
- package/src/hooks/use-modal-focus.ts +6 -1
- package/src/js-lexer.ts +18 -1
- package/src/markup/render.tsx +29 -10
- package/src/markup/spindle.peggy +11 -0
- package/src/styles.css +5 -0
- package/src/triggers.ts +4 -2
|
@@ -333,20 +333,23 @@ function peg$parse(input, options) {
|
|
|
333
333
|
SelectorsPrefix: peg$parseSelectorsPrefix
|
|
334
334
|
};
|
|
335
335
|
let peg$startRuleFunction = peg$parseMarkup;
|
|
336
|
-
const peg$c0 = "
|
|
337
|
-
const peg$c1 = "
|
|
338
|
-
const peg$c2 = "
|
|
339
|
-
const peg$c3 = "
|
|
340
|
-
const peg$c4 = "
|
|
341
|
-
const peg$c5 = "
|
|
342
|
-
const peg$c6 = "
|
|
343
|
-
const peg$c7 = "
|
|
344
|
-
const peg$c8 = "
|
|
345
|
-
const peg$c9 = "
|
|
346
|
-
const peg$c10 = "
|
|
347
|
-
const peg$c11 = "
|
|
348
|
-
const peg$c12 = "
|
|
349
|
-
const peg$c13 = "
|
|
336
|
+
const peg$c0 = "<!--";
|
|
337
|
+
const peg$c1 = ">";
|
|
338
|
+
const peg$c2 = "->";
|
|
339
|
+
const peg$c3 = "-->";
|
|
340
|
+
const peg$c4 = "\\";
|
|
341
|
+
const peg$c5 = "{";
|
|
342
|
+
const peg$c6 = "<";
|
|
343
|
+
const peg$c7 = "[";
|
|
344
|
+
const peg$c8 = "[[";
|
|
345
|
+
const peg$c9 = "]]";
|
|
346
|
+
const peg$c10 = " ";
|
|
347
|
+
const peg$c11 = "}";
|
|
348
|
+
const peg$c12 = "/";
|
|
349
|
+
const peg$c13 = "</";
|
|
350
|
+
const peg$c14 = "=";
|
|
351
|
+
const peg$c15 = "\"";
|
|
352
|
+
const peg$c16 = "'";
|
|
350
353
|
const peg$r0 = /^[^\\{[<]/;
|
|
351
354
|
const peg$r1 = /^[{}]/;
|
|
352
355
|
const peg$r2 = /^[$_@%(!\/a-zA-Z]/;
|
|
@@ -372,10 +375,14 @@ function peg$parse(input, options) {
|
|
|
372
375
|
"[",
|
|
373
376
|
"<"
|
|
374
377
|
], true, false, false);
|
|
375
|
-
const peg$e2 = peg$literalExpectation("
|
|
376
|
-
const peg$e3 = peg$
|
|
377
|
-
const peg$e4 = peg$literalExpectation("
|
|
378
|
-
const peg$e5 = peg$
|
|
378
|
+
const peg$e2 = peg$literalExpectation("<!--", false);
|
|
379
|
+
const peg$e3 = peg$literalExpectation(">", false);
|
|
380
|
+
const peg$e4 = peg$literalExpectation("->", false);
|
|
381
|
+
const peg$e5 = peg$literalExpectation("-->", false);
|
|
382
|
+
const peg$e6 = peg$literalExpectation("\\", false);
|
|
383
|
+
const peg$e7 = peg$classExpectation(["{", "}"], false, false, false);
|
|
384
|
+
const peg$e8 = peg$literalExpectation("{", false);
|
|
385
|
+
const peg$e9 = peg$classExpectation([
|
|
379
386
|
"$",
|
|
380
387
|
"_",
|
|
381
388
|
"@",
|
|
@@ -386,34 +393,34 @@ function peg$parse(input, options) {
|
|
|
386
393
|
["a", "z"],
|
|
387
394
|
["A", "Z"]
|
|
388
395
|
], false, false, false);
|
|
389
|
-
const peg$
|
|
390
|
-
const peg$
|
|
391
|
-
const peg$
|
|
392
|
-
const peg$
|
|
393
|
-
const peg$
|
|
394
|
-
const peg$
|
|
395
|
-
const peg$
|
|
396
|
+
const peg$e10 = peg$literalExpectation("<", false);
|
|
397
|
+
const peg$e11 = peg$literalExpectation("[", false);
|
|
398
|
+
const peg$e12 = peg$literalExpectation("[[", false);
|
|
399
|
+
const peg$e13 = peg$literalExpectation("]]", false);
|
|
400
|
+
const peg$e14 = peg$literalExpectation(" ", false);
|
|
401
|
+
const peg$e15 = peg$classExpectation([".", "#"], false, false, false);
|
|
402
|
+
const peg$e16 = peg$classExpectation([
|
|
396
403
|
["a", "z"],
|
|
397
404
|
["A", "Z"],
|
|
398
405
|
["0", "9"],
|
|
399
406
|
"_",
|
|
400
407
|
"-"
|
|
401
408
|
], false, false, false);
|
|
402
|
-
const peg$
|
|
409
|
+
const peg$e17 = peg$classExpectation([
|
|
403
410
|
"$",
|
|
404
411
|
"_",
|
|
405
412
|
"@",
|
|
406
413
|
"%"
|
|
407
414
|
], false, false, false);
|
|
408
|
-
const peg$
|
|
415
|
+
const peg$e18 = peg$classExpectation([
|
|
409
416
|
["a", "z"],
|
|
410
417
|
["A", "Z"],
|
|
411
418
|
["0", "9"],
|
|
412
419
|
"_",
|
|
413
420
|
"."
|
|
414
421
|
], false, false, false);
|
|
415
|
-
const peg$
|
|
416
|
-
const peg$
|
|
422
|
+
const peg$e19 = peg$literalExpectation("}", false);
|
|
423
|
+
const peg$e20 = peg$classExpectation([
|
|
417
424
|
"$",
|
|
418
425
|
"_",
|
|
419
426
|
"@",
|
|
@@ -421,9 +428,9 @@ function peg$parse(input, options) {
|
|
|
421
428
|
"(",
|
|
422
429
|
"!"
|
|
423
430
|
], false, false, false);
|
|
424
|
-
const peg$
|
|
425
|
-
const peg$
|
|
426
|
-
const peg$
|
|
431
|
+
const peg$e21 = peg$literalExpectation("/", false);
|
|
432
|
+
const peg$e22 = peg$classExpectation([["a", "z"], ["A", "Z"]], false, false, false);
|
|
433
|
+
const peg$e23 = peg$classExpectation([
|
|
427
434
|
" ",
|
|
428
435
|
" ",
|
|
429
436
|
"\n",
|
|
@@ -441,8 +448,7 @@ function peg$parse(input, options) {
|
|
|
441
448
|
"",
|
|
442
449
|
"}"
|
|
443
450
|
], true, false, false);
|
|
444
|
-
const peg$
|
|
445
|
-
const peg$e21 = peg$classExpectation([
|
|
451
|
+
const peg$e24 = peg$classExpectation([
|
|
446
452
|
[" ", "\r"],
|
|
447
453
|
" ",
|
|
448
454
|
"/",
|
|
@@ -456,14 +462,14 @@ function peg$parse(input, options) {
|
|
|
456
462
|
" ",
|
|
457
463
|
""
|
|
458
464
|
], false, false, false);
|
|
459
|
-
const peg$
|
|
460
|
-
const peg$
|
|
465
|
+
const peg$e25 = peg$literalExpectation("</", false);
|
|
466
|
+
const peg$e26 = peg$classExpectation([
|
|
461
467
|
["a", "z"],
|
|
462
468
|
["A", "Z"],
|
|
463
469
|
["0", "9"],
|
|
464
470
|
"-"
|
|
465
471
|
], false, false, false);
|
|
466
|
-
const peg$
|
|
472
|
+
const peg$e27 = peg$classExpectation([
|
|
467
473
|
[" ", "\r"],
|
|
468
474
|
" ",
|
|
469
475
|
"\"",
|
|
@@ -481,13 +487,13 @@ function peg$parse(input, options) {
|
|
|
481
487
|
" ",
|
|
482
488
|
""
|
|
483
489
|
], false, false, false);
|
|
484
|
-
const peg$
|
|
485
|
-
const peg$
|
|
486
|
-
const peg$
|
|
487
|
-
const peg$
|
|
488
|
-
const peg$
|
|
489
|
-
const peg$
|
|
490
|
-
const peg$
|
|
490
|
+
const peg$e28 = peg$literalExpectation("=", false);
|
|
491
|
+
const peg$e29 = peg$literalExpectation("\"", false);
|
|
492
|
+
const peg$e30 = peg$classExpectation(["\""], true, false, false);
|
|
493
|
+
const peg$e31 = peg$literalExpectation("'", false);
|
|
494
|
+
const peg$e32 = peg$classExpectation(["'"], true, false, false);
|
|
495
|
+
const peg$e33 = peg$classExpectation(["\"", "'"], false, false, false);
|
|
496
|
+
const peg$e34 = peg$classExpectation([
|
|
491
497
|
" ",
|
|
492
498
|
" ",
|
|
493
499
|
"\n",
|
|
@@ -505,7 +511,7 @@ function peg$parse(input, options) {
|
|
|
505
511
|
"",
|
|
506
512
|
">"
|
|
507
513
|
], true, false, false);
|
|
508
|
-
const peg$
|
|
514
|
+
const peg$e35 = peg$classExpectation([
|
|
509
515
|
" ",
|
|
510
516
|
" ",
|
|
511
517
|
"\n",
|
|
@@ -679,13 +685,16 @@ function peg$parse(input, options) {
|
|
|
679
685
|
function peg$f40(value) {
|
|
680
686
|
return lexeme("text", location(), { value });
|
|
681
687
|
}
|
|
682
|
-
function peg$f41(
|
|
688
|
+
function peg$f41(value) {
|
|
689
|
+
return lexeme("text", location(), { value });
|
|
690
|
+
}
|
|
691
|
+
function peg$f42(bs) {
|
|
683
692
|
return bs.length % 2 === 1;
|
|
684
693
|
}
|
|
685
|
-
function peg$
|
|
694
|
+
function peg$f43(bs, c) {
|
|
686
695
|
return c;
|
|
687
696
|
}
|
|
688
|
-
function peg$
|
|
697
|
+
function peg$f44(bs, brace) {
|
|
689
698
|
const loc = location();
|
|
690
699
|
const next = input.charAt(loc.end.offset);
|
|
691
700
|
if (textMode) {
|
|
@@ -702,76 +711,76 @@ function peg$parse(input, options) {
|
|
|
702
711
|
escaped.escape = true;
|
|
703
712
|
return bs.length > 1 ? [before, escaped] : escaped;
|
|
704
713
|
}
|
|
705
|
-
function peg$
|
|
714
|
+
function peg$f45() {
|
|
706
715
|
return lexeme("text", location(), { value: LB });
|
|
707
716
|
}
|
|
708
|
-
function peg$
|
|
717
|
+
function peg$f46() {
|
|
709
718
|
return !textMode;
|
|
710
719
|
}
|
|
711
|
-
function peg$
|
|
720
|
+
function peg$f47() {
|
|
712
721
|
return lexeme("text", location(), { value: "<" });
|
|
713
722
|
}
|
|
714
|
-
function peg$
|
|
723
|
+
function peg$f48() {
|
|
715
724
|
return lexeme("text", location(), { value: "[" });
|
|
716
725
|
}
|
|
717
|
-
function peg$
|
|
726
|
+
function peg$f49() {
|
|
718
727
|
return !textMode;
|
|
719
728
|
}
|
|
720
|
-
function peg$
|
|
729
|
+
function peg$f50(s, at, inner) {
|
|
721
730
|
return withSelectors(lexeme("link", location(), parseLink(inner, at)), s);
|
|
722
731
|
}
|
|
723
|
-
function peg$
|
|
732
|
+
function peg$f51() {
|
|
724
733
|
return !textMode;
|
|
725
734
|
}
|
|
726
|
-
function peg$
|
|
735
|
+
function peg$f52() {
|
|
727
736
|
fail("Unclosed link: [[ without ]]", location());
|
|
728
737
|
}
|
|
729
|
-
function peg$
|
|
738
|
+
function peg$f53(parts) {
|
|
730
739
|
return selectorsOf(parts);
|
|
731
740
|
}
|
|
732
|
-
function peg$
|
|
741
|
+
function peg$f54() {
|
|
733
742
|
return NO_SELECTORS;
|
|
734
743
|
}
|
|
735
|
-
function peg$
|
|
744
|
+
function peg$f55(s, end) {
|
|
736
745
|
return {
|
|
737
746
|
...s,
|
|
738
747
|
end
|
|
739
748
|
};
|
|
740
749
|
}
|
|
741
|
-
function peg$
|
|
750
|
+
function peg$f56(prefix, name) {
|
|
742
751
|
return [prefix, name];
|
|
743
752
|
}
|
|
744
|
-
function peg$
|
|
753
|
+
function peg$f57(s, sigil, name) {
|
|
745
754
|
return withSelectors(lexeme("variable", location(), {
|
|
746
755
|
name,
|
|
747
756
|
scope: SIGIL_SCOPES$1[sigil]
|
|
748
757
|
}), s);
|
|
749
758
|
}
|
|
750
|
-
function peg$
|
|
759
|
+
function peg$f58(s, expression) {
|
|
751
760
|
return withSelectors(lexeme("expression", location(), { expression }), s);
|
|
752
761
|
}
|
|
753
|
-
function peg$
|
|
762
|
+
function peg$f59() {
|
|
754
763
|
fail("Unclosed " + LB + input.substr(location().end.offset, 1) + "…: no } ends it", location());
|
|
755
764
|
}
|
|
756
|
-
function peg$
|
|
765
|
+
function peg$f60(start) {
|
|
757
766
|
return skipTo(hooks.closeBrace(input, start, start));
|
|
758
767
|
}
|
|
759
|
-
function peg$
|
|
768
|
+
function peg$f61(start) {
|
|
760
769
|
return skipEnd - offset();
|
|
761
770
|
}
|
|
762
|
-
function peg$
|
|
771
|
+
function peg$f62(start, code) {
|
|
763
772
|
return code;
|
|
764
773
|
}
|
|
765
|
-
function peg$
|
|
774
|
+
function peg$f63(s, start, close, name, nameEnd) {
|
|
766
775
|
return skipTo(hooks.closeBrace(input, nameEnd, start));
|
|
767
776
|
}
|
|
768
|
-
function peg$
|
|
777
|
+
function peg$f64(s, start, close, name, nameEnd) {
|
|
769
778
|
return skipEnd - offset();
|
|
770
779
|
}
|
|
771
|
-
function peg$
|
|
780
|
+
function peg$f65(s, start, close, name, nameEnd, args) {
|
|
772
781
|
return args;
|
|
773
782
|
}
|
|
774
|
-
function peg$
|
|
783
|
+
function peg$f66(s, start, close, name, nameEnd, tail) {
|
|
775
784
|
const loc = location();
|
|
776
785
|
const lower = name.toLowerCase();
|
|
777
786
|
const tag = lexeme("macro", loc, {
|
|
@@ -792,19 +801,19 @@ function peg$parse(input, options) {
|
|
|
792
801
|
}
|
|
793
802
|
return tag;
|
|
794
803
|
}
|
|
795
|
-
function peg$
|
|
804
|
+
function peg$f67(s) {
|
|
796
805
|
fail("A closing tag starts with a letter after " + LB + "/", location());
|
|
797
806
|
}
|
|
798
|
-
function peg$
|
|
807
|
+
function peg$f68() {
|
|
799
808
|
return !textMode;
|
|
800
809
|
}
|
|
801
|
-
function peg$
|
|
810
|
+
function peg$f69(tag) {
|
|
802
811
|
return VOID_TAGS.has(tag.lower);
|
|
803
812
|
}
|
|
804
|
-
function peg$
|
|
813
|
+
function peg$f70(tag) {
|
|
805
814
|
return null;
|
|
806
815
|
}
|
|
807
|
-
function peg$
|
|
816
|
+
function peg$f71(tag, list, slash) {
|
|
808
817
|
const lower = tag.toLowerCase();
|
|
809
818
|
return lexeme("html", location(), {
|
|
810
819
|
tag,
|
|
@@ -814,7 +823,7 @@ function peg$parse(input, options) {
|
|
|
814
823
|
isSelfClose: !!slash || VOID_TAGS.has(lower)
|
|
815
824
|
});
|
|
816
825
|
}
|
|
817
|
-
function peg$
|
|
826
|
+
function peg$f72(tag, bad) {
|
|
818
827
|
const c = input.charAt(bad);
|
|
819
828
|
if (!c) fail("Unclosed tag <" + tag + ": no > ends it (write < for a < that starts no tag)", location());
|
|
820
829
|
const at = {
|
|
@@ -832,7 +841,7 @@ function peg$parse(input, options) {
|
|
|
832
841
|
};
|
|
833
842
|
fail("Unexpected " + JSON.stringify(c) + " in the tag <" + tag + ">: expected an attribute, or > to end the tag", at);
|
|
834
843
|
}
|
|
835
|
-
function peg$
|
|
844
|
+
function peg$f73(tag) {
|
|
836
845
|
return lexeme("html", location(), {
|
|
837
846
|
tag,
|
|
838
847
|
lower: tag.toLowerCase(),
|
|
@@ -841,44 +850,44 @@ function peg$parse(input, options) {
|
|
|
841
850
|
isSelfClose: false
|
|
842
851
|
});
|
|
843
852
|
}
|
|
844
|
-
function peg$
|
|
853
|
+
function peg$f74(name) {
|
|
845
854
|
attrCode = hooks.isCodeAttribute(name);
|
|
846
855
|
return true;
|
|
847
856
|
}
|
|
848
|
-
function peg$
|
|
857
|
+
function peg$f75(name, v) {
|
|
849
858
|
return v;
|
|
850
859
|
}
|
|
851
|
-
function peg$
|
|
860
|
+
function peg$f76(name, value) {
|
|
852
861
|
return [name, value ?? ""];
|
|
853
862
|
}
|
|
854
|
-
function peg$
|
|
863
|
+
function peg$f77(v) {
|
|
855
864
|
return v;
|
|
856
865
|
}
|
|
857
|
-
function peg$
|
|
866
|
+
function peg$f78(v) {
|
|
858
867
|
return v;
|
|
859
868
|
}
|
|
860
|
-
function peg$
|
|
869
|
+
function peg$f79(q) {
|
|
861
870
|
fail("Unclosed attribute value: the " + q + " here has no closing " + q, location());
|
|
862
871
|
}
|
|
863
|
-
function peg$
|
|
872
|
+
function peg$f80() {
|
|
864
873
|
return !attrCode;
|
|
865
874
|
}
|
|
866
|
-
function peg$
|
|
875
|
+
function peg$f81(bs) {
|
|
867
876
|
return bs.length % 2 === 1;
|
|
868
877
|
}
|
|
869
|
-
function peg$
|
|
878
|
+
function peg$f82() {
|
|
870
879
|
return !attrCode;
|
|
871
880
|
}
|
|
872
|
-
function peg$
|
|
881
|
+
function peg$f83(start, nameEnd) {
|
|
873
882
|
return skipTo(hooks.closeBrace(input, nameEnd, start));
|
|
874
883
|
}
|
|
875
|
-
function peg$
|
|
884
|
+
function peg$f84(start, nameEnd) {
|
|
876
885
|
return skipEnd - offset();
|
|
877
886
|
}
|
|
878
|
-
function peg$
|
|
887
|
+
function peg$f85() {
|
|
879
888
|
return !attrCode;
|
|
880
889
|
}
|
|
881
|
-
function peg$
|
|
890
|
+
function peg$f86() {
|
|
882
891
|
return attrCode;
|
|
883
892
|
}
|
|
884
893
|
let peg$currPos = options.peg$currPos | 0;
|
|
@@ -1065,16 +1074,19 @@ function peg$parse(input, options) {
|
|
|
1065
1074
|
if (s0 === peg$FAILED) {
|
|
1066
1075
|
s0 = peg$parseEscape();
|
|
1067
1076
|
if (s0 === peg$FAILED) {
|
|
1068
|
-
s0 = peg$
|
|
1077
|
+
s0 = peg$parseComment();
|
|
1069
1078
|
if (s0 === peg$FAILED) {
|
|
1070
|
-
s0 = peg$
|
|
1079
|
+
s0 = peg$parseLinkLexeme();
|
|
1071
1080
|
if (s0 === peg$FAILED) {
|
|
1072
|
-
s0 = peg$
|
|
1081
|
+
s0 = peg$parseHtmlElement();
|
|
1073
1082
|
if (s0 === peg$FAILED) {
|
|
1074
|
-
s0 = peg$
|
|
1083
|
+
s0 = peg$parseVoidCloser();
|
|
1075
1084
|
if (s0 === peg$FAILED) {
|
|
1076
|
-
s0 = peg$
|
|
1077
|
-
if (s0 === peg$FAILED)
|
|
1085
|
+
s0 = peg$parseValue();
|
|
1086
|
+
if (s0 === peg$FAILED) {
|
|
1087
|
+
s0 = peg$parseMacroElement();
|
|
1088
|
+
if (s0 === peg$FAILED) s0 = peg$parseLiteral();
|
|
1089
|
+
}
|
|
1078
1090
|
}
|
|
1079
1091
|
}
|
|
1080
1092
|
}
|
|
@@ -1417,37 +1429,20 @@ function peg$parse(input, options) {
|
|
|
1417
1429
|
if (s0 === peg$FAILED) {
|
|
1418
1430
|
s0 = peg$parseEscape();
|
|
1419
1431
|
if (s0 === peg$FAILED) {
|
|
1420
|
-
s0 = peg$
|
|
1432
|
+
s0 = peg$parseComment();
|
|
1421
1433
|
if (s0 === peg$FAILED) {
|
|
1422
|
-
s0 = peg$
|
|
1423
|
-
peg$savedPos = peg$currPos;
|
|
1424
|
-
s1 = peg$f29();
|
|
1425
|
-
if (s1) s1 = void 0;
|
|
1426
|
-
else s1 = peg$FAILED;
|
|
1427
|
-
if (s1 !== peg$FAILED) {
|
|
1428
|
-
s2 = peg$parseHtmlOpen();
|
|
1429
|
-
if (s2 !== peg$FAILED) {
|
|
1430
|
-
peg$savedPos = s0;
|
|
1431
|
-
s0 = peg$f30(s2);
|
|
1432
|
-
} else {
|
|
1433
|
-
peg$currPos = s0;
|
|
1434
|
-
s0 = peg$FAILED;
|
|
1435
|
-
}
|
|
1436
|
-
} else {
|
|
1437
|
-
peg$currPos = s0;
|
|
1438
|
-
s0 = peg$FAILED;
|
|
1439
|
-
}
|
|
1434
|
+
s0 = peg$parseLinkLexeme();
|
|
1440
1435
|
if (s0 === peg$FAILED) {
|
|
1441
1436
|
s0 = peg$currPos;
|
|
1442
1437
|
peg$savedPos = peg$currPos;
|
|
1443
|
-
s1 = peg$
|
|
1438
|
+
s1 = peg$f29();
|
|
1444
1439
|
if (s1) s1 = void 0;
|
|
1445
1440
|
else s1 = peg$FAILED;
|
|
1446
1441
|
if (s1 !== peg$FAILED) {
|
|
1447
|
-
s2 = peg$
|
|
1442
|
+
s2 = peg$parseHtmlOpen();
|
|
1448
1443
|
if (s2 !== peg$FAILED) {
|
|
1449
1444
|
peg$savedPos = s0;
|
|
1450
|
-
s0 = peg$
|
|
1445
|
+
s0 = peg$f30(s2);
|
|
1451
1446
|
} else {
|
|
1452
1447
|
peg$currPos = s0;
|
|
1453
1448
|
s0 = peg$FAILED;
|
|
@@ -1457,37 +1452,57 @@ function peg$parse(input, options) {
|
|
|
1457
1452
|
s0 = peg$FAILED;
|
|
1458
1453
|
}
|
|
1459
1454
|
if (s0 === peg$FAILED) {
|
|
1460
|
-
s0 = peg$
|
|
1455
|
+
s0 = peg$currPos;
|
|
1456
|
+
peg$savedPos = peg$currPos;
|
|
1457
|
+
s1 = peg$f31();
|
|
1458
|
+
if (s1) s1 = void 0;
|
|
1459
|
+
else s1 = peg$FAILED;
|
|
1460
|
+
if (s1 !== peg$FAILED) {
|
|
1461
|
+
s2 = peg$parseHtmlClose();
|
|
1462
|
+
if (s2 !== peg$FAILED) {
|
|
1463
|
+
peg$savedPos = s0;
|
|
1464
|
+
s0 = peg$f32(s2);
|
|
1465
|
+
} else {
|
|
1466
|
+
peg$currPos = s0;
|
|
1467
|
+
s0 = peg$FAILED;
|
|
1468
|
+
}
|
|
1469
|
+
} else {
|
|
1470
|
+
peg$currPos = s0;
|
|
1471
|
+
s0 = peg$FAILED;
|
|
1472
|
+
}
|
|
1461
1473
|
if (s0 === peg$FAILED) {
|
|
1462
|
-
s0 = peg$
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
if (
|
|
1473
|
-
|
|
1474
|
-
|
|
1474
|
+
s0 = peg$parseValue();
|
|
1475
|
+
if (s0 === peg$FAILED) {
|
|
1476
|
+
s0 = peg$currPos;
|
|
1477
|
+
s1 = peg$parseMacroTag();
|
|
1478
|
+
if (s1 !== peg$FAILED) {
|
|
1479
|
+
s2 = peg$currPos;
|
|
1480
|
+
peg$savedPos = peg$currPos;
|
|
1481
|
+
s3 = peg$f33(s1);
|
|
1482
|
+
if (s3) s3 = void 0;
|
|
1483
|
+
else s3 = peg$FAILED;
|
|
1484
|
+
if (s3 !== peg$FAILED) {
|
|
1485
|
+
s4 = peg$parseRawTokens();
|
|
1486
|
+
if (s4 !== peg$FAILED) {
|
|
1487
|
+
peg$savedPos = s2;
|
|
1488
|
+
s2 = peg$f34(s1, s4);
|
|
1489
|
+
} else {
|
|
1490
|
+
peg$currPos = s2;
|
|
1491
|
+
s2 = peg$FAILED;
|
|
1492
|
+
}
|
|
1475
1493
|
} else {
|
|
1476
1494
|
peg$currPos = s2;
|
|
1477
1495
|
s2 = peg$FAILED;
|
|
1478
1496
|
}
|
|
1497
|
+
if (s2 === peg$FAILED) s2 = null;
|
|
1498
|
+
peg$savedPos = s0;
|
|
1499
|
+
s0 = peg$f35(s1, s2);
|
|
1479
1500
|
} else {
|
|
1480
|
-
peg$currPos =
|
|
1481
|
-
|
|
1501
|
+
peg$currPos = s0;
|
|
1502
|
+
s0 = peg$FAILED;
|
|
1482
1503
|
}
|
|
1483
|
-
if (
|
|
1484
|
-
peg$savedPos = s0;
|
|
1485
|
-
s0 = peg$f35(s1, s2);
|
|
1486
|
-
} else {
|
|
1487
|
-
peg$currPos = s0;
|
|
1488
|
-
s0 = peg$FAILED;
|
|
1504
|
+
if (s0 === peg$FAILED) s0 = peg$parseLiteral();
|
|
1489
1505
|
}
|
|
1490
|
-
if (s0 === peg$FAILED) s0 = peg$parseLiteral();
|
|
1491
1506
|
}
|
|
1492
1507
|
}
|
|
1493
1508
|
}
|
|
@@ -1593,26 +1608,166 @@ function peg$parse(input, options) {
|
|
|
1593
1608
|
s0 = s1;
|
|
1594
1609
|
return s0;
|
|
1595
1610
|
}
|
|
1611
|
+
function peg$parseComment() {
|
|
1612
|
+
let s0, s1, s2, s3, s4, s5, s6, s7, s8;
|
|
1613
|
+
s0 = peg$currPos;
|
|
1614
|
+
s1 = peg$currPos;
|
|
1615
|
+
s2 = peg$currPos;
|
|
1616
|
+
if (input.substr(peg$currPos, 4) === peg$c0) {
|
|
1617
|
+
s3 = peg$c0;
|
|
1618
|
+
peg$currPos += 4;
|
|
1619
|
+
} else {
|
|
1620
|
+
s3 = peg$FAILED;
|
|
1621
|
+
if (peg$silentFails === 0) peg$fail(peg$e2);
|
|
1622
|
+
}
|
|
1623
|
+
if (s3 !== peg$FAILED) {
|
|
1624
|
+
if (input.charCodeAt(peg$currPos) === 62) {
|
|
1625
|
+
s4 = peg$c1;
|
|
1626
|
+
peg$currPos++;
|
|
1627
|
+
} else {
|
|
1628
|
+
s4 = peg$FAILED;
|
|
1629
|
+
if (peg$silentFails === 0) peg$fail(peg$e3);
|
|
1630
|
+
}
|
|
1631
|
+
if (s4 === peg$FAILED) {
|
|
1632
|
+
if (input.substr(peg$currPos, 2) === peg$c2) {
|
|
1633
|
+
s4 = peg$c2;
|
|
1634
|
+
peg$currPos += 2;
|
|
1635
|
+
} else {
|
|
1636
|
+
s4 = peg$FAILED;
|
|
1637
|
+
if (peg$silentFails === 0) peg$fail(peg$e4);
|
|
1638
|
+
}
|
|
1639
|
+
if (s4 === peg$FAILED) {
|
|
1640
|
+
s4 = peg$currPos;
|
|
1641
|
+
s5 = [];
|
|
1642
|
+
s6 = peg$currPos;
|
|
1643
|
+
s7 = peg$currPos;
|
|
1644
|
+
peg$silentFails++;
|
|
1645
|
+
if (input.substr(peg$currPos, 3) === peg$c3) {
|
|
1646
|
+
s8 = peg$c3;
|
|
1647
|
+
peg$currPos += 3;
|
|
1648
|
+
} else {
|
|
1649
|
+
s8 = peg$FAILED;
|
|
1650
|
+
if (peg$silentFails === 0) peg$fail(peg$e5);
|
|
1651
|
+
}
|
|
1652
|
+
peg$silentFails--;
|
|
1653
|
+
if (s8 === peg$FAILED) s7 = void 0;
|
|
1654
|
+
else {
|
|
1655
|
+
peg$currPos = s7;
|
|
1656
|
+
s7 = peg$FAILED;
|
|
1657
|
+
}
|
|
1658
|
+
if (s7 !== peg$FAILED) {
|
|
1659
|
+
if (input.length > peg$currPos) {
|
|
1660
|
+
s8 = input.charAt(peg$currPos);
|
|
1661
|
+
peg$currPos++;
|
|
1662
|
+
} else {
|
|
1663
|
+
s8 = peg$FAILED;
|
|
1664
|
+
if (peg$silentFails === 0) peg$fail(peg$e0);
|
|
1665
|
+
}
|
|
1666
|
+
if (s8 !== peg$FAILED) {
|
|
1667
|
+
s7 = [s7, s8];
|
|
1668
|
+
s6 = s7;
|
|
1669
|
+
} else {
|
|
1670
|
+
peg$currPos = s6;
|
|
1671
|
+
s6 = peg$FAILED;
|
|
1672
|
+
}
|
|
1673
|
+
} else {
|
|
1674
|
+
peg$currPos = s6;
|
|
1675
|
+
s6 = peg$FAILED;
|
|
1676
|
+
}
|
|
1677
|
+
while (s6 !== peg$FAILED) {
|
|
1678
|
+
s5.push(s6);
|
|
1679
|
+
s6 = peg$currPos;
|
|
1680
|
+
s7 = peg$currPos;
|
|
1681
|
+
peg$silentFails++;
|
|
1682
|
+
if (input.substr(peg$currPos, 3) === peg$c3) {
|
|
1683
|
+
s8 = peg$c3;
|
|
1684
|
+
peg$currPos += 3;
|
|
1685
|
+
} else {
|
|
1686
|
+
s8 = peg$FAILED;
|
|
1687
|
+
if (peg$silentFails === 0) peg$fail(peg$e5);
|
|
1688
|
+
}
|
|
1689
|
+
peg$silentFails--;
|
|
1690
|
+
if (s8 === peg$FAILED) s7 = void 0;
|
|
1691
|
+
else {
|
|
1692
|
+
peg$currPos = s7;
|
|
1693
|
+
s7 = peg$FAILED;
|
|
1694
|
+
}
|
|
1695
|
+
if (s7 !== peg$FAILED) {
|
|
1696
|
+
if (input.length > peg$currPos) {
|
|
1697
|
+
s8 = input.charAt(peg$currPos);
|
|
1698
|
+
peg$currPos++;
|
|
1699
|
+
} else {
|
|
1700
|
+
s8 = peg$FAILED;
|
|
1701
|
+
if (peg$silentFails === 0) peg$fail(peg$e0);
|
|
1702
|
+
}
|
|
1703
|
+
if (s8 !== peg$FAILED) {
|
|
1704
|
+
s7 = [s7, s8];
|
|
1705
|
+
s6 = s7;
|
|
1706
|
+
} else {
|
|
1707
|
+
peg$currPos = s6;
|
|
1708
|
+
s6 = peg$FAILED;
|
|
1709
|
+
}
|
|
1710
|
+
} else {
|
|
1711
|
+
peg$currPos = s6;
|
|
1712
|
+
s6 = peg$FAILED;
|
|
1713
|
+
}
|
|
1714
|
+
}
|
|
1715
|
+
if (input.substr(peg$currPos, 3) === peg$c3) {
|
|
1716
|
+
s6 = peg$c3;
|
|
1717
|
+
peg$currPos += 3;
|
|
1718
|
+
} else {
|
|
1719
|
+
s6 = peg$FAILED;
|
|
1720
|
+
if (peg$silentFails === 0) peg$fail(peg$e5);
|
|
1721
|
+
}
|
|
1722
|
+
if (s6 !== peg$FAILED) {
|
|
1723
|
+
s5 = [s5, s6];
|
|
1724
|
+
s4 = s5;
|
|
1725
|
+
} else {
|
|
1726
|
+
peg$currPos = s4;
|
|
1727
|
+
s4 = peg$FAILED;
|
|
1728
|
+
}
|
|
1729
|
+
}
|
|
1730
|
+
}
|
|
1731
|
+
if (s4 !== peg$FAILED) {
|
|
1732
|
+
s3 = [s3, s4];
|
|
1733
|
+
s2 = s3;
|
|
1734
|
+
} else {
|
|
1735
|
+
peg$currPos = s2;
|
|
1736
|
+
s2 = peg$FAILED;
|
|
1737
|
+
}
|
|
1738
|
+
} else {
|
|
1739
|
+
peg$currPos = s2;
|
|
1740
|
+
s2 = peg$FAILED;
|
|
1741
|
+
}
|
|
1742
|
+
if (s2 !== peg$FAILED) s1 = input.substring(s1, peg$currPos);
|
|
1743
|
+
else s1 = s2;
|
|
1744
|
+
if (s1 !== peg$FAILED) {
|
|
1745
|
+
peg$savedPos = s0;
|
|
1746
|
+
s1 = peg$f41(s1);
|
|
1747
|
+
}
|
|
1748
|
+
s0 = s1;
|
|
1749
|
+
return s0;
|
|
1750
|
+
}
|
|
1596
1751
|
function peg$parseEscape() {
|
|
1597
1752
|
let s0, s1, s2, s3, s4;
|
|
1598
1753
|
s0 = peg$currPos;
|
|
1599
1754
|
s1 = peg$currPos;
|
|
1600
1755
|
s2 = [];
|
|
1601
1756
|
if (input.charCodeAt(peg$currPos) === 92) {
|
|
1602
|
-
s3 = peg$
|
|
1757
|
+
s3 = peg$c4;
|
|
1603
1758
|
peg$currPos++;
|
|
1604
1759
|
} else {
|
|
1605
1760
|
s3 = peg$FAILED;
|
|
1606
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
1761
|
+
if (peg$silentFails === 0) peg$fail(peg$e6);
|
|
1607
1762
|
}
|
|
1608
1763
|
if (s3 !== peg$FAILED) while (s3 !== peg$FAILED) {
|
|
1609
1764
|
s2.push(s3);
|
|
1610
1765
|
if (input.charCodeAt(peg$currPos) === 92) {
|
|
1611
|
-
s3 = peg$
|
|
1766
|
+
s3 = peg$c4;
|
|
1612
1767
|
peg$currPos++;
|
|
1613
1768
|
} else {
|
|
1614
1769
|
s3 = peg$FAILED;
|
|
1615
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
1770
|
+
if (peg$silentFails === 0) peg$fail(peg$e6);
|
|
1616
1771
|
}
|
|
1617
1772
|
}
|
|
1618
1773
|
else s2 = peg$FAILED;
|
|
@@ -1621,7 +1776,7 @@ function peg$parse(input, options) {
|
|
|
1621
1776
|
if (s1 !== peg$FAILED) {
|
|
1622
1777
|
s2 = peg$currPos;
|
|
1623
1778
|
peg$savedPos = peg$currPos;
|
|
1624
|
-
s3 = peg$
|
|
1779
|
+
s3 = peg$f42(s1);
|
|
1625
1780
|
if (s3) s3 = void 0;
|
|
1626
1781
|
else s3 = peg$FAILED;
|
|
1627
1782
|
if (s3 !== peg$FAILED) {
|
|
@@ -1629,11 +1784,11 @@ function peg$parse(input, options) {
|
|
|
1629
1784
|
if (peg$r1.test(s4)) peg$currPos++;
|
|
1630
1785
|
else {
|
|
1631
1786
|
s4 = peg$FAILED;
|
|
1632
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
1787
|
+
if (peg$silentFails === 0) peg$fail(peg$e7);
|
|
1633
1788
|
}
|
|
1634
1789
|
if (s4 !== peg$FAILED) {
|
|
1635
1790
|
peg$savedPos = s2;
|
|
1636
|
-
s2 = peg$
|
|
1791
|
+
s2 = peg$f43(s1, s4);
|
|
1637
1792
|
} else {
|
|
1638
1793
|
peg$currPos = s2;
|
|
1639
1794
|
s2 = peg$FAILED;
|
|
@@ -1644,7 +1799,7 @@ function peg$parse(input, options) {
|
|
|
1644
1799
|
}
|
|
1645
1800
|
if (s2 === peg$FAILED) s2 = null;
|
|
1646
1801
|
peg$savedPos = s0;
|
|
1647
|
-
s0 = peg$
|
|
1802
|
+
s0 = peg$f44(s1, s2);
|
|
1648
1803
|
} else {
|
|
1649
1804
|
peg$currPos = s0;
|
|
1650
1805
|
s0 = peg$FAILED;
|
|
@@ -1655,11 +1810,11 @@ function peg$parse(input, options) {
|
|
|
1655
1810
|
let s0, s1, s2, s3, s4, s5;
|
|
1656
1811
|
s0 = peg$currPos;
|
|
1657
1812
|
if (input.charCodeAt(peg$currPos) === 123) {
|
|
1658
|
-
s1 = peg$
|
|
1813
|
+
s1 = peg$c5;
|
|
1659
1814
|
peg$currPos++;
|
|
1660
1815
|
} else {
|
|
1661
1816
|
s1 = peg$FAILED;
|
|
1662
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
1817
|
+
if (peg$silentFails === 0) peg$fail(peg$e8);
|
|
1663
1818
|
}
|
|
1664
1819
|
if (s1 !== peg$FAILED) {
|
|
1665
1820
|
s2 = peg$currPos;
|
|
@@ -1671,7 +1826,7 @@ function peg$parse(input, options) {
|
|
|
1671
1826
|
if (peg$r2.test(s5)) peg$currPos++;
|
|
1672
1827
|
else {
|
|
1673
1828
|
s5 = peg$FAILED;
|
|
1674
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
1829
|
+
if (peg$silentFails === 0) peg$fail(peg$e9);
|
|
1675
1830
|
}
|
|
1676
1831
|
if (s5 !== peg$FAILED) {
|
|
1677
1832
|
s4 = [s4, s5];
|
|
@@ -1692,7 +1847,7 @@ function peg$parse(input, options) {
|
|
|
1692
1847
|
}
|
|
1693
1848
|
if (s2 !== peg$FAILED) {
|
|
1694
1849
|
peg$savedPos = s0;
|
|
1695
|
-
s0 = peg$
|
|
1850
|
+
s0 = peg$f45();
|
|
1696
1851
|
} else {
|
|
1697
1852
|
peg$currPos = s0;
|
|
1698
1853
|
s0 = peg$FAILED;
|
|
@@ -1707,7 +1862,7 @@ function peg$parse(input, options) {
|
|
|
1707
1862
|
peg$silentFails++;
|
|
1708
1863
|
s2 = peg$currPos;
|
|
1709
1864
|
peg$savedPos = peg$currPos;
|
|
1710
|
-
s3 = peg$
|
|
1865
|
+
s3 = peg$f46();
|
|
1711
1866
|
if (s3) s3 = void 0;
|
|
1712
1867
|
else s3 = peg$FAILED;
|
|
1713
1868
|
if (s3 !== peg$FAILED) {
|
|
@@ -1731,15 +1886,15 @@ function peg$parse(input, options) {
|
|
|
1731
1886
|
}
|
|
1732
1887
|
if (s1 !== peg$FAILED) {
|
|
1733
1888
|
if (input.charCodeAt(peg$currPos) === 60) {
|
|
1734
|
-
s2 = peg$
|
|
1889
|
+
s2 = peg$c6;
|
|
1735
1890
|
peg$currPos++;
|
|
1736
1891
|
} else {
|
|
1737
1892
|
s2 = peg$FAILED;
|
|
1738
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
1893
|
+
if (peg$silentFails === 0) peg$fail(peg$e10);
|
|
1739
1894
|
}
|
|
1740
1895
|
if (s2 !== peg$FAILED) {
|
|
1741
1896
|
peg$savedPos = s0;
|
|
1742
|
-
s0 = peg$
|
|
1897
|
+
s0 = peg$f47();
|
|
1743
1898
|
} else {
|
|
1744
1899
|
peg$currPos = s0;
|
|
1745
1900
|
s0 = peg$FAILED;
|
|
@@ -1751,15 +1906,15 @@ function peg$parse(input, options) {
|
|
|
1751
1906
|
if (s0 === peg$FAILED) {
|
|
1752
1907
|
s0 = peg$currPos;
|
|
1753
1908
|
if (input.charCodeAt(peg$currPos) === 91) {
|
|
1754
|
-
s1 = peg$
|
|
1909
|
+
s1 = peg$c7;
|
|
1755
1910
|
peg$currPos++;
|
|
1756
1911
|
} else {
|
|
1757
1912
|
s1 = peg$FAILED;
|
|
1758
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
1913
|
+
if (peg$silentFails === 0) peg$fail(peg$e11);
|
|
1759
1914
|
}
|
|
1760
1915
|
if (s1 !== peg$FAILED) {
|
|
1761
1916
|
peg$savedPos = s0;
|
|
1762
|
-
s1 = peg$
|
|
1917
|
+
s1 = peg$f48();
|
|
1763
1918
|
}
|
|
1764
1919
|
s0 = s1;
|
|
1765
1920
|
}
|
|
@@ -1770,16 +1925,16 @@ function peg$parse(input, options) {
|
|
|
1770
1925
|
let s0, s1, s2, s3, s4, s5, s6;
|
|
1771
1926
|
s0 = peg$currPos;
|
|
1772
1927
|
peg$savedPos = peg$currPos;
|
|
1773
|
-
s1 = peg$
|
|
1928
|
+
s1 = peg$f49();
|
|
1774
1929
|
if (s1) s1 = void 0;
|
|
1775
1930
|
else s1 = peg$FAILED;
|
|
1776
1931
|
if (s1 !== peg$FAILED) {
|
|
1777
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
1778
|
-
s2 = peg$
|
|
1932
|
+
if (input.substr(peg$currPos, 2) === peg$c8) {
|
|
1933
|
+
s2 = peg$c8;
|
|
1779
1934
|
peg$currPos += 2;
|
|
1780
1935
|
} else {
|
|
1781
1936
|
s2 = peg$FAILED;
|
|
1782
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
1937
|
+
if (peg$silentFails === 0) peg$fail(peg$e12);
|
|
1783
1938
|
}
|
|
1784
1939
|
if (s2 !== peg$FAILED) {
|
|
1785
1940
|
s3 = peg$parseSelectors();
|
|
@@ -1788,16 +1943,16 @@ function peg$parse(input, options) {
|
|
|
1788
1943
|
s5 = peg$currPos;
|
|
1789
1944
|
s6 = peg$parseLinkText();
|
|
1790
1945
|
s5 = input.substring(s5, peg$currPos);
|
|
1791
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
1792
|
-
s6 = peg$
|
|
1946
|
+
if (input.substr(peg$currPos, 2) === peg$c9) {
|
|
1947
|
+
s6 = peg$c9;
|
|
1793
1948
|
peg$currPos += 2;
|
|
1794
1949
|
} else {
|
|
1795
1950
|
s6 = peg$FAILED;
|
|
1796
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
1951
|
+
if (peg$silentFails === 0) peg$fail(peg$e13);
|
|
1797
1952
|
}
|
|
1798
1953
|
if (s6 !== peg$FAILED) {
|
|
1799
1954
|
peg$savedPos = s0;
|
|
1800
|
-
s0 = peg$
|
|
1955
|
+
s0 = peg$f50(s3, s4, s5);
|
|
1801
1956
|
} else {
|
|
1802
1957
|
peg$currPos = s0;
|
|
1803
1958
|
s0 = peg$FAILED;
|
|
@@ -1817,20 +1972,20 @@ function peg$parse(input, options) {
|
|
|
1817
1972
|
if (s0 === peg$FAILED) {
|
|
1818
1973
|
s0 = peg$currPos;
|
|
1819
1974
|
peg$savedPos = peg$currPos;
|
|
1820
|
-
s1 = peg$
|
|
1975
|
+
s1 = peg$f51();
|
|
1821
1976
|
if (s1) s1 = void 0;
|
|
1822
1977
|
else s1 = peg$FAILED;
|
|
1823
1978
|
if (s1 !== peg$FAILED) {
|
|
1824
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
1825
|
-
s2 = peg$
|
|
1979
|
+
if (input.substr(peg$currPos, 2) === peg$c8) {
|
|
1980
|
+
s2 = peg$c8;
|
|
1826
1981
|
peg$currPos += 2;
|
|
1827
1982
|
} else {
|
|
1828
1983
|
s2 = peg$FAILED;
|
|
1829
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
1984
|
+
if (peg$silentFails === 0) peg$fail(peg$e12);
|
|
1830
1985
|
}
|
|
1831
1986
|
if (s2 !== peg$FAILED) {
|
|
1832
1987
|
peg$savedPos = s0;
|
|
1833
|
-
s0 = peg$
|
|
1988
|
+
s0 = peg$f52();
|
|
1834
1989
|
} else {
|
|
1835
1990
|
peg$currPos = s0;
|
|
1836
1991
|
s0 = peg$FAILED;
|
|
@@ -1848,19 +2003,19 @@ function peg$parse(input, options) {
|
|
|
1848
2003
|
s1 = peg$currPos;
|
|
1849
2004
|
s2 = peg$currPos;
|
|
1850
2005
|
peg$silentFails++;
|
|
1851
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
1852
|
-
s3 = peg$
|
|
2006
|
+
if (input.substr(peg$currPos, 2) === peg$c9) {
|
|
2007
|
+
s3 = peg$c9;
|
|
1853
2008
|
peg$currPos += 2;
|
|
1854
2009
|
} else {
|
|
1855
2010
|
s3 = peg$FAILED;
|
|
1856
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
2011
|
+
if (peg$silentFails === 0) peg$fail(peg$e13);
|
|
1857
2012
|
}
|
|
1858
|
-
if (s3 === peg$FAILED) if (input.substr(peg$currPos, 2) === peg$
|
|
1859
|
-
s3 = peg$
|
|
2013
|
+
if (s3 === peg$FAILED) if (input.substr(peg$currPos, 2) === peg$c8) {
|
|
2014
|
+
s3 = peg$c8;
|
|
1860
2015
|
peg$currPos += 2;
|
|
1861
2016
|
} else {
|
|
1862
2017
|
s3 = peg$FAILED;
|
|
1863
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
2018
|
+
if (peg$silentFails === 0) peg$fail(peg$e12);
|
|
1864
2019
|
}
|
|
1865
2020
|
peg$silentFails--;
|
|
1866
2021
|
if (s3 === peg$FAILED) s2 = void 0;
|
|
@@ -1892,19 +2047,19 @@ function peg$parse(input, options) {
|
|
|
1892
2047
|
s1 = peg$currPos;
|
|
1893
2048
|
s2 = peg$currPos;
|
|
1894
2049
|
peg$silentFails++;
|
|
1895
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
1896
|
-
s3 = peg$
|
|
2050
|
+
if (input.substr(peg$currPos, 2) === peg$c9) {
|
|
2051
|
+
s3 = peg$c9;
|
|
1897
2052
|
peg$currPos += 2;
|
|
1898
2053
|
} else {
|
|
1899
2054
|
s3 = peg$FAILED;
|
|
1900
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
2055
|
+
if (peg$silentFails === 0) peg$fail(peg$e13);
|
|
1901
2056
|
}
|
|
1902
|
-
if (s3 === peg$FAILED) if (input.substr(peg$currPos, 2) === peg$
|
|
1903
|
-
s3 = peg$
|
|
2057
|
+
if (s3 === peg$FAILED) if (input.substr(peg$currPos, 2) === peg$c8) {
|
|
2058
|
+
s3 = peg$c8;
|
|
1904
2059
|
peg$currPos += 2;
|
|
1905
2060
|
} else {
|
|
1906
2061
|
s3 = peg$FAILED;
|
|
1907
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
2062
|
+
if (peg$silentFails === 0) peg$fail(peg$e12);
|
|
1908
2063
|
}
|
|
1909
2064
|
peg$silentFails--;
|
|
1910
2065
|
if (s3 === peg$FAILED) s2 = void 0;
|
|
@@ -1946,15 +2101,15 @@ function peg$parse(input, options) {
|
|
|
1946
2101
|
else s1 = peg$FAILED;
|
|
1947
2102
|
if (s1 !== peg$FAILED) {
|
|
1948
2103
|
if (input.charCodeAt(peg$currPos) === 32) {
|
|
1949
|
-
s2 = peg$
|
|
2104
|
+
s2 = peg$c10;
|
|
1950
2105
|
peg$currPos++;
|
|
1951
2106
|
} else {
|
|
1952
2107
|
s2 = peg$FAILED;
|
|
1953
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
2108
|
+
if (peg$silentFails === 0) peg$fail(peg$e14);
|
|
1954
2109
|
}
|
|
1955
2110
|
if (s2 === peg$FAILED) s2 = null;
|
|
1956
2111
|
peg$savedPos = s0;
|
|
1957
|
-
s0 = peg$
|
|
2112
|
+
s0 = peg$f53(s1);
|
|
1958
2113
|
} else {
|
|
1959
2114
|
peg$currPos = s0;
|
|
1960
2115
|
s0 = peg$FAILED;
|
|
@@ -1963,7 +2118,7 @@ function peg$parse(input, options) {
|
|
|
1963
2118
|
s0 = peg$currPos;
|
|
1964
2119
|
s1 = "";
|
|
1965
2120
|
peg$savedPos = s0;
|
|
1966
|
-
s1 = peg$
|
|
2121
|
+
s1 = peg$f54();
|
|
1967
2122
|
s0 = s1;
|
|
1968
2123
|
}
|
|
1969
2124
|
return s0;
|
|
@@ -1993,7 +2148,7 @@ function peg$parse(input, options) {
|
|
|
1993
2148
|
}
|
|
1994
2149
|
}
|
|
1995
2150
|
peg$savedPos = s0;
|
|
1996
|
-
s0 = peg$
|
|
2151
|
+
s0 = peg$f55(s1, s2);
|
|
1997
2152
|
} else {
|
|
1998
2153
|
peg$currPos = s0;
|
|
1999
2154
|
s0 = peg$FAILED;
|
|
@@ -2007,7 +2162,7 @@ function peg$parse(input, options) {
|
|
|
2007
2162
|
if (peg$r3.test(s1)) peg$currPos++;
|
|
2008
2163
|
else {
|
|
2009
2164
|
s1 = peg$FAILED;
|
|
2010
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
2165
|
+
if (peg$silentFails === 0) peg$fail(peg$e15);
|
|
2011
2166
|
}
|
|
2012
2167
|
if (s1 !== peg$FAILED) {
|
|
2013
2168
|
s2 = peg$currPos;
|
|
@@ -2019,7 +2174,7 @@ function peg$parse(input, options) {
|
|
|
2019
2174
|
}
|
|
2020
2175
|
s2 = input.substring(s2, peg$currPos);
|
|
2021
2176
|
peg$savedPos = s0;
|
|
2022
|
-
s0 = peg$
|
|
2177
|
+
s0 = peg$f56(s1, s2);
|
|
2023
2178
|
} else {
|
|
2024
2179
|
peg$currPos = s0;
|
|
2025
2180
|
s0 = peg$FAILED;
|
|
@@ -2032,23 +2187,23 @@ function peg$parse(input, options) {
|
|
|
2032
2187
|
if (peg$r4.test(s0)) peg$currPos++;
|
|
2033
2188
|
else {
|
|
2034
2189
|
s0 = peg$FAILED;
|
|
2035
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
2190
|
+
if (peg$silentFails === 0) peg$fail(peg$e16);
|
|
2036
2191
|
}
|
|
2037
2192
|
if (s0 === peg$FAILED) {
|
|
2038
2193
|
s0 = peg$currPos;
|
|
2039
2194
|
if (input.charCodeAt(peg$currPos) === 123) {
|
|
2040
|
-
s1 = peg$
|
|
2195
|
+
s1 = peg$c5;
|
|
2041
2196
|
peg$currPos++;
|
|
2042
2197
|
} else {
|
|
2043
2198
|
s1 = peg$FAILED;
|
|
2044
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
2199
|
+
if (peg$silentFails === 0) peg$fail(peg$e8);
|
|
2045
2200
|
}
|
|
2046
2201
|
if (s1 !== peg$FAILED) {
|
|
2047
2202
|
s2 = input.charAt(peg$currPos);
|
|
2048
2203
|
if (peg$r5.test(s2)) peg$currPos++;
|
|
2049
2204
|
else {
|
|
2050
2205
|
s2 = peg$FAILED;
|
|
2051
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
2206
|
+
if (peg$silentFails === 0) peg$fail(peg$e17);
|
|
2052
2207
|
}
|
|
2053
2208
|
if (s2 !== peg$FAILED) {
|
|
2054
2209
|
s3 = [];
|
|
@@ -2056,7 +2211,7 @@ function peg$parse(input, options) {
|
|
|
2056
2211
|
if (peg$r6.test(s4)) peg$currPos++;
|
|
2057
2212
|
else {
|
|
2058
2213
|
s4 = peg$FAILED;
|
|
2059
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
2214
|
+
if (peg$silentFails === 0) peg$fail(peg$e18);
|
|
2060
2215
|
}
|
|
2061
2216
|
while (s4 !== peg$FAILED) {
|
|
2062
2217
|
s3.push(s4);
|
|
@@ -2064,15 +2219,15 @@ function peg$parse(input, options) {
|
|
|
2064
2219
|
if (peg$r6.test(s4)) peg$currPos++;
|
|
2065
2220
|
else {
|
|
2066
2221
|
s4 = peg$FAILED;
|
|
2067
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
2222
|
+
if (peg$silentFails === 0) peg$fail(peg$e18);
|
|
2068
2223
|
}
|
|
2069
2224
|
}
|
|
2070
2225
|
if (input.charCodeAt(peg$currPos) === 125) {
|
|
2071
|
-
s4 = peg$
|
|
2226
|
+
s4 = peg$c11;
|
|
2072
2227
|
peg$currPos++;
|
|
2073
2228
|
} else {
|
|
2074
2229
|
s4 = peg$FAILED;
|
|
2075
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
2230
|
+
if (peg$silentFails === 0) peg$fail(peg$e19);
|
|
2076
2231
|
}
|
|
2077
2232
|
if (s4 !== peg$FAILED) {
|
|
2078
2233
|
s1 = [
|
|
@@ -2101,11 +2256,11 @@ function peg$parse(input, options) {
|
|
|
2101
2256
|
let s0, s1, s2, s3, s4, s5, s6;
|
|
2102
2257
|
s0 = peg$currPos;
|
|
2103
2258
|
if (input.charCodeAt(peg$currPos) === 123) {
|
|
2104
|
-
s1 = peg$
|
|
2259
|
+
s1 = peg$c5;
|
|
2105
2260
|
peg$currPos++;
|
|
2106
2261
|
} else {
|
|
2107
2262
|
s1 = peg$FAILED;
|
|
2108
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
2263
|
+
if (peg$silentFails === 0) peg$fail(peg$e8);
|
|
2109
2264
|
}
|
|
2110
2265
|
if (s1 !== peg$FAILED) {
|
|
2111
2266
|
s2 = peg$parseSelectors();
|
|
@@ -2114,7 +2269,7 @@ function peg$parse(input, options) {
|
|
|
2114
2269
|
if (peg$r5.test(s3)) peg$currPos++;
|
|
2115
2270
|
else {
|
|
2116
2271
|
s3 = peg$FAILED;
|
|
2117
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
2272
|
+
if (peg$silentFails === 0) peg$fail(peg$e17);
|
|
2118
2273
|
}
|
|
2119
2274
|
if (s3 !== peg$FAILED) {
|
|
2120
2275
|
s4 = peg$currPos;
|
|
@@ -2123,7 +2278,7 @@ function peg$parse(input, options) {
|
|
|
2123
2278
|
if (peg$r6.test(s6)) peg$currPos++;
|
|
2124
2279
|
else {
|
|
2125
2280
|
s6 = peg$FAILED;
|
|
2126
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
2281
|
+
if (peg$silentFails === 0) peg$fail(peg$e18);
|
|
2127
2282
|
}
|
|
2128
2283
|
while (s6 !== peg$FAILED) {
|
|
2129
2284
|
s5.push(s6);
|
|
@@ -2131,20 +2286,20 @@ function peg$parse(input, options) {
|
|
|
2131
2286
|
if (peg$r6.test(s6)) peg$currPos++;
|
|
2132
2287
|
else {
|
|
2133
2288
|
s6 = peg$FAILED;
|
|
2134
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
2289
|
+
if (peg$silentFails === 0) peg$fail(peg$e18);
|
|
2135
2290
|
}
|
|
2136
2291
|
}
|
|
2137
2292
|
s4 = input.substring(s4, peg$currPos);
|
|
2138
2293
|
if (input.charCodeAt(peg$currPos) === 125) {
|
|
2139
|
-
s5 = peg$
|
|
2294
|
+
s5 = peg$c11;
|
|
2140
2295
|
peg$currPos++;
|
|
2141
2296
|
} else {
|
|
2142
2297
|
s5 = peg$FAILED;
|
|
2143
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
2298
|
+
if (peg$silentFails === 0) peg$fail(peg$e19);
|
|
2144
2299
|
}
|
|
2145
2300
|
if (s5 !== peg$FAILED) {
|
|
2146
2301
|
peg$savedPos = s0;
|
|
2147
|
-
s0 = peg$
|
|
2302
|
+
s0 = peg$f57(s2, s3, s4);
|
|
2148
2303
|
} else {
|
|
2149
2304
|
peg$currPos = s0;
|
|
2150
2305
|
s0 = peg$FAILED;
|
|
@@ -2164,11 +2319,11 @@ function peg$parse(input, options) {
|
|
|
2164
2319
|
if (s0 === peg$FAILED) {
|
|
2165
2320
|
s0 = peg$currPos;
|
|
2166
2321
|
if (input.charCodeAt(peg$currPos) === 123) {
|
|
2167
|
-
s1 = peg$
|
|
2322
|
+
s1 = peg$c5;
|
|
2168
2323
|
peg$currPos++;
|
|
2169
2324
|
} else {
|
|
2170
2325
|
s1 = peg$FAILED;
|
|
2171
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
2326
|
+
if (peg$silentFails === 0) peg$fail(peg$e8);
|
|
2172
2327
|
}
|
|
2173
2328
|
if (s1 !== peg$FAILED) {
|
|
2174
2329
|
s2 = peg$parseSelectors();
|
|
@@ -2179,7 +2334,7 @@ function peg$parse(input, options) {
|
|
|
2179
2334
|
if (peg$r7.test(s4)) peg$currPos++;
|
|
2180
2335
|
else {
|
|
2181
2336
|
s4 = peg$FAILED;
|
|
2182
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
2337
|
+
if (peg$silentFails === 0) peg$fail(peg$e20);
|
|
2183
2338
|
}
|
|
2184
2339
|
peg$silentFails--;
|
|
2185
2340
|
if (s4 !== peg$FAILED) {
|
|
@@ -2190,15 +2345,15 @@ function peg$parse(input, options) {
|
|
|
2190
2345
|
s4 = peg$parseCodeToBrace();
|
|
2191
2346
|
if (s4 !== peg$FAILED) {
|
|
2192
2347
|
if (input.charCodeAt(peg$currPos) === 125) {
|
|
2193
|
-
s5 = peg$
|
|
2348
|
+
s5 = peg$c11;
|
|
2194
2349
|
peg$currPos++;
|
|
2195
2350
|
} else {
|
|
2196
2351
|
s5 = peg$FAILED;
|
|
2197
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
2352
|
+
if (peg$silentFails === 0) peg$fail(peg$e19);
|
|
2198
2353
|
}
|
|
2199
2354
|
if (s5 !== peg$FAILED) {
|
|
2200
2355
|
peg$savedPos = s0;
|
|
2201
|
-
s0 = peg$
|
|
2356
|
+
s0 = peg$f58(s2, s4);
|
|
2202
2357
|
} else {
|
|
2203
2358
|
peg$currPos = s0;
|
|
2204
2359
|
s0 = peg$FAILED;
|
|
@@ -2222,11 +2377,11 @@ function peg$parse(input, options) {
|
|
|
2222
2377
|
if (s0 === peg$FAILED) {
|
|
2223
2378
|
s0 = peg$currPos;
|
|
2224
2379
|
if (input.charCodeAt(peg$currPos) === 123) {
|
|
2225
|
-
s1 = peg$
|
|
2380
|
+
s1 = peg$c5;
|
|
2226
2381
|
peg$currPos++;
|
|
2227
2382
|
} else {
|
|
2228
2383
|
s1 = peg$FAILED;
|
|
2229
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
2384
|
+
if (peg$silentFails === 0) peg$fail(peg$e8);
|
|
2230
2385
|
}
|
|
2231
2386
|
if (s1 !== peg$FAILED) {
|
|
2232
2387
|
s2 = peg$parseSelectors();
|
|
@@ -2237,7 +2392,7 @@ function peg$parse(input, options) {
|
|
|
2237
2392
|
if (peg$r7.test(s4)) peg$currPos++;
|
|
2238
2393
|
else {
|
|
2239
2394
|
s4 = peg$FAILED;
|
|
2240
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
2395
|
+
if (peg$silentFails === 0) peg$fail(peg$e20);
|
|
2241
2396
|
}
|
|
2242
2397
|
peg$silentFails--;
|
|
2243
2398
|
if (s4 !== peg$FAILED) {
|
|
@@ -2246,7 +2401,7 @@ function peg$parse(input, options) {
|
|
|
2246
2401
|
} else s3 = peg$FAILED;
|
|
2247
2402
|
if (s3 !== peg$FAILED) {
|
|
2248
2403
|
peg$savedPos = s0;
|
|
2249
|
-
s0 = peg$
|
|
2404
|
+
s0 = peg$f59();
|
|
2250
2405
|
} else {
|
|
2251
2406
|
peg$currPos = s0;
|
|
2252
2407
|
s0 = peg$FAILED;
|
|
@@ -2268,12 +2423,12 @@ function peg$parse(input, options) {
|
|
|
2268
2423
|
s0 = peg$currPos;
|
|
2269
2424
|
s1 = peg$parseHere();
|
|
2270
2425
|
peg$savedPos = peg$currPos;
|
|
2271
|
-
s2 = peg$
|
|
2426
|
+
s2 = peg$f60(s1);
|
|
2272
2427
|
if (s2) s2 = void 0;
|
|
2273
2428
|
else s2 = peg$FAILED;
|
|
2274
2429
|
if (s2 !== peg$FAILED) {
|
|
2275
2430
|
s3 = peg$currPos;
|
|
2276
|
-
s4 = peg$
|
|
2431
|
+
s4 = peg$f61(s1);
|
|
2277
2432
|
s5 = peg$currPos;
|
|
2278
2433
|
s6 = [];
|
|
2279
2434
|
if (s6.length >= (s4 | 0)) s7 = peg$FAILED;
|
|
@@ -2304,7 +2459,7 @@ function peg$parse(input, options) {
|
|
|
2304
2459
|
else s3 = s4;
|
|
2305
2460
|
if (s3 !== peg$FAILED) {
|
|
2306
2461
|
peg$savedPos = s0;
|
|
2307
|
-
s0 = peg$
|
|
2462
|
+
s0 = peg$f62(s1, s3);
|
|
2308
2463
|
} else {
|
|
2309
2464
|
peg$currPos = s0;
|
|
2310
2465
|
s0 = peg$FAILED;
|
|
@@ -2319,22 +2474,22 @@ function peg$parse(input, options) {
|
|
|
2319
2474
|
let s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13;
|
|
2320
2475
|
s0 = peg$currPos;
|
|
2321
2476
|
if (input.charCodeAt(peg$currPos) === 123) {
|
|
2322
|
-
s1 = peg$
|
|
2477
|
+
s1 = peg$c5;
|
|
2323
2478
|
peg$currPos++;
|
|
2324
2479
|
} else {
|
|
2325
2480
|
s1 = peg$FAILED;
|
|
2326
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
2481
|
+
if (peg$silentFails === 0) peg$fail(peg$e8);
|
|
2327
2482
|
}
|
|
2328
2483
|
if (s1 !== peg$FAILED) {
|
|
2329
2484
|
s2 = peg$parseSelectors();
|
|
2330
2485
|
if (s2 !== peg$FAILED) {
|
|
2331
2486
|
s3 = peg$parseHere();
|
|
2332
2487
|
if (input.charCodeAt(peg$currPos) === 47) {
|
|
2333
|
-
s4 = peg$
|
|
2488
|
+
s4 = peg$c12;
|
|
2334
2489
|
peg$currPos++;
|
|
2335
2490
|
} else {
|
|
2336
2491
|
s4 = peg$FAILED;
|
|
2337
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
2492
|
+
if (peg$silentFails === 0) peg$fail(peg$e21);
|
|
2338
2493
|
}
|
|
2339
2494
|
if (s4 === peg$FAILED) s4 = null;
|
|
2340
2495
|
s5 = peg$parseMacroName();
|
|
@@ -2342,12 +2497,12 @@ function peg$parse(input, options) {
|
|
|
2342
2497
|
s6 = peg$parseHere();
|
|
2343
2498
|
s7 = peg$currPos;
|
|
2344
2499
|
peg$savedPos = peg$currPos;
|
|
2345
|
-
s8 = peg$
|
|
2500
|
+
s8 = peg$f63(s2, s3, s4, s5, s6);
|
|
2346
2501
|
if (s8) s8 = void 0;
|
|
2347
2502
|
else s8 = peg$FAILED;
|
|
2348
2503
|
if (s8 !== peg$FAILED) {
|
|
2349
2504
|
s9 = peg$currPos;
|
|
2350
|
-
s10 = peg$
|
|
2505
|
+
s10 = peg$f64(s2, s3, s4, s5, s6);
|
|
2351
2506
|
s11 = peg$currPos;
|
|
2352
2507
|
s12 = [];
|
|
2353
2508
|
if (s12.length >= (s10 | 0)) s13 = peg$FAILED;
|
|
@@ -2378,15 +2533,15 @@ function peg$parse(input, options) {
|
|
|
2378
2533
|
else s9 = s10;
|
|
2379
2534
|
if (s9 !== peg$FAILED) {
|
|
2380
2535
|
if (input.charCodeAt(peg$currPos) === 125) {
|
|
2381
|
-
s10 = peg$
|
|
2536
|
+
s10 = peg$c11;
|
|
2382
2537
|
peg$currPos++;
|
|
2383
2538
|
} else {
|
|
2384
2539
|
s10 = peg$FAILED;
|
|
2385
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
2540
|
+
if (peg$silentFails === 0) peg$fail(peg$e19);
|
|
2386
2541
|
}
|
|
2387
2542
|
if (s10 !== peg$FAILED) {
|
|
2388
2543
|
peg$savedPos = s7;
|
|
2389
|
-
s7 = peg$
|
|
2544
|
+
s7 = peg$f65(s2, s3, s4, s5, s6, s9);
|
|
2390
2545
|
} else {
|
|
2391
2546
|
peg$currPos = s7;
|
|
2392
2547
|
s7 = peg$FAILED;
|
|
@@ -2401,7 +2556,7 @@ function peg$parse(input, options) {
|
|
|
2401
2556
|
}
|
|
2402
2557
|
if (s7 === peg$FAILED) s7 = null;
|
|
2403
2558
|
peg$savedPos = s0;
|
|
2404
|
-
s0 = peg$
|
|
2559
|
+
s0 = peg$f66(s2, s3, s4, s5, s6, s7);
|
|
2405
2560
|
} else {
|
|
2406
2561
|
peg$currPos = s0;
|
|
2407
2562
|
s0 = peg$FAILED;
|
|
@@ -2417,25 +2572,25 @@ function peg$parse(input, options) {
|
|
|
2417
2572
|
if (s0 === peg$FAILED) {
|
|
2418
2573
|
s0 = peg$currPos;
|
|
2419
2574
|
if (input.charCodeAt(peg$currPos) === 123) {
|
|
2420
|
-
s1 = peg$
|
|
2575
|
+
s1 = peg$c5;
|
|
2421
2576
|
peg$currPos++;
|
|
2422
2577
|
} else {
|
|
2423
2578
|
s1 = peg$FAILED;
|
|
2424
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
2579
|
+
if (peg$silentFails === 0) peg$fail(peg$e8);
|
|
2425
2580
|
}
|
|
2426
2581
|
if (s1 !== peg$FAILED) {
|
|
2427
2582
|
s2 = peg$parseSelectors();
|
|
2428
2583
|
if (s2 !== peg$FAILED) {
|
|
2429
2584
|
if (input.charCodeAt(peg$currPos) === 47) {
|
|
2430
|
-
s3 = peg$
|
|
2585
|
+
s3 = peg$c12;
|
|
2431
2586
|
peg$currPos++;
|
|
2432
2587
|
} else {
|
|
2433
2588
|
s3 = peg$FAILED;
|
|
2434
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
2589
|
+
if (peg$silentFails === 0) peg$fail(peg$e21);
|
|
2435
2590
|
}
|
|
2436
2591
|
if (s3 !== peg$FAILED) {
|
|
2437
2592
|
peg$savedPos = s0;
|
|
2438
|
-
s0 = peg$
|
|
2593
|
+
s0 = peg$f67(s2);
|
|
2439
2594
|
} else {
|
|
2440
2595
|
peg$currPos = s0;
|
|
2441
2596
|
s0 = peg$FAILED;
|
|
@@ -2459,7 +2614,7 @@ function peg$parse(input, options) {
|
|
|
2459
2614
|
if (peg$r8.test(s2)) peg$currPos++;
|
|
2460
2615
|
else {
|
|
2461
2616
|
s2 = peg$FAILED;
|
|
2462
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
2617
|
+
if (peg$silentFails === 0) peg$fail(peg$e22);
|
|
2463
2618
|
}
|
|
2464
2619
|
if (s2 !== peg$FAILED) {
|
|
2465
2620
|
s3 = [];
|
|
@@ -2467,7 +2622,7 @@ function peg$parse(input, options) {
|
|
|
2467
2622
|
if (peg$r9.test(s4)) peg$currPos++;
|
|
2468
2623
|
else {
|
|
2469
2624
|
s4 = peg$FAILED;
|
|
2470
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
2625
|
+
if (peg$silentFails === 0) peg$fail(peg$e23);
|
|
2471
2626
|
}
|
|
2472
2627
|
while (s4 !== peg$FAILED) {
|
|
2473
2628
|
s3.push(s4);
|
|
@@ -2475,7 +2630,7 @@ function peg$parse(input, options) {
|
|
|
2475
2630
|
if (peg$r9.test(s4)) peg$currPos++;
|
|
2476
2631
|
else {
|
|
2477
2632
|
s4 = peg$FAILED;
|
|
2478
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
2633
|
+
if (peg$silentFails === 0) peg$fail(peg$e23);
|
|
2479
2634
|
}
|
|
2480
2635
|
}
|
|
2481
2636
|
s2 = [s2, s3];
|
|
@@ -2492,19 +2647,19 @@ function peg$parse(input, options) {
|
|
|
2492
2647
|
let s0, s1, s2, s3;
|
|
2493
2648
|
s0 = peg$currPos;
|
|
2494
2649
|
peg$savedPos = peg$currPos;
|
|
2495
|
-
s1 = peg$
|
|
2650
|
+
s1 = peg$f68();
|
|
2496
2651
|
if (s1) s1 = void 0;
|
|
2497
2652
|
else s1 = peg$FAILED;
|
|
2498
2653
|
if (s1 !== peg$FAILED) {
|
|
2499
2654
|
s2 = peg$parseHtmlClose();
|
|
2500
2655
|
if (s2 !== peg$FAILED) {
|
|
2501
2656
|
peg$savedPos = peg$currPos;
|
|
2502
|
-
s3 = peg$
|
|
2657
|
+
s3 = peg$f69(s2);
|
|
2503
2658
|
if (s3) s3 = void 0;
|
|
2504
2659
|
else s3 = peg$FAILED;
|
|
2505
2660
|
if (s3 !== peg$FAILED) {
|
|
2506
2661
|
peg$savedPos = s0;
|
|
2507
|
-
s0 = peg$
|
|
2662
|
+
s0 = peg$f70(s2);
|
|
2508
2663
|
} else {
|
|
2509
2664
|
peg$currPos = s0;
|
|
2510
2665
|
s0 = peg$FAILED;
|
|
@@ -2523,11 +2678,11 @@ function peg$parse(input, options) {
|
|
|
2523
2678
|
let s0, s1, s2, s3, s4, s5, s6;
|
|
2524
2679
|
s0 = peg$currPos;
|
|
2525
2680
|
if (input.charCodeAt(peg$currPos) === 60) {
|
|
2526
|
-
s1 = peg$
|
|
2681
|
+
s1 = peg$c6;
|
|
2527
2682
|
peg$currPos++;
|
|
2528
2683
|
} else {
|
|
2529
2684
|
s1 = peg$FAILED;
|
|
2530
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
2685
|
+
if (peg$silentFails === 0) peg$fail(peg$e10);
|
|
2531
2686
|
}
|
|
2532
2687
|
if (s1 !== peg$FAILED) {
|
|
2533
2688
|
s2 = peg$parseTagName();
|
|
@@ -2540,23 +2695,23 @@ function peg$parse(input, options) {
|
|
|
2540
2695
|
}
|
|
2541
2696
|
s4 = peg$parse_();
|
|
2542
2697
|
if (input.charCodeAt(peg$currPos) === 47) {
|
|
2543
|
-
s5 = peg$
|
|
2698
|
+
s5 = peg$c12;
|
|
2544
2699
|
peg$currPos++;
|
|
2545
2700
|
} else {
|
|
2546
2701
|
s5 = peg$FAILED;
|
|
2547
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
2702
|
+
if (peg$silentFails === 0) peg$fail(peg$e21);
|
|
2548
2703
|
}
|
|
2549
2704
|
if (s5 === peg$FAILED) s5 = null;
|
|
2550
2705
|
if (input.charCodeAt(peg$currPos) === 62) {
|
|
2551
|
-
s6 = peg$
|
|
2706
|
+
s6 = peg$c1;
|
|
2552
2707
|
peg$currPos++;
|
|
2553
2708
|
} else {
|
|
2554
2709
|
s6 = peg$FAILED;
|
|
2555
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
2710
|
+
if (peg$silentFails === 0) peg$fail(peg$e3);
|
|
2556
2711
|
}
|
|
2557
2712
|
if (s6 !== peg$FAILED) {
|
|
2558
2713
|
peg$savedPos = s0;
|
|
2559
|
-
s0 = peg$
|
|
2714
|
+
s0 = peg$f71(s2, s3, s5);
|
|
2560
2715
|
} else {
|
|
2561
2716
|
peg$currPos = s0;
|
|
2562
2717
|
s0 = peg$FAILED;
|
|
@@ -2572,11 +2727,11 @@ function peg$parse(input, options) {
|
|
|
2572
2727
|
if (s0 === peg$FAILED) {
|
|
2573
2728
|
s0 = peg$currPos;
|
|
2574
2729
|
if (input.charCodeAt(peg$currPos) === 60) {
|
|
2575
|
-
s1 = peg$
|
|
2730
|
+
s1 = peg$c6;
|
|
2576
2731
|
peg$currPos++;
|
|
2577
2732
|
} else {
|
|
2578
2733
|
s1 = peg$FAILED;
|
|
2579
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
2734
|
+
if (peg$silentFails === 0) peg$fail(peg$e10);
|
|
2580
2735
|
}
|
|
2581
2736
|
if (s1 !== peg$FAILED) {
|
|
2582
2737
|
s2 = peg$parseTagName();
|
|
@@ -2587,7 +2742,7 @@ function peg$parse(input, options) {
|
|
|
2587
2742
|
if (peg$r10.test(s4)) peg$currPos++;
|
|
2588
2743
|
else {
|
|
2589
2744
|
s4 = peg$FAILED;
|
|
2590
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
2745
|
+
if (peg$silentFails === 0) peg$fail(peg$e24);
|
|
2591
2746
|
}
|
|
2592
2747
|
if (s4 === peg$FAILED) {
|
|
2593
2748
|
s4 = peg$currPos;
|
|
@@ -2621,7 +2776,7 @@ function peg$parse(input, options) {
|
|
|
2621
2776
|
s5 = peg$parse_();
|
|
2622
2777
|
s6 = peg$parseHere();
|
|
2623
2778
|
peg$savedPos = s0;
|
|
2624
|
-
s0 = peg$
|
|
2779
|
+
s0 = peg$f72(s2, s6);
|
|
2625
2780
|
} else {
|
|
2626
2781
|
peg$currPos = s0;
|
|
2627
2782
|
s0 = peg$FAILED;
|
|
@@ -2640,27 +2795,27 @@ function peg$parse(input, options) {
|
|
|
2640
2795
|
function peg$parseHtmlClose() {
|
|
2641
2796
|
let s0, s1, s2, s4;
|
|
2642
2797
|
s0 = peg$currPos;
|
|
2643
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
2644
|
-
s1 = peg$
|
|
2798
|
+
if (input.substr(peg$currPos, 2) === peg$c13) {
|
|
2799
|
+
s1 = peg$c13;
|
|
2645
2800
|
peg$currPos += 2;
|
|
2646
2801
|
} else {
|
|
2647
2802
|
s1 = peg$FAILED;
|
|
2648
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
2803
|
+
if (peg$silentFails === 0) peg$fail(peg$e25);
|
|
2649
2804
|
}
|
|
2650
2805
|
if (s1 !== peg$FAILED) {
|
|
2651
2806
|
s2 = peg$parseTagName();
|
|
2652
2807
|
if (s2 !== peg$FAILED) {
|
|
2653
2808
|
peg$parse_();
|
|
2654
2809
|
if (input.charCodeAt(peg$currPos) === 62) {
|
|
2655
|
-
s4 = peg$
|
|
2810
|
+
s4 = peg$c1;
|
|
2656
2811
|
peg$currPos++;
|
|
2657
2812
|
} else {
|
|
2658
2813
|
s4 = peg$FAILED;
|
|
2659
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
2814
|
+
if (peg$silentFails === 0) peg$fail(peg$e3);
|
|
2660
2815
|
}
|
|
2661
2816
|
if (s4 !== peg$FAILED) {
|
|
2662
2817
|
peg$savedPos = s0;
|
|
2663
|
-
s0 = peg$
|
|
2818
|
+
s0 = peg$f73(s2);
|
|
2664
2819
|
} else {
|
|
2665
2820
|
peg$currPos = s0;
|
|
2666
2821
|
s0 = peg$FAILED;
|
|
@@ -2683,7 +2838,7 @@ function peg$parse(input, options) {
|
|
|
2683
2838
|
if (peg$r8.test(s2)) peg$currPos++;
|
|
2684
2839
|
else {
|
|
2685
2840
|
s2 = peg$FAILED;
|
|
2686
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
2841
|
+
if (peg$silentFails === 0) peg$fail(peg$e22);
|
|
2687
2842
|
}
|
|
2688
2843
|
if (s2 !== peg$FAILED) {
|
|
2689
2844
|
s3 = [];
|
|
@@ -2691,7 +2846,7 @@ function peg$parse(input, options) {
|
|
|
2691
2846
|
if (peg$r11.test(s4)) peg$currPos++;
|
|
2692
2847
|
else {
|
|
2693
2848
|
s4 = peg$FAILED;
|
|
2694
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
2849
|
+
if (peg$silentFails === 0) peg$fail(peg$e26);
|
|
2695
2850
|
}
|
|
2696
2851
|
while (s4 !== peg$FAILED) {
|
|
2697
2852
|
s3.push(s4);
|
|
@@ -2699,7 +2854,7 @@ function peg$parse(input, options) {
|
|
|
2699
2854
|
if (peg$r11.test(s4)) peg$currPos++;
|
|
2700
2855
|
else {
|
|
2701
2856
|
s4 = peg$FAILED;
|
|
2702
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
2857
|
+
if (peg$silentFails === 0) peg$fail(peg$e26);
|
|
2703
2858
|
}
|
|
2704
2859
|
}
|
|
2705
2860
|
s2 = [s2, s3];
|
|
@@ -2725,7 +2880,7 @@ function peg$parse(input, options) {
|
|
|
2725
2880
|
if (peg$r12.test(s6)) peg$currPos++;
|
|
2726
2881
|
else {
|
|
2727
2882
|
s6 = peg$FAILED;
|
|
2728
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
2883
|
+
if (peg$silentFails === 0) peg$fail(peg$e27);
|
|
2729
2884
|
}
|
|
2730
2885
|
peg$silentFails--;
|
|
2731
2886
|
if (s6 === peg$FAILED) s5 = void 0;
|
|
@@ -2761,7 +2916,7 @@ function peg$parse(input, options) {
|
|
|
2761
2916
|
if (peg$r12.test(s6)) peg$currPos++;
|
|
2762
2917
|
else {
|
|
2763
2918
|
s6 = peg$FAILED;
|
|
2764
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
2919
|
+
if (peg$silentFails === 0) peg$fail(peg$e27);
|
|
2765
2920
|
}
|
|
2766
2921
|
peg$silentFails--;
|
|
2767
2922
|
if (s6 === peg$FAILED) s5 = void 0;
|
|
@@ -2794,25 +2949,25 @@ function peg$parse(input, options) {
|
|
|
2794
2949
|
else s2 = s3;
|
|
2795
2950
|
if (s2 !== peg$FAILED) {
|
|
2796
2951
|
peg$savedPos = peg$currPos;
|
|
2797
|
-
s3 = peg$
|
|
2952
|
+
s3 = peg$f74(s2);
|
|
2798
2953
|
if (s3) s3 = void 0;
|
|
2799
2954
|
else s3 = peg$FAILED;
|
|
2800
2955
|
if (s3 !== peg$FAILED) {
|
|
2801
2956
|
s4 = peg$currPos;
|
|
2802
2957
|
s5 = peg$parse_();
|
|
2803
2958
|
if (input.charCodeAt(peg$currPos) === 61) {
|
|
2804
|
-
s6 = peg$
|
|
2959
|
+
s6 = peg$c14;
|
|
2805
2960
|
peg$currPos++;
|
|
2806
2961
|
} else {
|
|
2807
2962
|
s6 = peg$FAILED;
|
|
2808
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
2963
|
+
if (peg$silentFails === 0) peg$fail(peg$e28);
|
|
2809
2964
|
}
|
|
2810
2965
|
if (s6 !== peg$FAILED) {
|
|
2811
2966
|
peg$parse_();
|
|
2812
2967
|
s8 = peg$parseAttrValue();
|
|
2813
2968
|
if (s8 !== peg$FAILED) {
|
|
2814
2969
|
peg$savedPos = s4;
|
|
2815
|
-
s4 = peg$
|
|
2970
|
+
s4 = peg$f75(s2, s8);
|
|
2816
2971
|
} else {
|
|
2817
2972
|
peg$currPos = s4;
|
|
2818
2973
|
s4 = peg$FAILED;
|
|
@@ -2823,7 +2978,7 @@ function peg$parse(input, options) {
|
|
|
2823
2978
|
}
|
|
2824
2979
|
if (s4 === peg$FAILED) s4 = null;
|
|
2825
2980
|
peg$savedPos = s0;
|
|
2826
|
-
s0 = peg$
|
|
2981
|
+
s0 = peg$f76(s2, s4);
|
|
2827
2982
|
} else {
|
|
2828
2983
|
peg$currPos = s0;
|
|
2829
2984
|
s0 = peg$FAILED;
|
|
@@ -2838,11 +2993,11 @@ function peg$parse(input, options) {
|
|
|
2838
2993
|
let s0, s1, s2, s3, s4;
|
|
2839
2994
|
s0 = peg$currPos;
|
|
2840
2995
|
if (input.charCodeAt(peg$currPos) === 34) {
|
|
2841
|
-
s1 = peg$
|
|
2996
|
+
s1 = peg$c15;
|
|
2842
2997
|
peg$currPos++;
|
|
2843
2998
|
} else {
|
|
2844
2999
|
s1 = peg$FAILED;
|
|
2845
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
3000
|
+
if (peg$silentFails === 0) peg$fail(peg$e29);
|
|
2846
3001
|
}
|
|
2847
3002
|
if (s1 !== peg$FAILED) {
|
|
2848
3003
|
s2 = peg$currPos;
|
|
@@ -2853,7 +3008,7 @@ function peg$parse(input, options) {
|
|
|
2853
3008
|
if (peg$r13.test(s4)) peg$currPos++;
|
|
2854
3009
|
else {
|
|
2855
3010
|
s4 = peg$FAILED;
|
|
2856
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
3011
|
+
if (peg$silentFails === 0) peg$fail(peg$e30);
|
|
2857
3012
|
}
|
|
2858
3013
|
}
|
|
2859
3014
|
while (s4 !== peg$FAILED) {
|
|
@@ -2864,21 +3019,21 @@ function peg$parse(input, options) {
|
|
|
2864
3019
|
if (peg$r13.test(s4)) peg$currPos++;
|
|
2865
3020
|
else {
|
|
2866
3021
|
s4 = peg$FAILED;
|
|
2867
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
3022
|
+
if (peg$silentFails === 0) peg$fail(peg$e30);
|
|
2868
3023
|
}
|
|
2869
3024
|
}
|
|
2870
3025
|
}
|
|
2871
3026
|
s2 = input.substring(s2, peg$currPos);
|
|
2872
3027
|
if (input.charCodeAt(peg$currPos) === 34) {
|
|
2873
|
-
s3 = peg$
|
|
3028
|
+
s3 = peg$c15;
|
|
2874
3029
|
peg$currPos++;
|
|
2875
3030
|
} else {
|
|
2876
3031
|
s3 = peg$FAILED;
|
|
2877
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
3032
|
+
if (peg$silentFails === 0) peg$fail(peg$e29);
|
|
2878
3033
|
}
|
|
2879
3034
|
if (s3 !== peg$FAILED) {
|
|
2880
3035
|
peg$savedPos = s0;
|
|
2881
|
-
s0 = peg$
|
|
3036
|
+
s0 = peg$f77(s2);
|
|
2882
3037
|
} else {
|
|
2883
3038
|
peg$currPos = s0;
|
|
2884
3039
|
s0 = peg$FAILED;
|
|
@@ -2890,11 +3045,11 @@ function peg$parse(input, options) {
|
|
|
2890
3045
|
if (s0 === peg$FAILED) {
|
|
2891
3046
|
s0 = peg$currPos;
|
|
2892
3047
|
if (input.charCodeAt(peg$currPos) === 39) {
|
|
2893
|
-
s1 = peg$
|
|
3048
|
+
s1 = peg$c16;
|
|
2894
3049
|
peg$currPos++;
|
|
2895
3050
|
} else {
|
|
2896
3051
|
s1 = peg$FAILED;
|
|
2897
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
3052
|
+
if (peg$silentFails === 0) peg$fail(peg$e31);
|
|
2898
3053
|
}
|
|
2899
3054
|
if (s1 !== peg$FAILED) {
|
|
2900
3055
|
s2 = peg$currPos;
|
|
@@ -2905,7 +3060,7 @@ function peg$parse(input, options) {
|
|
|
2905
3060
|
if (peg$r14.test(s4)) peg$currPos++;
|
|
2906
3061
|
else {
|
|
2907
3062
|
s4 = peg$FAILED;
|
|
2908
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
3063
|
+
if (peg$silentFails === 0) peg$fail(peg$e32);
|
|
2909
3064
|
}
|
|
2910
3065
|
}
|
|
2911
3066
|
while (s4 !== peg$FAILED) {
|
|
@@ -2916,21 +3071,21 @@ function peg$parse(input, options) {
|
|
|
2916
3071
|
if (peg$r14.test(s4)) peg$currPos++;
|
|
2917
3072
|
else {
|
|
2918
3073
|
s4 = peg$FAILED;
|
|
2919
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
3074
|
+
if (peg$silentFails === 0) peg$fail(peg$e32);
|
|
2920
3075
|
}
|
|
2921
3076
|
}
|
|
2922
3077
|
}
|
|
2923
3078
|
s2 = input.substring(s2, peg$currPos);
|
|
2924
3079
|
if (input.charCodeAt(peg$currPos) === 39) {
|
|
2925
|
-
s3 = peg$
|
|
3080
|
+
s3 = peg$c16;
|
|
2926
3081
|
peg$currPos++;
|
|
2927
3082
|
} else {
|
|
2928
3083
|
s3 = peg$FAILED;
|
|
2929
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
3084
|
+
if (peg$silentFails === 0) peg$fail(peg$e31);
|
|
2930
3085
|
}
|
|
2931
3086
|
if (s3 !== peg$FAILED) {
|
|
2932
3087
|
peg$savedPos = s0;
|
|
2933
|
-
s0 = peg$
|
|
3088
|
+
s0 = peg$f78(s2);
|
|
2934
3089
|
} else {
|
|
2935
3090
|
peg$currPos = s0;
|
|
2936
3091
|
s0 = peg$FAILED;
|
|
@@ -2945,11 +3100,11 @@ function peg$parse(input, options) {
|
|
|
2945
3100
|
if (peg$r15.test(s1)) peg$currPos++;
|
|
2946
3101
|
else {
|
|
2947
3102
|
s1 = peg$FAILED;
|
|
2948
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
3103
|
+
if (peg$silentFails === 0) peg$fail(peg$e33);
|
|
2949
3104
|
}
|
|
2950
3105
|
if (s1 !== peg$FAILED) {
|
|
2951
3106
|
peg$savedPos = s0;
|
|
2952
|
-
s1 = peg$
|
|
3107
|
+
s1 = peg$f79(s1);
|
|
2953
3108
|
}
|
|
2954
3109
|
s0 = s1;
|
|
2955
3110
|
if (s0 === peg$FAILED) {
|
|
@@ -2959,7 +3114,7 @@ function peg$parse(input, options) {
|
|
|
2959
3114
|
if (peg$r16.test(s2)) peg$currPos++;
|
|
2960
3115
|
else {
|
|
2961
3116
|
s2 = peg$FAILED;
|
|
2962
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
3117
|
+
if (peg$silentFails === 0) peg$fail(peg$e34);
|
|
2963
3118
|
}
|
|
2964
3119
|
while (s2 !== peg$FAILED) {
|
|
2965
3120
|
s1.push(s2);
|
|
@@ -2967,7 +3122,7 @@ function peg$parse(input, options) {
|
|
|
2967
3122
|
if (peg$r16.test(s2)) peg$currPos++;
|
|
2968
3123
|
else {
|
|
2969
3124
|
s2 = peg$FAILED;
|
|
2970
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
3125
|
+
if (peg$silentFails === 0) peg$fail(peg$e34);
|
|
2971
3126
|
}
|
|
2972
3127
|
}
|
|
2973
3128
|
s0 = input.substring(s0, peg$currPos);
|
|
@@ -2980,27 +3135,27 @@ function peg$parse(input, options) {
|
|
|
2980
3135
|
let s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13;
|
|
2981
3136
|
s0 = peg$currPos;
|
|
2982
3137
|
peg$savedPos = peg$currPos;
|
|
2983
|
-
s1 = peg$
|
|
3138
|
+
s1 = peg$f80();
|
|
2984
3139
|
if (s1) s1 = void 0;
|
|
2985
3140
|
else s1 = peg$FAILED;
|
|
2986
3141
|
if (s1 !== peg$FAILED) {
|
|
2987
3142
|
s2 = peg$currPos;
|
|
2988
3143
|
s3 = [];
|
|
2989
3144
|
if (input.charCodeAt(peg$currPos) === 92) {
|
|
2990
|
-
s4 = peg$
|
|
3145
|
+
s4 = peg$c4;
|
|
2991
3146
|
peg$currPos++;
|
|
2992
3147
|
} else {
|
|
2993
3148
|
s4 = peg$FAILED;
|
|
2994
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
3149
|
+
if (peg$silentFails === 0) peg$fail(peg$e6);
|
|
2995
3150
|
}
|
|
2996
3151
|
if (s4 !== peg$FAILED) while (s4 !== peg$FAILED) {
|
|
2997
3152
|
s3.push(s4);
|
|
2998
3153
|
if (input.charCodeAt(peg$currPos) === 92) {
|
|
2999
|
-
s4 = peg$
|
|
3154
|
+
s4 = peg$c4;
|
|
3000
3155
|
peg$currPos++;
|
|
3001
3156
|
} else {
|
|
3002
3157
|
s4 = peg$FAILED;
|
|
3003
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
3158
|
+
if (peg$silentFails === 0) peg$fail(peg$e6);
|
|
3004
3159
|
}
|
|
3005
3160
|
}
|
|
3006
3161
|
else s3 = peg$FAILED;
|
|
@@ -3009,7 +3164,7 @@ function peg$parse(input, options) {
|
|
|
3009
3164
|
if (s2 !== peg$FAILED) {
|
|
3010
3165
|
s3 = peg$currPos;
|
|
3011
3166
|
peg$savedPos = peg$currPos;
|
|
3012
|
-
s4 = peg$
|
|
3167
|
+
s4 = peg$f81(s2);
|
|
3013
3168
|
if (s4) s4 = void 0;
|
|
3014
3169
|
else s4 = peg$FAILED;
|
|
3015
3170
|
if (s4 !== peg$FAILED) {
|
|
@@ -3017,7 +3172,7 @@ function peg$parse(input, options) {
|
|
|
3017
3172
|
if (peg$r1.test(s5)) peg$currPos++;
|
|
3018
3173
|
else {
|
|
3019
3174
|
s5 = peg$FAILED;
|
|
3020
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
3175
|
+
if (peg$silentFails === 0) peg$fail(peg$e7);
|
|
3021
3176
|
}
|
|
3022
3177
|
if (s5 !== peg$FAILED) {
|
|
3023
3178
|
s4 = [s4, s5];
|
|
@@ -3048,39 +3203,39 @@ function peg$parse(input, options) {
|
|
|
3048
3203
|
if (s0 === peg$FAILED) {
|
|
3049
3204
|
s0 = peg$currPos;
|
|
3050
3205
|
peg$savedPos = peg$currPos;
|
|
3051
|
-
s1 = peg$
|
|
3206
|
+
s1 = peg$f82();
|
|
3052
3207
|
if (s1) s1 = void 0;
|
|
3053
3208
|
else s1 = peg$FAILED;
|
|
3054
3209
|
if (s1 !== peg$FAILED) {
|
|
3055
3210
|
if (input.charCodeAt(peg$currPos) === 123) {
|
|
3056
|
-
s2 = peg$
|
|
3211
|
+
s2 = peg$c5;
|
|
3057
3212
|
peg$currPos++;
|
|
3058
3213
|
} else {
|
|
3059
3214
|
s2 = peg$FAILED;
|
|
3060
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
3215
|
+
if (peg$silentFails === 0) peg$fail(peg$e8);
|
|
3061
3216
|
}
|
|
3062
3217
|
if (s2 !== peg$FAILED) {
|
|
3063
3218
|
s3 = peg$parseSelectors();
|
|
3064
3219
|
if (s3 !== peg$FAILED) {
|
|
3065
3220
|
s4 = peg$parseHere();
|
|
3066
3221
|
if (input.charCodeAt(peg$currPos) === 47) {
|
|
3067
|
-
s5 = peg$
|
|
3222
|
+
s5 = peg$c12;
|
|
3068
3223
|
peg$currPos++;
|
|
3069
3224
|
} else {
|
|
3070
3225
|
s5 = peg$FAILED;
|
|
3071
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
3226
|
+
if (peg$silentFails === 0) peg$fail(peg$e21);
|
|
3072
3227
|
}
|
|
3073
3228
|
if (s5 === peg$FAILED) s5 = null;
|
|
3074
3229
|
s6 = peg$parseMacroName();
|
|
3075
3230
|
if (s6 !== peg$FAILED) {
|
|
3076
3231
|
s7 = peg$parseHere();
|
|
3077
3232
|
peg$savedPos = peg$currPos;
|
|
3078
|
-
s8 = peg$
|
|
3233
|
+
s8 = peg$f83(s4, s7);
|
|
3079
3234
|
if (s8) s8 = void 0;
|
|
3080
3235
|
else s8 = peg$FAILED;
|
|
3081
3236
|
if (s8 !== peg$FAILED) {
|
|
3082
3237
|
s9 = peg$currPos;
|
|
3083
|
-
s10 = peg$
|
|
3238
|
+
s10 = peg$f84(s4, s7);
|
|
3084
3239
|
s11 = peg$currPos;
|
|
3085
3240
|
s12 = [];
|
|
3086
3241
|
if (s12.length >= (s10 | 0)) s13 = peg$FAILED;
|
|
@@ -3111,11 +3266,11 @@ function peg$parse(input, options) {
|
|
|
3111
3266
|
else s9 = s10;
|
|
3112
3267
|
if (s9 !== peg$FAILED) {
|
|
3113
3268
|
if (input.charCodeAt(peg$currPos) === 125) {
|
|
3114
|
-
s10 = peg$
|
|
3269
|
+
s10 = peg$c11;
|
|
3115
3270
|
peg$currPos++;
|
|
3116
3271
|
} else {
|
|
3117
3272
|
s10 = peg$FAILED;
|
|
3118
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
3273
|
+
if (peg$silentFails === 0) peg$fail(peg$e19);
|
|
3119
3274
|
}
|
|
3120
3275
|
if (s10 !== peg$FAILED) {
|
|
3121
3276
|
s1 = [
|
|
@@ -3162,16 +3317,16 @@ function peg$parse(input, options) {
|
|
|
3162
3317
|
if (s0 === peg$FAILED) {
|
|
3163
3318
|
s0 = peg$currPos;
|
|
3164
3319
|
peg$savedPos = peg$currPos;
|
|
3165
|
-
s1 = peg$
|
|
3320
|
+
s1 = peg$f85();
|
|
3166
3321
|
if (s1) s1 = void 0;
|
|
3167
3322
|
else s1 = peg$FAILED;
|
|
3168
3323
|
if (s1 !== peg$FAILED) {
|
|
3169
3324
|
if (input.charCodeAt(peg$currPos) === 123) {
|
|
3170
|
-
s2 = peg$
|
|
3325
|
+
s2 = peg$c5;
|
|
3171
3326
|
peg$currPos++;
|
|
3172
3327
|
} else {
|
|
3173
3328
|
s2 = peg$FAILED;
|
|
3174
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
3329
|
+
if (peg$silentFails === 0) peg$fail(peg$e8);
|
|
3175
3330
|
}
|
|
3176
3331
|
if (s2 !== peg$FAILED) {
|
|
3177
3332
|
s3 = peg$parseSelectors();
|
|
@@ -3180,18 +3335,18 @@ function peg$parse(input, options) {
|
|
|
3180
3335
|
peg$silentFails++;
|
|
3181
3336
|
s5 = peg$currPos;
|
|
3182
3337
|
if (input.charCodeAt(peg$currPos) === 47) {
|
|
3183
|
-
s6 = peg$
|
|
3338
|
+
s6 = peg$c12;
|
|
3184
3339
|
peg$currPos++;
|
|
3185
3340
|
} else {
|
|
3186
3341
|
s6 = peg$FAILED;
|
|
3187
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
3342
|
+
if (peg$silentFails === 0) peg$fail(peg$e21);
|
|
3188
3343
|
}
|
|
3189
3344
|
if (s6 === peg$FAILED) s6 = null;
|
|
3190
3345
|
s7 = input.charAt(peg$currPos);
|
|
3191
3346
|
if (peg$r8.test(s7)) peg$currPos++;
|
|
3192
3347
|
else {
|
|
3193
3348
|
s7 = peg$FAILED;
|
|
3194
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
3349
|
+
if (peg$silentFails === 0) peg$fail(peg$e22);
|
|
3195
3350
|
}
|
|
3196
3351
|
if (s7 !== peg$FAILED) {
|
|
3197
3352
|
s6 = [s6, s7];
|
|
@@ -3210,11 +3365,11 @@ function peg$parse(input, options) {
|
|
|
3210
3365
|
s5 = peg$parseCodeToBrace();
|
|
3211
3366
|
if (s5 !== peg$FAILED) {
|
|
3212
3367
|
if (input.charCodeAt(peg$currPos) === 125) {
|
|
3213
|
-
s6 = peg$
|
|
3368
|
+
s6 = peg$c11;
|
|
3214
3369
|
peg$currPos++;
|
|
3215
3370
|
} else {
|
|
3216
3371
|
s6 = peg$FAILED;
|
|
3217
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
3372
|
+
if (peg$silentFails === 0) peg$fail(peg$e19);
|
|
3218
3373
|
}
|
|
3219
3374
|
if (s6 !== peg$FAILED) {
|
|
3220
3375
|
s1 = [
|
|
@@ -3253,16 +3408,16 @@ function peg$parse(input, options) {
|
|
|
3253
3408
|
if (s0 === peg$FAILED) {
|
|
3254
3409
|
s0 = peg$currPos;
|
|
3255
3410
|
peg$savedPos = peg$currPos;
|
|
3256
|
-
s1 = peg$
|
|
3411
|
+
s1 = peg$f86();
|
|
3257
3412
|
if (s1) s1 = void 0;
|
|
3258
3413
|
else s1 = peg$FAILED;
|
|
3259
3414
|
if (s1 !== peg$FAILED) {
|
|
3260
3415
|
if (input.charCodeAt(peg$currPos) === 123) {
|
|
3261
|
-
s2 = peg$
|
|
3416
|
+
s2 = peg$c5;
|
|
3262
3417
|
peg$currPos++;
|
|
3263
3418
|
} else {
|
|
3264
3419
|
s2 = peg$FAILED;
|
|
3265
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
3420
|
+
if (peg$silentFails === 0) peg$fail(peg$e8);
|
|
3266
3421
|
}
|
|
3267
3422
|
if (s2 !== peg$FAILED) {
|
|
3268
3423
|
s3 = peg$currPos;
|
|
@@ -3271,7 +3426,7 @@ function peg$parse(input, options) {
|
|
|
3271
3426
|
if (peg$r5.test(s4)) peg$currPos++;
|
|
3272
3427
|
else {
|
|
3273
3428
|
s4 = peg$FAILED;
|
|
3274
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
3429
|
+
if (peg$silentFails === 0) peg$fail(peg$e17);
|
|
3275
3430
|
}
|
|
3276
3431
|
peg$silentFails--;
|
|
3277
3432
|
if (s4 !== peg$FAILED) {
|
|
@@ -3282,11 +3437,11 @@ function peg$parse(input, options) {
|
|
|
3282
3437
|
s4 = peg$parseCodeToBrace();
|
|
3283
3438
|
if (s4 !== peg$FAILED) {
|
|
3284
3439
|
if (input.charCodeAt(peg$currPos) === 125) {
|
|
3285
|
-
s5 = peg$
|
|
3440
|
+
s5 = peg$c11;
|
|
3286
3441
|
peg$currPos++;
|
|
3287
3442
|
} else {
|
|
3288
3443
|
s5 = peg$FAILED;
|
|
3289
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
3444
|
+
if (peg$silentFails === 0) peg$fail(peg$e19);
|
|
3290
3445
|
}
|
|
3291
3446
|
if (s5 !== peg$FAILED) {
|
|
3292
3447
|
s1 = [
|
|
@@ -3338,7 +3493,7 @@ function peg$parse(input, options) {
|
|
|
3338
3493
|
if (peg$r17.test(s0)) peg$currPos++;
|
|
3339
3494
|
else {
|
|
3340
3495
|
s0 = peg$FAILED;
|
|
3341
|
-
if (peg$silentFails === 0) peg$fail(peg$
|
|
3496
|
+
if (peg$silentFails === 0) peg$fail(peg$e35);
|
|
3342
3497
|
}
|
|
3343
3498
|
return s0;
|
|
3344
3499
|
}
|
|
@@ -8716,7 +8871,7 @@ var OPERAND_ENDS = new Set([
|
|
|
8716
8871
|
* whether a `{` opens a block or an object literal, which decides whether a
|
|
8717
8872
|
* `/` after its `}` opens a regex and a `%` a transient: after the `:` of a
|
|
8718
8873
|
* conditional it opens an object literal (`a ? b : {} / 2`), not a block as
|
|
8719
|
-
* after a label; after a block's `}` it opens another block (`{}{} %n = 1`),
|
|
8874
|
+
* after a label, and a `function` or `class` there is an expression; after a block's `}` it opens another block (`{}{} %n = 1`),
|
|
8720
8875
|
* and so it does on a new line after a statement (`p⏎{} %n = 1`).
|
|
8721
8876
|
*/
|
|
8722
8877
|
var SigilParser = class extends Parser {
|
|
@@ -8729,6 +8884,7 @@ var SigilParser = class extends Parser {
|
|
|
8729
8884
|
this.ternaries = [];
|
|
8730
8885
|
this.colonEndsTernary = false;
|
|
8731
8886
|
this.closedBlock = false;
|
|
8887
|
+
this.typeBeforeLast = types$1.eof;
|
|
8732
8888
|
this.lookahead = true;
|
|
8733
8889
|
}
|
|
8734
8890
|
readToken(code) {
|
|
@@ -8773,6 +8929,11 @@ var SigilParser = class extends Parser {
|
|
|
8773
8929
|
const prevType = self.type;
|
|
8774
8930
|
this.prevValue = self.value;
|
|
8775
8931
|
const property = type.keyword !== void 0 && (prevType === types$1.dot || prevType === types$1.questionDot) || (type === types$1._function || type === types$1._class) && notABody(self.input, self.pos);
|
|
8932
|
+
if (!property && (type === types$1._function || type === types$1._class)) {
|
|
8933
|
+
const before = type === types$1._function && prevType === types$1.name && this.prevValue === "async" && !this.breakHere ? this.typeBeforeLast : prevType;
|
|
8934
|
+
self.type = before === types$1.colon && this.colonEndsTernary ? types$1.parenL : before;
|
|
8935
|
+
}
|
|
8936
|
+
this.typeBeforeLast = prevType;
|
|
8776
8937
|
super.finishToken(property ? types$1.name : type, value);
|
|
8777
8938
|
if (type === types$1.name && value === "of" && (prevType === types$1._const || prevType === types$1._var || this.prevValue === "let")) self.exprAllowed = false;
|
|
8778
8939
|
}
|