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

Function declares_member_function

codegraph-kernel/src/ccpp/mod.rs:2694–2702  ·  view source on GitHub ↗

declaresMemberFunction (languages/c-cpp.ts).

(declarator: Node)

Source from the content-addressed store, hash-verified

2692
2693/// declaresMemberFunction (languages/c-cpp.ts).
2694fn declares_member_function(declarator: Node) -> bool {
2695 let mut d = Some(declarator);
2696 while let Some(n) = d.filter(|n| matches!(n.kind(), "pointer_declarator" | "reference_declarator")) {
2697 d = inner_declarator(n);
2698 }
2699 d.filter(|n| n.kind() == "function_declarator")
2700 .map(|n| n.child_by_field_name("declarator").map(|i| i.kind()) != Some("parenthesized_declarator"))
2701 .unwrap_or(false)
2702}
2703
2704/// definingDeclaration (languages/c-cpp.ts): the `declaration` a class-like
2705/// definition is the type of (`struct Foo { … } foo;`). Its comment documents

Callers 1

Calls 2

inner_declaratorFunction · 0.85
mapMethod · 0.80

Tested by

no test coverage detected