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

Function peg$parseXOR

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

Source from the content-addressed store, hash-verified

15025 }
15026
15027 function peg$parseXOR() {
15028 let s0, s1, s2, s3;
15029
15030 s0 = peg$currPos;
15031 s1 = input.substr(peg$currPos, 3);
15032 if (s1.toLowerCase() === peg$c67) {
15033 peg$currPos += (3);
15034 } else {
15035 s1 = peg$FAILED;
15036 if (peg$silentFails === 0) { peg$fail(peg$e72); }
15037 }
15038 if (s1 !== peg$FAILED) {
15039 s2 = peg$currPos;
15040 peg$silentFails++;
15041 s3 = peg$parseIdentifierPart();
15042 peg$silentFails--;
15043 if (s3 === peg$FAILED) {
15044 s2 = undefined;
15045 } else {
15046 peg$currPos = s2;
15047 s2 = peg$FAILED;
15048 }
15049 if (s2 !== peg$FAILED) {
15050 s1 = [s1, s2];
15051 s0 = s1;
15052 } else {
15053 peg$currPos = s0;
15054 s0 = peg$FAILED;
15055 }
15056 } else {
15057 peg$currPos = s0;
15058 s0 = peg$FAILED;
15059 }
15060
15061 return s0;
15062 }
15063
15064 function peg$parseEXISTS() {
15065 let s0, s1, s2, s3;

Callers 4

peg$parseXorConditionFunction · 0.85
peg$parseKeywordFunction · 0.85

Calls 2

peg$failFunction · 0.85
peg$parseIdentifierPartFunction · 0.85

Tested by

no test coverage detected