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

Function find_anonymous_class_body

codegraph-kernel/src/csharp.rs:1719–1726  ·  view source on GitHub ↗
(node: Node)

Source from the content-addressed store, hash-verified

1717}
1718
1719fn find_anonymous_class_body(node: Node) -> Option<Node> {
1720 for child in node.named_children(&mut node.walk()) {
1721 if matches!(child.kind(), "class_body" | "declaration_list") {
1722 return Some(child);
1723 }
1724 }
1725 None
1726}
1727
1728/// The `new ns.Foo<T>()` name normalization shared by instantiation /
1729/// anonymous-class extraction: strip `<...` from the first `<` (index > 0),

Callers 2

visit_nodeMethod · 0.70

Calls 1

walkMethod · 0.45

Tested by

no test coverage detected