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

Function peg$parseSingleStringCharacter

lib/parser.js:4113–4188  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4111 }
4112
4113 function peg$parseSingleStringCharacter() {
4114 var s0, s1, s2;
4115
4116 s0 = peg$currPos;
4117 s1 = peg$currPos;
4118 peg$silentFails++;
4119 if (input.charCodeAt(peg$currPos) === 39) {
4120 s2 = peg$c71;
4121 peg$currPos++;
4122 } else {
4123 s2 = peg$FAILED;
4124 if (peg$silentFails === 0) { peg$fail(peg$c72); }
4125 }
4126 if (s2 === peg$FAILED) {
4127 if (input.charCodeAt(peg$currPos) === 92) {
4128 s2 = peg$c120;
4129 peg$currPos++;
4130 } else {
4131 s2 = peg$FAILED;
4132 if (peg$silentFails === 0) { peg$fail(peg$c121); }
4133 }
4134 if (s2 === peg$FAILED) {
4135 s2 = peg$parseLineTerminator();
4136 }
4137 }
4138 peg$silentFails--;
4139 if (s2 === peg$FAILED) {
4140 s1 = peg$c5;
4141 } else {
4142 peg$currPos = s1;
4143 s1 = peg$c3;
4144 }
4145 if (s1 !== peg$FAILED) {
4146 s2 = peg$parseSourceCharacter();
4147 if (s2 !== peg$FAILED) {
4148 peg$reportedPos = s0;
4149 s1 = peg$c134();
4150 s0 = s1;
4151 } else {
4152 peg$currPos = s0;
4153 s0 = peg$c3;
4154 }
4155 } else {
4156 peg$currPos = s0;
4157 s0 = peg$c3;
4158 }
4159 if (s0 === peg$FAILED) {
4160 s0 = peg$currPos;
4161 if (input.charCodeAt(peg$currPos) === 92) {
4162 s1 = peg$c120;
4163 peg$currPos++;
4164 } else {
4165 s1 = peg$FAILED;
4166 if (peg$silentFails === 0) { peg$fail(peg$c121); }
4167 }
4168 if (s1 !== peg$FAILED) {
4169 s2 = peg$parseEscapeSequence();
4170 if (s2 !== peg$FAILED) {

Callers 2

peg$parseSTRINGFunction · 0.85
peg$parseStringLiteralFunction · 0.85

Calls 7

peg$failFunction · 0.85
peg$parseLineTerminatorFunction · 0.85
peg$parseSourceCharacterFunction · 0.85
peg$c134Function · 0.85
peg$parseEscapeSequenceFunction · 0.85
peg$c122Function · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…