MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / parse_and_expr

Function parse_and_expr

src/cypher/cypher.c:1282–1298  ·  view source on GitHub ↗

AND: not (AND not)* */

Source from the content-addressed store, hash-verified

1280
1281/* AND: not (AND not)* */
1282static cbm_expr_t *parse_and_expr(parser_t *p) { // NOLINT(misc-no-recursion)
1283 cbm_expr_t *first = parse_not_expr(p);
1284 if (!first || !check(p, TOK_AND)) {
1285 return first;
1286 }
1287 cbm_expr_t *head = expr_binary(EXPR_AND, first, NULL);
1288 cbm_expr_t *tail = head;
1289 while (match(p, TOK_AND)) {
1290 cbm_expr_t *next = parse_not_expr(p);
1291 if (!next) {
1292 expr_free(head);
1293 return NULL;
1294 }
1295 expr_chain_link(&tail, EXPR_AND, next, check(p, TOK_AND));
1296 }
1297 return head;
1298}
1299
1300/* XOR: and (XOR and)* */
1301static cbm_expr_t *parse_xor_expr(parser_t *p) { // NOLINT(misc-no-recursion)

Callers 1

parse_xor_exprFunction · 0.85

Calls 6

parse_not_exprFunction · 0.85
expr_binaryFunction · 0.85
matchFunction · 0.85
expr_freeFunction · 0.85
expr_chain_linkFunction · 0.85
checkFunction · 0.70

Tested by

no test coverage detected