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

Function parse_depth_enter

src/cypher/cypher.c:451–459  ·  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

449/* Enter one level of recursive descent. Returns false when the cap is hit, in
450 * which case the caller must return NULL without recursing. */
451static bool parse_depth_enter(parser_t *p) {
452 if (p->depth >= CYPHER_MAX_PARSE_DEPTH) {
453 snprintf(p->error, sizeof(p->error), "expression nested deeper than %d levels",
454 CYPHER_MAX_PARSE_DEPTH);
455 return false;
456 }
457 p->depth++;
458 return true;
459}
460
461static void parse_depth_leave(parser_t *p) {
462 p->depth--;

Callers 2

parse_atom_exprFunction · 0.85
parse_not_exprFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected