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

Function peg$parseOPTIONAL

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

Source from the content-addressed store, hash-verified

15802 }
15803
15804 function peg$parseOPTIONAL() {
15805 let s0, s1, s2, s3;
15806
15807 s0 = peg$currPos;
15808 s1 = input.substr(peg$currPos, 8);
15809 if (s1.toLowerCase() === peg$c88) {
15810 peg$currPos += (8);
15811 } else {
15812 s1 = peg$FAILED;
15813 if (peg$silentFails === 0) { peg$fail(peg$e93); }
15814 }
15815 if (s1 !== peg$FAILED) {
15816 s2 = peg$currPos;
15817 peg$silentFails++;
15818 s3 = peg$parseIdentifierPart();
15819 peg$silentFails--;
15820 if (s3 === peg$FAILED) {
15821 s2 = undefined;
15822 } else {
15823 peg$currPos = s2;
15824 s2 = peg$FAILED;
15825 }
15826 if (s2 !== peg$FAILED) {
15827 s1 = [s1, s2];
15828 s0 = s1;
15829 } else {
15830 peg$currPos = s0;
15831 s0 = peg$FAILED;
15832 }
15833 } else {
15834 peg$currPos = s0;
15835 s0 = peg$FAILED;
15836 }
15837
15838 return s0;
15839 }
15840
15841 function peg$parseUNWIND() {
15842 let s0, s1, s2, s3;

Callers 2

peg$parseNonEmptyQueryFunction · 0.85
peg$parseMatchClauseFunction · 0.85

Calls 2

peg$failFunction · 0.85
peg$parseIdentifierPartFunction · 0.85

Tested by

no test coverage detected