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

Method _find_callee_function

rust-core/src/storage/incremental.rs:263–276  ·  view source on GitHub ↗

查找被调用函数

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

Source from the content-addressed store, hash-verified

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