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

Function peg$parseAS

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

Source from the content-addressed store, hash-verified

15765 }
15766
15767 function peg$parseAS() {
15768 let s0, s1, s2, s3;
15769
15770 s0 = peg$currPos;
15771 s1 = input.substr(peg$currPos, 2);
15772 if (s1.toLowerCase() === peg$c87) {
15773 peg$currPos += (2);
15774 } else {
15775 s1 = peg$FAILED;
15776 if (peg$silentFails === 0) { peg$fail(peg$e92); }
15777 }
15778 if (s1 !== peg$FAILED) {
15779 s2 = peg$currPos;
15780 peg$silentFails++;
15781 s3 = peg$parseIdentifierPart();
15782 peg$silentFails--;
15783 if (s3 === peg$FAILED) {
15784 s2 = undefined;
15785 } else {
15786 peg$currPos = s2;
15787 s2 = peg$FAILED;
15788 }
15789 if (s2 !== peg$FAILED) {
15790 s1 = [s1, s2];
15791 s0 = s1;
15792 } else {
15793 peg$currPos = s0;
15794 s0 = peg$FAILED;
15795 }
15796 } else {
15797 peg$currPos = s0;
15798 s0 = peg$FAILED;
15799 }
15800
15801 return s0;
15802 }
15803
15804 function peg$parseOPTIONAL() {
15805 let s0, s1, s2, s3;

Callers 5

peg$parseWithItemFunction · 0.85
peg$parseUnwindClauseFunction · 0.85
peg$parseYieldItemFunction · 0.85
peg$parseReturnItemFunction · 0.85
peg$parseKeywordFunction · 0.85

Calls 2

peg$failFunction · 0.85
peg$parseIdentifierPartFunction · 0.85

Tested by

no test coverage detected