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

Function declares_member_function

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

declaresMemberFunction (languages/c-cpp.ts).

(declarator: Node)

Source from the content-addressed store, hash-verified

2667
2668/// declaresMemberFunction (languages/c-cpp.ts).
2669fn declares_member_function(declarator: Node) -> bool {
2670 let mut d = Some(declarator);
2671 while let Some(n) = d.filter(|n| matches!(n.kind(), "pointer_declarator" | "reference_declarator")) {
2672 d = inner_declarator(n);
2673 }
2674 d.filter(|n| n.kind() == "function_declarator")
2675 .map(|n| n.child_by_field_name("declarator").map(|i| i.kind()) != Some("parenthesized_declarator"))
2676 .unwrap_or(false)
2677}
2678
2679/// definingDeclaration (languages/c-cpp.ts): the `declaration` a class-like
2680/// 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