MCPcopy Create free account
hub / github.com/CodeBendKit/codeseek / _find_callee_function

Method _find_callee_function

rust-core/src/codegraph/parser.rs:260–273  ·  view source on GitHub ↗

查找被调用函数

(&self, call_name: &str, function_ids: &[Uuid], call_graph: &PetCodeGraph)

Source from the content-addressed store, hash-verified

258
259 /// 查找被调用函数
260 fn _find_callee_function(&self, call_name: &str, function_ids: &[Uuid], call_graph: &PetCodeGraph) -> Option<Uuid> {
261 // 先在本文件查找
262 for &func_id in function_ids {
263 if let Some(func) = call_graph.get_function_by_id(&func_id) {
264 if func.name == call_name {
265 return Some(func_id);
266 }
267 }
268 }
269
270 // 再全局查找
271 let global_functions = call_graph.find_functions_by_name(call_name);
272 global_functions.first().map(|f| f.id)
273 }
274
275 /// 处理未解析的调用
276 fn _handle_unresolved_call(

Callers 1

_analyze_file_callsMethod · 0.45

Calls 2

get_function_by_idMethod · 0.80

Tested by

no test coverage detected