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

Function peg$parseSHORTESTPATH

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

Source from the content-addressed store, hash-verified

15247 }
15248
15249 function peg$parseSHORTESTPATH() {
15250 let s0, s1, s2, s3;
15251
15252 s0 = peg$currPos;
15253 s1 = input.substr(peg$currPos, 12);
15254 if (s1.toLowerCase() === peg$c73) {
15255 peg$currPos += (12);
15256 } else {
15257 s1 = peg$FAILED;
15258 if (peg$silentFails === 0) { peg$fail(peg$e78); }
15259 }
15260 if (s1 !== peg$FAILED) {
15261 s2 = peg$currPos;
15262 peg$silentFails++;
15263 s3 = peg$parseIdentifierPart();
15264 peg$silentFails--;
15265 if (s3 === peg$FAILED) {
15266 s2 = undefined;
15267 } else {
15268 peg$currPos = s2;
15269 s2 = peg$FAILED;
15270 }
15271 if (s2 !== peg$FAILED) {
15272 s1 = [s1, s2];
15273 s0 = s1;
15274 } else {
15275 peg$currPos = s0;
15276 s0 = peg$FAILED;
15277 }
15278 } else {
15279 peg$currPos = s0;
15280 s0 = peg$FAILED;
15281 }
15282
15283 return s0;
15284 }
15285
15286 function peg$parseALLSHORTESTPATHS() {
15287 let s0, s1, s2, s3;

Callers 2

peg$parseKeywordFunction · 0.85

Calls 2

peg$failFunction · 0.85
peg$parseIdentifierPartFunction · 0.85

Tested by

no test coverage detected