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

Function parse_xor_expr

src/cypher/cypher.c:1301–1317  ·  view source on GitHub ↗

XOR: and (XOR and)* */

Source from the content-addressed store, hash-verified

1299
1300/* XOR: and (XOR and)* */
1301static cbm_expr_t *parse_xor_expr(parser_t *p) { // NOLINT(misc-no-recursion)
1302 cbm_expr_t *first = parse_and_expr(p);
1303 if (!first || !check(p, TOK_XOR)) {
1304 return first;
1305 }
1306 cbm_expr_t *head = expr_binary(EXPR_XOR, first, NULL);
1307 cbm_expr_t *tail = head;
1308 while (match(p, TOK_XOR)) {
1309 cbm_expr_t *next = parse_and_expr(p);
1310 if (!next) {
1311 expr_free(head);
1312 return NULL;
1313 }
1314 expr_chain_link(&tail, EXPR_XOR, next, check(p, TOK_XOR));
1315 }
1316 return head;
1317}
1318
1319/* OR: xor (OR xor)* */
1320static cbm_expr_t *parse_or_expr(parser_t *p) { // NOLINT(misc-no-recursion)

Callers 1

parse_or_exprFunction · 0.85

Calls 6

parse_and_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