MCPcopy Create free account
hub / github.com/codemix/graph / peg$parseMatchClause

Function peg$parseMatchClause

packages/graph/src/grammar.js:5804–5869  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5802 }
5803
5804 function peg$parseMatchClause() {
5805 let s0, s1, s2, s3, s4;
5806
5807 s0 = peg$currPos;
5808 s1 = peg$currPos;
5809 s2 = peg$parseOPTIONAL();
5810 if (s2 !== peg$FAILED) {
5811 s3 = peg$parse_();
5812 s2 = [s2, s3];
5813 s1 = s2;
5814 } else {
5815 peg$currPos = s1;
5816 s1 = peg$FAILED;
5817 }
5818 if (s1 === peg$FAILED) {
5819 s1 = null;
5820 }
5821 s2 = peg$parseMATCH();
5822 if (s2 !== peg$FAILED) {
5823 s3 = peg$parse_();
5824 s4 = peg$parsePathAssignment();
5825 if (s4 !== peg$FAILED) {
5826 peg$savedPos = s0;
5827 s0 = peg$f82(s1, s4);
5828 } else {
5829 peg$currPos = s0;
5830 s0 = peg$FAILED;
5831 }
5832 } else {
5833 peg$currPos = s0;
5834 s0 = peg$FAILED;
5835 }
5836 if (s0 === peg$FAILED) {
5837 s0 = peg$currPos;
5838 s1 = peg$currPos;
5839 s2 = peg$parseOPTIONAL();
5840 if (s2 !== peg$FAILED) {
5841 s3 = peg$parse_();
5842 s2 = [s2, s3];
5843 s1 = s2;
5844 } else {
5845 peg$currPos = s1;
5846 s1 = peg$FAILED;
5847 }
5848 if (s1 === peg$FAILED) {
5849 s1 = null;
5850 }
5851 s2 = peg$parseMATCH();
5852 if (s2 !== peg$FAILED) {
5853 s3 = peg$parse_();
5854 s4 = peg$parsePatternList();
5855 if (s4 !== peg$FAILED) {
5856 peg$savedPos = s0;
5857 s0 = peg$f83(s1, s4);
5858 } else {
5859 peg$currPos = s0;
5860 s0 = peg$FAILED;
5861 }

Callers 1

Calls 7

peg$parseOPTIONALFunction · 0.85
peg$parse_Function · 0.85
peg$parseMATCHFunction · 0.85
peg$parsePathAssignmentFunction · 0.85
peg$f82Function · 0.85
peg$parsePatternListFunction · 0.85
peg$f83Function · 0.85

Tested by

no test coverage detected