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

Function is_member_access_node

internal/cbm/helpers.c:736–756  ·  view source on GitHub ↗

Is `kind` a chained member/subscript access node? Language-agnostic generic set covering the common grammars; used only for the structural "access depth" smell, so unmatched grammars simply report 0 (never wrong, just silent).

Source from the content-addressed store, hash-verified

734// set covering the common grammars; used only for the structural "access depth"
735// smell, so unmatched grammars simply report 0 (never wrong, just silent).
736static bool is_member_access_node(const char *kind) {
737 static const char *const access[] = {"member_expression",
738 "field_expression",
739 "selector_expression",
740 "field_access",
741 "member_access_expression",
742 "navigation_expression",
743 "attribute",
744 "subscript_expression",
745 "subscript",
746 "index_expression",
747 "element_access_expression",
748 "scoped_identifier",
749 NULL};
750 for (const char *const *a = access; *a; a++) {
751 if (strcmp(kind, *a) == 0) {
752 return true;
753 }
754 }
755 return false;
756}
757
758// One traversal computing cyclomatic + cognitive + loop-nesting + access-depth
759// metrics. Each frame carries its branch-, loop- and access-nesting depth so

Callers 1

cbm_compute_complexityFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected