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

Function peg$parseStringLiteral

lib/parser.js:2197–2288  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2195 }
2196
2197 function peg$parseStringLiteral() {
2198 var s0, s1, s2, s3;
2199
2200 peg$silentFails++;
2201 s0 = peg$currPos;
2202 if (input.charCodeAt(peg$currPos) === 34) {
2203 s1 = peg$c85;
2204 peg$currPos++;
2205 } else {
2206 s1 = peg$FAILED;
2207 if (peg$silentFails === 0) { peg$fail(peg$c86); }
2208 }
2209 if (s1 !== peg$FAILED) {
2210 s2 = [];
2211 s3 = peg$parseDoubleStringCharacter();
2212 while (s3 !== peg$FAILED) {
2213 s2.push(s3);
2214 s3 = peg$parseDoubleStringCharacter();
2215 }
2216 if (s2 !== peg$FAILED) {
2217 if (input.charCodeAt(peg$currPos) === 34) {
2218 s3 = peg$c85;
2219 peg$currPos++;
2220 } else {
2221 s3 = peg$FAILED;
2222 if (peg$silentFails === 0) { peg$fail(peg$c86); }
2223 }
2224 if (s3 !== peg$FAILED) {
2225 peg$savedPos = s0;
2226 s1 = peg$c87(s2);
2227 s0 = s1;
2228 } else {
2229 peg$currPos = s0;
2230 s0 = peg$FAILED;
2231 }
2232 } else {
2233 peg$currPos = s0;
2234 s0 = peg$FAILED;
2235 }
2236 } else {
2237 peg$currPos = s0;
2238 s0 = peg$FAILED;
2239 }
2240 if (s0 === peg$FAILED) {
2241 s0 = peg$currPos;
2242 if (input.charCodeAt(peg$currPos) === 39) {
2243 s1 = peg$c88;
2244 peg$currPos++;
2245 } else {
2246 s1 = peg$FAILED;
2247 if (peg$silentFails === 0) { peg$fail(peg$c89); }
2248 }
2249 if (s1 !== peg$FAILED) {
2250 s2 = [];
2251 s3 = peg$parseSingleStringCharacter();
2252 while (s3 !== peg$FAILED) {
2253 s2.push(s3);
2254 s3 = peg$parseSingleStringCharacter();

Callers 3

peg$parseRuleFunction · 0.85
peg$parseLiteralMatcherFunction · 0.85

Calls 4

peg$failFunction · 0.85
peg$c87Function · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…