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

Function process_throw_node

internal/cbm/extract_semantic.c:108–123  ·  view source on GitHub ↗

Process a single node for throw extraction (called from iterative walker).

Source from the content-addressed store, hash-verified

106
107// Process a single node for throw extraction (called from iterative walker).
108static void process_throw_node(CBMExtractCtx *ctx, TSNode node, const CBMLangSpec *spec) {
109 if (is_throw_node(node, spec)) {
110 char *exc_name = resolve_exception_name(ctx->arena, node, ctx->source);
111 if (exc_name && exc_name[0]) {
112 if (strlen(exc_name) > MAX_EXCEPTION_NAME_LEN) {
113 exc_name[MAX_EXCEPTION_NAME_LEN] = '\0';
114 }
115 CBMThrow thr;
116 thr.exception_name = exc_name;
117 thr.enclosing_func_qn = cbm_enclosing_func_qn_cached(ctx, node);
118 cbm_throws_push(&ctx->result->throws, ctx->arena, thr);
119 }
120 }
121
122 extract_throws_clause(ctx, node, spec, cbm_enclosing_func_qn_cached(ctx, node));
123}
124
125// Iterative throw walker
126static void walk_throws(CBMExtractCtx *ctx, TSNode root, const CBMLangSpec *spec) {

Callers 1

walk_throwsFunction · 0.85

Calls 5

is_throw_nodeFunction · 0.85
resolve_exception_nameFunction · 0.85
cbm_throws_pushFunction · 0.85
extract_throws_clauseFunction · 0.85

Tested by

no test coverage detected