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

Function peg$parseVariableAsCondition

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

Source from the content-addressed store, hash-verified

8391 }
8392
8393 function peg$parseVariableAsCondition() {
8394 let s0, s1, s2, s3, s4, s5, s6;
8395
8396 s0 = peg$currPos;
8397 s1 = peg$currPos;
8398 peg$silentFails++;
8399 s2 = peg$parseReservedConditionWord();
8400 peg$silentFails--;
8401 if (s2 === peg$FAILED) {
8402 s1 = undefined;
8403 } else {
8404 peg$currPos = s1;
8405 s1 = peg$FAILED;
8406 }
8407 if (s1 !== peg$FAILED) {
8408 s2 = peg$parseExpressionIdentifier();
8409 if (s2 !== peg$FAILED) {
8410 s3 = peg$currPos;
8411 peg$silentFails++;
8412 s4 = peg$currPos;
8413 s5 = peg$parse_();
8414 s6 = input.charAt(peg$currPos);
8415 if (peg$r2.test(s6)) {
8416 peg$currPos++;
8417 } else {
8418 s6 = peg$FAILED;
8419 if (peg$silentFails === 0) { peg$fail(peg$e29); }
8420 }
8421 if (s6 === peg$FAILED) {
8422 if (input.substr(peg$currPos, 2) === peg$c27) {
8423 s6 = peg$c27;
8424 peg$currPos += 2;
8425 } else {
8426 s6 = peg$FAILED;
8427 if (peg$silentFails === 0) { peg$fail(peg$e30); }
8428 }
8429 if (s6 === peg$FAILED) {
8430 s6 = peg$parseComparisonOperator();
8431 if (s6 === peg$FAILED) {
8432 s6 = peg$parseIS();
8433 if (s6 === peg$FAILED) {
8434 s6 = peg$parseIN();
8435 }
8436 }
8437 }
8438 }
8439 if (s6 !== peg$FAILED) {
8440 s5 = [s5, s6];
8441 s4 = s5;
8442 } else {
8443 peg$currPos = s4;
8444 s4 = peg$FAILED;
8445 }
8446 peg$silentFails--;
8447 if (s4 === peg$FAILED) {
8448 s3 = undefined;
8449 } else {
8450 peg$currPos = s3;

Callers 1

Calls 8

peg$parse_Function · 0.85
peg$failFunction · 0.85
peg$parseISFunction · 0.85
peg$parseINFunction · 0.85
peg$f143Function · 0.85

Tested by

no test coverage detected