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

Function child_named

internal/cbm/lsp/php_lsp.c:76–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74}
75
76static TSNode child_named(TSNode parent, const char *kind) {
77 if (ts_node_is_null(parent))
78 return parent;
79 uint32_t nc = ts_node_child_count(parent);
80 for (uint32_t i = 0; i < nc; i++) {
81 TSNode c = ts_node_child(parent, i);
82 if (!ts_node_is_null(c) && strcmp(ts_node_type(c), kind) == 0)
83 return c;
84 }
85 TSNode null_node;
86 memset(&null_node, 0, sizeof(null_node));
87 return null_node;
88}
89
90/* PHP qualified names use "." in the graph (project.path.module.class[.method]).
91 * Convert "App\\Models\\User" to "App.Models.User" so we can compose with

Callers 2

process_class_declFunction · 0.85
process_class_for_fieldsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected