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

Function peg$parseParenthesizedPathPattern

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

Source from the content-addressed store, hash-verified

6329 }
6330
6331 function peg$parseParenthesizedPathPattern() {
6332 let s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13;
6333
6334 s0 = peg$currPos;
6335 if (input.charCodeAt(peg$currPos) === 40) {
6336 s1 = peg$c4;
6337 peg$currPos++;
6338 } else {
6339 s1 = peg$FAILED;
6340 if (peg$silentFails === 0) { peg$fail(peg$e4); }
6341 }
6342 if (s1 !== peg$FAILED) {
6343 s2 = peg$parse_();
6344 if (input.charCodeAt(peg$currPos) === 40) {
6345 s3 = peg$c4;
6346 peg$currPos++;
6347 } else {
6348 s3 = peg$FAILED;
6349 if (peg$silentFails === 0) { peg$fail(peg$e4); }
6350 }
6351 if (s3 !== peg$FAILED) {
6352 s4 = peg$parse_();
6353 s5 = peg$parseParenthesizedInnerPattern();
6354 if (s5 !== peg$FAILED) {
6355 s6 = peg$parse_();
6356 if (input.charCodeAt(peg$currPos) === 41) {
6357 s7 = peg$c5;
6358 peg$currPos++;
6359 } else {
6360 s7 = peg$FAILED;
6361 if (peg$silentFails === 0) { peg$fail(peg$e5); }
6362 }
6363 if (s7 !== peg$FAILED) {
6364 s8 = peg$parse_();
6365 s9 = peg$currPos;
6366 s10 = peg$parseWHERE();
6367 if (s10 !== peg$FAILED) {
6368 s11 = peg$parse_();
6369 s12 = peg$parseOrCondition();
6370 if (s12 !== peg$FAILED) {
6371 s10 = [s10, s11, s12];
6372 s9 = s10;
6373 } else {
6374 peg$currPos = s9;
6375 s9 = peg$FAILED;
6376 }
6377 } else {
6378 peg$currPos = s9;
6379 s9 = peg$FAILED;
6380 }
6381 if (s9 === peg$FAILED) {
6382 s9 = null;
6383 }
6384 s10 = peg$parse_();
6385 if (input.charCodeAt(peg$currPos) === 41) {
6386 s11 = peg$c5;
6387 peg$currPos++;
6388 } else {

Callers 2

peg$parsePatternElementFunction · 0.85

Calls 7

peg$failFunction · 0.85
peg$parse_Function · 0.85
peg$parseWHEREFunction · 0.85
peg$parseOrConditionFunction · 0.85
peg$parseQuantifierFunction · 0.85
peg$f95Function · 0.85

Tested by

no test coverage detected