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

Function parse_depth_enter

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

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

Callers 2

parse_atom_exprFunction · 0.85
parse_not_exprFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected