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

Function objectscript_get_class_name

internal/cbm/extract_unified.c:863–874  ·  view source on GitHub ↗

Resolve the FQN of an ObjectScript class_definition node (via its class_name).

Source from the content-addressed store, hash-verified

861
862// Resolve the FQN of an ObjectScript class_definition node (via its class_name).
863static const char *objectscript_get_class_name(CBMExtractCtx *ctx, TSNode node) {
864 for (uint32_t i = 0; i < ts_node_named_child_count(node); i++) {
865 TSNode child = ts_node_named_child(node, i);
866 if (strcmp(ts_node_type(child), "class_name") == 0) {
867 char *name = cbm_node_text(ctx->arena, child, ctx->source);
868 if (name && name[0]) {
869 return cbm_fqn_compute(ctx->arena, ctx->project, ctx->rel_path, name);
870 }
871 }
872 }
873 return NULL;
874}
875
876// Resolve the QN of an ObjectScript method/classmethod/query node for scope tracking.
877static const char *objectscript_get_method_qn(CBMExtractCtx *ctx, TSNode node,

Callers 1

compute_class_qnFunction · 0.85

Calls 2

cbm_node_textFunction · 0.85
cbm_fqn_computeFunction · 0.85

Tested by

no test coverage detected