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

Function class_qn_for_node

internal/cbm/lsp/php_lsp.c:3167–3178  ·  view source on GitHub ↗

Compute the dotted class QN for a given class_declaration node, matching * how the unified extractor names defs (module_qn-prefixed). */

Source from the content-addressed store, hash-verified

3165/* Compute the dotted class QN for a given class_declaration node, matching
3166 * how the unified extractor names defs (module_qn-prefixed). */
3167static const char *class_qn_for_node(PHPLSPContext *ctx, TSNode class_node) {
3168 TSNode name_node = ts_node_child_by_field_name(class_node, "name", 4);
3169 if (ts_node_is_null(name_node))
3170 return NULL;
3171 char *cname = php_node_text(ctx, name_node);
3172 if (!cname)
3173 return NULL;
3174 if (ctx->module_qn) {
3175 return cbm_arena_sprintf(ctx->arena, "%s.%s", ctx->module_qn, cname);
3176 }
3177 return cbm_arena_strdup(ctx->arena, cname);
3178}
3179
3180static void extract_property_decl(PHPLSPContext *ctx, TSNode prop_decl, php_class_fields_t *out) {
3181 TSNode tnode = ts_node_child_by_field_name(prop_decl, "type", 4);

Callers 1

process_class_for_fieldsFunction · 0.85

Calls 3

php_node_textFunction · 0.85
cbm_arena_sprintfFunction · 0.50
cbm_arena_strdupFunction · 0.50

Tested by

no test coverage detected