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

Function is_inside_call

internal/cbm/extract_usages.c:18–29  ·  view source on GitHub ↗

Check if a node is inside a call expression (to avoid double-counting as usage)

Source from the content-addressed store, hash-verified

16
17// Check if a node is inside a call expression (to avoid double-counting as usage)
18static bool is_inside_call(TSNode node, const CBMLangSpec *spec) {
19 TSNode cur = ts_node_parent(node);
20 int depth = 0;
21 while (!ts_node_is_null(cur) && depth < MAX_PARENT_DEPTH) {
22 if (cbm_kind_in_set(cur, spec->call_node_types)) {
23 return true;
24 }
25 cur = ts_node_parent(cur);
26 depth++;
27 }
28 return false;
29}
30
31// Check if a node is inside an import statement
32static bool is_inside_import(TSNode node, const CBMLangSpec *spec) {

Callers 1

try_emit_usageFunction · 0.85

Calls 1

cbm_kind_in_setFunction · 0.85

Tested by

no test coverage detected