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

Function peg$parseUNION

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

Source from the content-addressed store, hash-verified

16061 }
16062
16063 function peg$parseUNION() {
16064 let s0, s1, s2, s3;
16065
16066 s0 = peg$currPos;
16067 s1 = input.substr(peg$currPos, 5);
16068 if (s1.toLowerCase() === peg$c95) {
16069 peg$currPos += (5);
16070 } else {
16071 s1 = peg$FAILED;
16072 if (peg$silentFails === 0) { peg$fail(peg$e100); }
16073 }
16074 if (s1 !== peg$FAILED) {
16075 s2 = peg$currPos;
16076 peg$silentFails++;
16077 s3 = peg$parseIdentifierPart();
16078 peg$silentFails--;
16079 if (s3 === peg$FAILED) {
16080 s2 = undefined;
16081 } else {
16082 peg$currPos = s2;
16083 s2 = peg$FAILED;
16084 }
16085 if (s2 !== peg$FAILED) {
16086 s1 = [s1, s2];
16087 s0 = s1;
16088 } else {
16089 peg$currPos = s0;
16090 s0 = peg$FAILED;
16091 }
16092 } else {
16093 peg$currPos = s0;
16094 s0 = peg$FAILED;
16095 }
16096
16097 return s0;
16098 }
16099
16100 function peg$parseALL() {
16101 let s0, s1, s2, s3;

Callers 2

peg$parseUnionKeywordFunction · 0.85
peg$parseKeywordFunction · 0.85

Calls 2

peg$failFunction · 0.85
peg$parseIdentifierPartFunction · 0.85

Tested by

no test coverage detected