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

Function is_member_access_node

internal/cbm/helpers.c:560–580  ·  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

558// set covering the common grammars; used only for the structural "access depth"
559// smell, so unmatched grammars simply report 0 (never wrong, just silent).
560static bool is_member_access_node(const char *kind) {
561 static const char *const access[] = {"member_expression",
562 "field_expression",
563 "selector_expression",
564 "field_access",
565 "member_access_expression",
566 "navigation_expression",
567 "attribute",
568 "subscript_expression",
569 "subscript",
570 "index_expression",
571 "element_access_expression",
572 "scoped_identifier",
573 NULL};
574 for (const char *const *a = access; *a; a++) {
575 if (strcmp(kind, *a) == 0) {
576 return true;
577 }
578 }
579 return false;
580}
581
582// One traversal computing cyclomatic + cognitive + loop-nesting + access-depth
583// 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