MCPcopy Create free account
hub / github.com/codemix/graph / peg$parseAndCondition

Function peg$parseAndCondition

packages/graph/src/grammar.js:8238–8290  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8236 }
8237
8238 function peg$parseAndCondition() {
8239 let s0, s1, s2, s3, s4, s5, s6, s7;
8240
8241 s0 = peg$currPos;
8242 s1 = peg$parsePrimaryCondition();
8243 if (s1 !== peg$FAILED) {
8244 s2 = [];
8245 s3 = peg$currPos;
8246 s4 = peg$parse_();
8247 s5 = peg$parseAND();
8248 if (s5 !== peg$FAILED) {
8249 s6 = peg$parse_();
8250 s7 = peg$parsePrimaryCondition();
8251 if (s7 !== peg$FAILED) {
8252 s4 = [s4, s5, s6, s7];
8253 s3 = s4;
8254 } else {
8255 peg$currPos = s3;
8256 s3 = peg$FAILED;
8257 }
8258 } else {
8259 peg$currPos = s3;
8260 s3 = peg$FAILED;
8261 }
8262 while (s3 !== peg$FAILED) {
8263 s2.push(s3);
8264 s3 = peg$currPos;
8265 s4 = peg$parse_();
8266 s5 = peg$parseAND();
8267 if (s5 !== peg$FAILED) {
8268 s6 = peg$parse_();
8269 s7 = peg$parsePrimaryCondition();
8270 if (s7 !== peg$FAILED) {
8271 s4 = [s4, s5, s6, s7];
8272 s3 = s4;
8273 } else {
8274 peg$currPos = s3;
8275 s3 = peg$FAILED;
8276 }
8277 } else {
8278 peg$currPos = s3;
8279 s3 = peg$FAILED;
8280 }
8281 }
8282 peg$savedPos = s0;
8283 s0 = peg$f140(s1, s2);
8284 } else {
8285 peg$currPos = s0;
8286 s0 = peg$FAILED;
8287 }
8288
8289 return s0;
8290 }
8291
8292 function peg$parsePrimaryCondition() {
8293 let s0, s1, s2, s3, s4, s5;

Callers 1

peg$parseXorConditionFunction · 0.85

Calls 5

peg$parse_Function · 0.85
peg$parseANDFunction · 0.85
peg$f140Function · 0.85
pushMethod · 0.45

Tested by

no test coverage detected