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

Function peg$parseSingleStringCharacter

lib/parser.js:2367–2442  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2365 }
2366
2367 function peg$parseSingleStringCharacter() {
2368 var s0, s1, s2;
2369
2370 s0 = peg$currPos;
2371 s1 = peg$currPos;
2372 peg$silentFails++;
2373 if (input.charCodeAt(peg$currPos) === 39) {
2374 s2 = peg$c88;
2375 peg$currPos++;
2376 } else {
2377 s2 = peg$FAILED;
2378 if (peg$silentFails === 0) { peg$fail(peg$c89); }
2379 }
2380 if (s2 === peg$FAILED) {
2381 if (input.charCodeAt(peg$currPos) === 92) {
2382 s2 = peg$c73;
2383 peg$currPos++;
2384 } else {
2385 s2 = peg$FAILED;
2386 if (peg$silentFails === 0) { peg$fail(peg$c74); }
2387 }
2388 if (s2 === peg$FAILED) {
2389 s2 = peg$parseLineTerminator();
2390 }
2391 }
2392 peg$silentFails--;
2393 if (s2 === peg$FAILED) {
2394 s1 = void 0;
2395 } else {
2396 peg$currPos = s1;
2397 s1 = peg$FAILED;
2398 }
2399 if (s1 !== peg$FAILED) {
2400 s2 = peg$parseSourceCharacter();
2401 if (s2 !== peg$FAILED) {
2402 peg$savedPos = s0;
2403 s1 = peg$c90();
2404 s0 = s1;
2405 } else {
2406 peg$currPos = s0;
2407 s0 = peg$FAILED;
2408 }
2409 } else {
2410 peg$currPos = s0;
2411 s0 = peg$FAILED;
2412 }
2413 if (s0 === peg$FAILED) {
2414 s0 = peg$currPos;
2415 if (input.charCodeAt(peg$currPos) === 92) {
2416 s1 = peg$c73;
2417 peg$currPos++;
2418 } else {
2419 s1 = peg$FAILED;
2420 if (peg$silentFails === 0) { peg$fail(peg$c74); }
2421 }
2422 if (s1 !== peg$FAILED) {
2423 s2 = peg$parseEscapeSequence();
2424 if (s2 !== peg$FAILED) {

Callers 1

peg$parseStringLiteralFunction · 0.85

Calls 7

peg$failFunction · 0.85
peg$parseLineTerminatorFunction · 0.85
peg$parseSourceCharacterFunction · 0.85
peg$c90Function · 0.85
peg$parseEscapeSequenceFunction · 0.85
peg$c75Function · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…