MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / find_child_by_kind

Method find_child_by_kind

codegraph-kernel/src/ccpp/mod.rs:1565–1569  ·  view source on GitHub ↗
(&self, node: Node<'t>, kind: &str)

Source from the content-addressed store, hash-verified

1563 }
1564
1565 fn find_child_by_kind(&self, node: Node<'t>, kind: &str) -> Option<Node<'t>> {
1566 (0..node.named_child_count())
1567 .filter_map(|i| node.named_child(i))
1568 .find(|c| c.kind() == kind)
1569 }
1570
1571 /// extractVariable: C takes the dedicated branch (file-scope declarators,
1572 /// tree-sitter.ts:2795); cpp takes the TS GENERIC fallback (direct

Callers 2

extract_type_aliasMethod · 0.80
extract_importMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected