MCPcopy Create free account
hub / github.com/codemix/htmling / peg$parseSingleLineComment

Function peg$parseSingleLineComment

lib/parser.js:3335–3424  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3333 }
3334
3335 function peg$parseSingleLineComment() {
3336 var s0, s1, s2, s3, s4, s5;
3337
3338 s0 = peg$currPos;
3339 if (input.substr(peg$currPos, 4) === peg$c107) {
3340 s1 = peg$c107;
3341 peg$currPos += 4;
3342 } else {
3343 s1 = peg$FAILED;
3344 if (peg$silentFails === 0) { peg$fail(peg$c108); }
3345 }
3346 if (s1 !== peg$FAILED) {
3347 s2 = [];
3348 s3 = peg$currPos;
3349 s4 = peg$currPos;
3350 peg$silentFails++;
3351 s5 = peg$parseLineTerminator();
3352 peg$silentFails--;
3353 if (s5 === peg$FAILED) {
3354 s4 = peg$c5;
3355 } else {
3356 peg$currPos = s4;
3357 s4 = peg$c3;
3358 }
3359 if (s4 !== peg$FAILED) {
3360 s5 = peg$parseSourceCharacter();
3361 if (s5 !== peg$FAILED) {
3362 s4 = [s4, s5];
3363 s3 = s4;
3364 } else {
3365 peg$currPos = s3;
3366 s3 = peg$c3;
3367 }
3368 } else {
3369 peg$currPos = s3;
3370 s3 = peg$c3;
3371 }
3372 while (s3 !== peg$FAILED) {
3373 s2.push(s3);
3374 s3 = peg$currPos;
3375 s4 = peg$currPos;
3376 peg$silentFails++;
3377 s5 = peg$parseLineTerminator();
3378 peg$silentFails--;
3379 if (s5 === peg$FAILED) {
3380 s4 = peg$c5;
3381 } else {
3382 peg$currPos = s4;
3383 s4 = peg$c3;
3384 }
3385 if (s4 !== peg$FAILED) {
3386 s5 = peg$parseSourceCharacter();
3387 if (s5 !== peg$FAILED) {
3388 s4 = [s4, s5];
3389 s3 = s4;
3390 } else {
3391 peg$currPos = s3;
3392 s3 = peg$c3;

Callers 2

peg$parseCommentFunction · 0.85
peg$parseEOSFunction · 0.85

Calls 3

peg$failFunction · 0.85
peg$parseLineTerminatorFunction · 0.85
peg$parseSourceCharacterFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…