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

Function find_child

src/foundation/yaml.c:316–326  ·  view source on GitHub ↗

Find a child node by key in a map node. */

Source from the content-addressed store, hash-verified

314
315/* Find a child node by key in a map node. */
316static const cbm_yaml_node_t *find_child(const cbm_yaml_node_t *node, const char *key) {
317 if (!node || !key) {
318 return NULL;
319 }
320 for (int i = 0; i < node->child_count; i++) {
321 if (node->children[i]->key && strcmp(node->children[i]->key, key) == 0) {
322 return node->children[i];
323 }
324 }
325 return NULL;
326}
327
328/* Navigate to a node by dot-separated path. */
329static const cbm_yaml_node_t *navigate(const cbm_yaml_node_t *root, const char *path) {

Callers 1

navigateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected