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:2780–2795  ·  view source on GitHub ↗

Classify class label from AST node kind

Source from the content-addressed store, hash-verified

2778
2779// Classify class label from AST node kind
2780static const char *class_label_for_kind(const char *kind) {
2781 if (strcmp(kind, "interface_declaration") == 0 || strcmp(kind, "interface_type") == 0 ||
2782 strcmp(kind, "trait_item") == 0 || strcmp(kind, "trait_definition") == 0 ||
2783 strcmp(kind, "protocol_declaration") == 0) {
2784 return "Interface";
2785 }
2786 if (strcmp(kind, "enum_specifier") == 0 || strcmp(kind, "enum_declaration") == 0 ||
2787 strcmp(kind, "enum_item") == 0) {
2788 return "Enum";
2789 }
2790 if (strcmp(kind, "type_alias_declaration") == 0 || strcmp(kind, "type_item") == 0 ||
2791 strcmp(kind, "type_alias") == 0 || strcmp(kind, "type_definition") == 0) {
2792 return "Type";
2793 }
2794 return "Class";
2795}
2796
2797// --- Parameter type extraction ---
2798

Callers 1

extract_class_defFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected