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

Function wd_push_children_reverse

internal/cbm/extract_defs.c:5734–5744  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5732}
5733
5734static void wd_push_children_reverse(wd_stack_t *s, TSNode node, const char *enclosing_qn) {
5735 uint32_t cc = ts_node_child_count(node);
5736 if (cc == 0) {
5737 return;
5738 }
5739 TSNode *kids = wd_collect_children(node, cc);
5740 for (int i = (int)cc - SKIP_CHAR; i >= 0; i--) {
5741 wd_push(s, kids ? kids[i] : ts_node_child(node, (uint32_t)i), enclosing_qn);
5742 }
5743 free(kids);
5744}
5745
5746// Push nested class nodes from a class body container onto the defs stack.
5747// Iteratively walks into wrapper nodes (field_declaration, template_declaration).

Callers 1

walk_defsFunction · 0.85

Calls 2

wd_collect_childrenFunction · 0.85
wd_pushFunction · 0.85

Tested by

no test coverage detected