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

Function find_anonymous_class_body

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

Source from the content-addressed store, hash-verified

1496}
1497
1498fn find_anonymous_class_body(node: Node) -> Option<Node> {
1499 for i in 0..node.named_child_count() {
1500 if let Some(child) = node.named_child(i) {
1501 if matches!(child.kind(), "class_body" | "declaration_list") {
1502 return Some(child);
1503 }
1504 }
1505 }
1506 None
1507}
1508
1509/// The shared `new ns.Foo<T>()` normalization: strip `<...` from the first
1510/// `<` (index > 0), keep the segment after the last `.`/`::`, strip ONE

Callers 2

visit_nodeMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected