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

Function push_simple_class_def

internal/cbm/extract_defs.c:3297–3309  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3295}
3296
3297static void push_simple_class_def(CBMExtractCtx *ctx, TSNode node, char *name, const char *label) {
3298 CBMArena *a = ctx->arena;
3299 CBMDefinition def;
3300 memset(&def, 0, sizeof(def));
3301 def.name = name;
3302 def.qualified_name = cbm_fqn_compute(a, ctx->project, ctx->rel_path, qn_safe_segment(a, name));
3303 def.label = label;
3304 def.file_path = ctx->rel_path;
3305 def.start_line = ts_node_start_point(node).row + TS_LINE_OFFSET;
3306 def.end_line = ts_node_end_point(node).row + TS_LINE_OFFSET;
3307 def.is_exported = true;
3308 cbm_defs_push(&ctx->result->defs, a, def);
3309}
3310
3311// Find TOML table key name from children.
3312static char *find_toml_key_name(CBMArena *a, TSNode node, const char *source) {

Callers 1

extract_config_class_defFunction · 0.85

Calls 3

cbm_fqn_computeFunction · 0.85
qn_safe_segmentFunction · 0.85
cbm_defs_pushFunction · 0.85

Tested by

no test coverage detected