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

Method extract_cpp_qualified_method_name

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

extractCppQualifiedMethodName (languages/c-cpp.ts:75).

(&self, node: Node)

Source from the content-addressed store, hash-verified

632
633 /// extractCppQualifiedMethodName (languages/c-cpp.ts:75).
634 fn extract_cpp_qualified_method_name(&self, node: Node) -> Option<String> {
635 if let Some(n) = self.recover_cpp_macro_defined_name(node) {
636 return Some(n);
637 }
638 let declarator = node.child_by_field_name("declarator")?;
639 let qid = find_declarator_qualified_id(declarator)?;
640 let text = self.text(qid).trim();
641 let parts: Vec<&str> = text.split("::").filter(|p| !p.is_empty()).collect();
642 parts.last().map(|s| s.to_string())
643 }
644
645 /// recoverCppMacroDefinedName (languages/c-cpp.ts:49).
646 fn recover_cpp_macro_defined_name(&self, node: Node) -> Option<String> {

Callers 1

extract_name_rawMethod · 0.80

Calls 4

textMethod · 0.45
collectMethod · 0.45

Tested by

no test coverage detected