处理未解析的调用
(
&self,
caller_id: &Uuid,
call_name: &str,
file_path: &PathBuf,
call_line: usize,
call_graph: &mut PetCodeGraph,
)
| 274 | |
| 275 | /// 处理未解析的调用 |
| 276 | fn _handle_unresolved_call( |
| 277 | &self, |
| 278 | caller_id: &Uuid, |
| 279 | call_name: &str, |
| 280 | file_path: &PathBuf, |
| 281 | call_line: usize, |
| 282 | call_graph: &mut PetCodeGraph, |
| 283 | ) { |
| 284 | // 创建未解析的调用关系 |
| 285 | let relation = CallRelation { |
| 286 | caller_id: *caller_id, |
| 287 | callee_id: Uuid::new_v4(), // 临时ID |
| 288 | caller_name: "".to_string(), |
| 289 | callee_name: call_name.to_string(), |
| 290 | caller_file: file_path.clone(), |
| 291 | callee_file: file_path.clone(), |
| 292 | line_number: call_line, |
| 293 | is_resolved: false, |
| 294 | }; |
| 295 | |
| 296 | if let Err(e) = call_graph.add_call_relation(relation) { |
| 297 | warn!("Failed to add unresolved call relation: {}", e); |
| 298 | } |
| 299 | } |
| 300 | |
| 301 | /// 移除文件相关的所有实体 |
| 302 | fn _remove_file_entities( |
no test coverage detected