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

Function peg$parseBooleanLiteral

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

Source from the content-addressed store, hash-verified

17319 }
17320
17321 function peg$parseBooleanLiteral() {
17322 let s0, s1, s2, s3;
17323
17324 s0 = peg$currPos;
17325 s1 = input.substr(peg$currPos, 4);
17326 if (s1.toLowerCase() === peg$c110) {
17327 peg$currPos += (4);
17328 } else {
17329 s1 = peg$FAILED;
17330 if (peg$silentFails === 0) { peg$fail(peg$e124); }
17331 }
17332 if (s1 !== peg$FAILED) {
17333 s2 = peg$currPos;
17334 peg$silentFails++;
17335 s3 = peg$parseIdentifierPart();
17336 peg$silentFails--;
17337 if (s3 === peg$FAILED) {
17338 s2 = undefined;
17339 } else {
17340 peg$currPos = s2;
17341 s2 = peg$FAILED;
17342 }
17343 if (s2 !== peg$FAILED) {
17344 peg$savedPos = s0;
17345 s0 = peg$f282();
17346 } else {
17347 peg$currPos = s0;
17348 s0 = peg$FAILED;
17349 }
17350 } else {
17351 peg$currPos = s0;
17352 s0 = peg$FAILED;
17353 }
17354 if (s0 === peg$FAILED) {
17355 s0 = peg$currPos;
17356 s1 = input.substr(peg$currPos, 5);
17357 if (s1.toLowerCase() === peg$c111) {
17358 peg$currPos += (5);
17359 } else {
17360 s1 = peg$FAILED;
17361 if (peg$silentFails === 0) { peg$fail(peg$e125); }
17362 }
17363 if (s1 !== peg$FAILED) {
17364 s2 = peg$currPos;
17365 peg$silentFails++;
17366 s3 = peg$parseIdentifierPart();
17367 peg$silentFails--;
17368 if (s3 === peg$FAILED) {
17369 s2 = undefined;
17370 } else {
17371 peg$currPos = s2;
17372 s2 = peg$FAILED;
17373 }
17374 if (s2 !== peg$FAILED) {
17375 peg$savedPos = s0;
17376 s0 = peg$f283();
17377 } else {
17378 peg$currPos = s0;

Callers 2

peg$parseLiteralFunction · 0.85

Calls 4

peg$failFunction · 0.85
peg$parseIdentifierPartFunction · 0.85
peg$f282Function · 0.85
peg$f283Function · 0.85

Tested by

no test coverage detected