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

Function parse_or_expr

src/cypher/cypher.c:1320–1336  ·  view source on GitHub ↗

OR: xor (OR xor)* */

Source from the content-addressed store, hash-verified

1318
1319/* OR: xor (OR xor)* */
1320static cbm_expr_t *parse_or_expr(parser_t *p) { // NOLINT(misc-no-recursion)
1321 cbm_expr_t *first = parse_xor_expr(p);
1322 if (!first || !check(p, TOK_OR)) {
1323 return first;
1324 }
1325 cbm_expr_t *head = expr_binary(EXPR_OR, first, NULL);
1326 cbm_expr_t *tail = head;
1327 while (match(p, TOK_OR)) {
1328 cbm_expr_t *next = parse_xor_expr(p);
1329 if (!next) {
1330 expr_free(head);
1331 return NULL;
1332 }
1333 expr_chain_link(&tail, EXPR_OR, next, check(p, TOK_OR));
1334 }
1335 return head;
1336}
1337
1338/* Parse WHERE clause — builds expression tree */
1339static int parse_where(parser_t *p, cbm_where_clause_t **out) {

Callers 3

parse_atom_exprFunction · 0.85
parse_whereFunction · 0.85
parse_case_exprFunction · 0.85

Calls 6

parse_xor_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