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

Function parse_depth_enter

src/cypher/cypher.c:459–467  ·  view source on GitHub ↗

Enter one level of recursive descent. Returns false when the cap is hit, in * which case the caller must return NULL without recursing. */

Source from the content-addressed store, hash-verified

457/* Enter one level of recursive descent. Returns false when the cap is hit, in
458 * which case the caller must return NULL without recursing. */
459static bool parse_depth_enter(parser_t *p) {
460 if (p->depth >= CYPHER_MAX_PARSE_DEPTH) {
461 snprintf(p->error, sizeof(p->error), "expression nested deeper than %d levels",
462 CYPHER_MAX_PARSE_DEPTH);
463 return false;
464 }
465 p->depth++;
466 return true;
467}
468
469static void parse_depth_leave(parser_t *p) {
470 p->depth--;

Callers 2

parse_atom_exprFunction · 0.85
parse_not_exprFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected