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

Function peg$parseSCRIPT_ELEMENT

lib/parser.js:2130–2218  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2128 }
2129
2130 function peg$parseSCRIPT_ELEMENT() {
2131 var s0, s1, s2, s3, s4, s5, s6, s7, s8;
2132
2133 peg$silentFails++;
2134 s0 = peg$currPos;
2135 if (input.substr(peg$currPos, 7) === peg$c52) {
2136 s1 = peg$c52;
2137 peg$currPos += 7;
2138 } else {
2139 s1 = peg$FAILED;
2140 if (peg$silentFails === 0) { peg$fail(peg$c53); }
2141 }
2142 if (s1 !== peg$FAILED) {
2143 s2 = peg$parseRAW_ATTRIBUTES();
2144 if (s2 === peg$FAILED) {
2145 s2 = peg$c0;
2146 }
2147 if (s2 !== peg$FAILED) {
2148 s3 = peg$currPos;
2149 s4 = peg$currPos;
2150 s5 = peg$parse_();
2151 if (s5 !== peg$FAILED) {
2152 if (input.charCodeAt(peg$currPos) === 62) {
2153 s6 = peg$c21;
2154 peg$currPos++;
2155 } else {
2156 s6 = peg$FAILED;
2157 if (peg$silentFails === 0) { peg$fail(peg$c22); }
2158 }
2159 if (s6 !== peg$FAILED) {
2160 s7 = peg$parseSCRIPT_CONTENT();
2161 if (s7 === peg$FAILED) {
2162 s7 = peg$c0;
2163 }
2164 if (s7 !== peg$FAILED) {
2165 if (input.substr(peg$currPos, 9) === peg$c12) {
2166 s8 = peg$c12;
2167 peg$currPos += 9;
2168 } else {
2169 s8 = peg$FAILED;
2170 if (peg$silentFails === 0) { peg$fail(peg$c13); }
2171 }
2172 if (s8 !== peg$FAILED) {
2173 s5 = [s5, s6, s7, s8];
2174 s4 = s5;
2175 } else {
2176 peg$currPos = s4;
2177 s4 = peg$c3;
2178 }
2179 } else {
2180 peg$currPos = s4;
2181 s4 = peg$c3;
2182 }
2183 } else {
2184 peg$currPos = s4;
2185 s4 = peg$c3;
2186 }
2187 } else {

Callers 2

peg$parseHTMLFunction · 0.85
peg$parseRAWFunction · 0.85

Calls 5

peg$failFunction · 0.85
peg$parseRAW_ATTRIBUTESFunction · 0.85
peg$parse_Function · 0.85
peg$parseSCRIPT_CONTENTFunction · 0.85
peg$c54Function · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…