MCPcopy Index your code
hub / github.com/pegjs/pegjs / peg$parseGrammar

Function peg$parseGrammar

lib/parser.js:634–715  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

632 }
633
634 function peg$parseGrammar() {
635 var s0, s1, s2, s3, s4, s5, s6;
636
637 s0 = peg$currPos;
638 s1 = peg$parse__();
639 if (s1 !== peg$FAILED) {
640 s2 = peg$currPos;
641 s3 = peg$parseInitializer();
642 if (s3 !== peg$FAILED) {
643 s4 = peg$parse__();
644 if (s4 !== peg$FAILED) {
645 s3 = [s3, s4];
646 s2 = s3;
647 } else {
648 peg$currPos = s2;
649 s2 = peg$FAILED;
650 }
651 } else {
652 peg$currPos = s2;
653 s2 = peg$FAILED;
654 }
655 if (s2 === peg$FAILED) {
656 s2 = null;
657 }
658 if (s2 !== peg$FAILED) {
659 s3 = [];
660 s4 = peg$currPos;
661 s5 = peg$parseRule();
662 if (s5 !== peg$FAILED) {
663 s6 = peg$parse__();
664 if (s6 !== peg$FAILED) {
665 s5 = [s5, s6];
666 s4 = s5;
667 } else {
668 peg$currPos = s4;
669 s4 = peg$FAILED;
670 }
671 } else {
672 peg$currPos = s4;
673 s4 = peg$FAILED;
674 }
675 if (s4 !== peg$FAILED) {
676 while (s4 !== peg$FAILED) {
677 s3.push(s4);
678 s4 = peg$currPos;
679 s5 = peg$parseRule();
680 if (s5 !== peg$FAILED) {
681 s6 = peg$parse__();
682 if (s6 !== peg$FAILED) {
683 s5 = [s5, s6];
684 s4 = s5;
685 } else {
686 peg$currPos = s4;
687 s4 = peg$FAILED;
688 }
689 } else {
690 peg$currPos = s4;
691 s4 = peg$FAILED;

Callers

nothing calls this directly

Calls 4

peg$parse__Function · 0.85
peg$parseInitializerFunction · 0.85
peg$parseRuleFunction · 0.85
peg$c0Function · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…