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

Function peg$parseIdentifier

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

Source from the content-addressed store, hash-verified

17494 }
17495
17496 function peg$parseIdentifier() {
17497 let s0, s1, s2, s3, s4;
17498
17499 s0 = peg$parseBacktickIdentifier();
17500 if (s0 === peg$FAILED) {
17501 s0 = peg$currPos;
17502 s1 = peg$currPos;
17503 peg$silentFails++;
17504 s2 = peg$parseKeyword();
17505 peg$silentFails--;
17506 if (s2 === peg$FAILED) {
17507 s1 = undefined;
17508 } else {
17509 peg$currPos = s1;
17510 s1 = peg$FAILED;
17511 }
17512 if (s1 !== peg$FAILED) {
17513 s2 = input.charAt(peg$currPos);
17514 if (peg$r0.test(s2)) {
17515 peg$currPos++;
17516 } else {
17517 s2 = peg$FAILED;
17518 if (peg$silentFails === 0) { peg$fail(peg$e12); }
17519 }
17520 if (s2 !== peg$FAILED) {
17521 s3 = [];
17522 s4 = input.charAt(peg$currPos);
17523 if (peg$r1.test(s4)) {
17524 peg$currPos++;
17525 } else {
17526 s4 = peg$FAILED;
17527 if (peg$silentFails === 0) { peg$fail(peg$e13); }
17528 }
17529 while (s4 !== peg$FAILED) {
17530 s3.push(s4);
17531 s4 = input.charAt(peg$currPos);
17532 if (peg$r1.test(s4)) {
17533 peg$currPos++;
17534 } else {
17535 s4 = peg$FAILED;
17536 if (peg$silentFails === 0) { peg$fail(peg$e13); }
17537 }
17538 }
17539 peg$savedPos = s0;
17540 s0 = peg$f287(s2, s3);
17541 } else {
17542 peg$currPos = s0;
17543 s0 = peg$FAILED;
17544 }
17545 } else {
17546 peg$currPos = s0;
17547 s0 = peg$FAILED;
17548 }
17549 }
17550
17551 return s0;
17552 }
17553

Callers 14

peg$parseMergePatternFunction · 0.85
peg$parseCreateChainNodeFunction · 0.85
peg$parseForeachClauseFunction · 0.85
peg$parsePathAssignmentFunction · 0.85
peg$parseNodePatternBodyFunction · 0.85
peg$parseNodePatternFunction · 0.85
peg$parseEdgeVariableFunction · 0.85

Calls 5

peg$parseKeywordFunction · 0.85
peg$failFunction · 0.85
peg$f287Function · 0.85
pushMethod · 0.45

Tested by

no test coverage detected