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

Function peg$parseSingleQuoteChar

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

Source from the content-addressed store, hash-verified

16637 }
16638
16639 function peg$parseSingleQuoteChar() {
16640 let s0, s1, s2;
16641
16642 s0 = peg$currPos;
16643 s1 = peg$currPos;
16644 peg$silentFails++;
16645 s2 = input.charAt(peg$currPos);
16646 if (peg$r6.test(s2)) {
16647 peg$currPos++;
16648 } else {
16649 s2 = peg$FAILED;
16650 if (peg$silentFails === 0) { peg$fail(peg$e113); }
16651 }
16652 peg$silentFails--;
16653 if (s2 === peg$FAILED) {
16654 s1 = undefined;
16655 } else {
16656 peg$currPos = s1;
16657 s1 = peg$FAILED;
16658 }
16659 if (s1 !== peg$FAILED) {
16660 if (input.length > peg$currPos) {
16661 s2 = input.charAt(peg$currPos);
16662 peg$currPos++;
16663 } else {
16664 s2 = peg$FAILED;
16665 if (peg$silentFails === 0) { peg$fail(peg$e111); }
16666 }
16667 if (s2 !== peg$FAILED) {
16668 peg$savedPos = s0;
16669 s0 = peg$f268(s2);
16670 } else {
16671 peg$currPos = s0;
16672 s0 = peg$FAILED;
16673 }
16674 } else {
16675 peg$currPos = s0;
16676 s0 = peg$FAILED;
16677 }
16678 if (s0 === peg$FAILED) {
16679 s0 = peg$currPos;
16680 if (input.charCodeAt(peg$currPos) === 92) {
16681 s1 = peg$c105;
16682 peg$currPos++;
16683 } else {
16684 s1 = peg$FAILED;
16685 if (peg$silentFails === 0) { peg$fail(peg$e112); }
16686 }
16687 if (s1 !== peg$FAILED) {
16688 s2 = peg$parseEscapeSequence();
16689 if (s2 !== peg$FAILED) {
16690 peg$savedPos = s0;
16691 s0 = peg$f269(s2);
16692 } else {
16693 peg$currPos = s0;
16694 s0 = peg$FAILED;
16695 }
16696 } else {

Callers 1

peg$parseStringLiteralFunction · 0.85

Calls 4

peg$failFunction · 0.85
peg$f268Function · 0.85
peg$parseEscapeSequenceFunction · 0.85
peg$f269Function · 0.85

Tested by

no test coverage detected