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

Function class_label_for_kind

internal/cbm/extract_defs.c:2628–2643  ·  view source on GitHub ↗

Classify class label from AST node kind

Source from the content-addressed store, hash-verified

2626
2627// Classify class label from AST node kind
2628static const char *class_label_for_kind(const char *kind) {
2629 if (strcmp(kind, "interface_declaration") == 0 || strcmp(kind, "interface_type") == 0 ||
2630 strcmp(kind, "trait_item") == 0 || strcmp(kind, "trait_definition") == 0 ||
2631 strcmp(kind, "protocol_declaration") == 0) {
2632 return "Interface";
2633 }
2634 if (strcmp(kind, "enum_specifier") == 0 || strcmp(kind, "enum_declaration") == 0 ||
2635 strcmp(kind, "enum_item") == 0) {
2636 return "Enum";
2637 }
2638 if (strcmp(kind, "type_alias_declaration") == 0 || strcmp(kind, "type_item") == 0 ||
2639 strcmp(kind, "type_alias") == 0 || strcmp(kind, "type_definition") == 0) {
2640 return "Type";
2641 }
2642 return "Class";
2643}
2644
2645// --- Parameter type extraction ---
2646

Callers 1

extract_class_defFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected