MCPcopy Create free account
hub / github.com/estools/esquery / peg$parseattrOps

Function peg$parseattrOps

parser.js:1237–1293  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1235 }
1236
1237 function peg$parseattrOps() {
1238 var s0, s1, s2;
1239
1240 var key = peg$currPos * 32 + 13,
1241 cached = peg$resultsCache[key];
1242
1243 if (cached) {
1244 peg$currPos = cached.nextPos;
1245
1246 return cached.result;
1247 }
1248
1249 s0 = peg$currPos;
1250 if (peg$c36.test(input.charAt(peg$currPos))) {
1251 s1 = input.charAt(peg$currPos);
1252 peg$currPos++;
1253 } else {
1254 s1 = peg$FAILED;
1255 if (peg$silentFails === 0) { peg$fail(peg$c37); }
1256 }
1257 if (s1 === peg$FAILED) {
1258 s1 = null;
1259 }
1260 if (s1 !== peg$FAILED) {
1261 if (input.charCodeAt(peg$currPos) === 61) {
1262 s2 = peg$c38;
1263 peg$currPos++;
1264 } else {
1265 s2 = peg$FAILED;
1266 if (peg$silentFails === 0) { peg$fail(peg$c39); }
1267 }
1268 if (s2 !== peg$FAILED) {
1269 peg$savedPos = s0;
1270 s1 = peg$c40(s1);
1271 s0 = s1;
1272 } else {
1273 peg$currPos = s0;
1274 s0 = peg$FAILED;
1275 }
1276 } else {
1277 peg$currPos = s0;
1278 s0 = peg$FAILED;
1279 }
1280 if (s0 === peg$FAILED) {
1281 if (peg$c41.test(input.charAt(peg$currPos))) {
1282 s0 = input.charAt(peg$currPos);
1283 peg$currPos++;
1284 } else {
1285 s0 = peg$FAILED;
1286 if (peg$silentFails === 0) { peg$fail(peg$c42); }
1287 }
1288 }
1289
1290 peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };
1291
1292 return s0;
1293 }
1294

Callers 1

peg$parseattrValueFunction · 0.85

Calls 2

peg$failFunction · 0.85
peg$c40Function · 0.85

Tested by

no test coverage detected