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

Function find_anonymous_class_body

codegraph-kernel/src/php.rs:1760–1767  ·  view source on GitHub ↗
(node: Node)

Source from the content-addressed store, hash-verified

1758}
1759
1760fn find_anonymous_class_body(node: Node) -> Option<Node> {
1761 for child in node.named_children(&mut node.walk()) {
1762 if matches!(child.kind(), "class_body" | "declaration_list") {
1763 return Some(child);
1764 }
1765 }
1766 None
1767}
1768
1769/// The shared `new ns.Foo<T>()` normalization: strip `<...` from the first
1770/// `<` (index > 0), keep the segment after the last `.`/`::`, strip ONE

Callers 2

visit_nodeMethod · 0.70

Calls 1

walkMethod · 0.45

Tested by

no test coverage detected