MCPcopy Index your code
hub / github.com/pegjs/pegjs / peg$parseCharacterClassMatcher

Function peg$parseCharacterClassMatcher

lib/parser.js:2444–2530  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2442 }
2443
2444 function peg$parseCharacterClassMatcher() {
2445 var s0, s1, s2, s3, s4, s5;
2446
2447 peg$silentFails++;
2448 s0 = peg$currPos;
2449 if (input.charCodeAt(peg$currPos) === 91) {
2450 s1 = peg$c92;
2451 peg$currPos++;
2452 } else {
2453 s1 = peg$FAILED;
2454 if (peg$silentFails === 0) { peg$fail(peg$c93); }
2455 }
2456 if (s1 !== peg$FAILED) {
2457 if (input.charCodeAt(peg$currPos) === 94) {
2458 s2 = peg$c94;
2459 peg$currPos++;
2460 } else {
2461 s2 = peg$FAILED;
2462 if (peg$silentFails === 0) { peg$fail(peg$c95); }
2463 }
2464 if (s2 === peg$FAILED) {
2465 s2 = null;
2466 }
2467 if (s2 !== peg$FAILED) {
2468 s3 = [];
2469 s4 = peg$parseClassCharacterRange();
2470 if (s4 === peg$FAILED) {
2471 s4 = peg$parseClassCharacter();
2472 }
2473 while (s4 !== peg$FAILED) {
2474 s3.push(s4);
2475 s4 = peg$parseClassCharacterRange();
2476 if (s4 === peg$FAILED) {
2477 s4 = peg$parseClassCharacter();
2478 }
2479 }
2480 if (s3 !== peg$FAILED) {
2481 if (input.charCodeAt(peg$currPos) === 93) {
2482 s4 = peg$c96;
2483 peg$currPos++;
2484 } else {
2485 s4 = peg$FAILED;
2486 if (peg$silentFails === 0) { peg$fail(peg$c97); }
2487 }
2488 if (s4 !== peg$FAILED) {
2489 if (input.charCodeAt(peg$currPos) === 105) {
2490 s5 = peg$c81;
2491 peg$currPos++;
2492 } else {
2493 s5 = peg$FAILED;
2494 if (peg$silentFails === 0) { peg$fail(peg$c82); }
2495 }
2496 if (s5 === peg$FAILED) {
2497 s5 = null;
2498 }
2499 if (s5 !== peg$FAILED) {
2500 peg$savedPos = s0;
2501 s1 = peg$c98(s2, s3, s5);

Callers 1

Calls 4

peg$failFunction · 0.85
peg$parseClassCharacterFunction · 0.85
peg$c98Function · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…