解析目录下的所有文件
(&mut self, dir: &Path)
| 670 | |
| 671 | /// 解析目录下的所有文件 |
| 672 | pub fn parse_directory(&mut self, dir: &Path) -> Result<(), String> { |
| 673 | let files = self.scan_directory(dir); |
| 674 | info!("Found {} files to parse", files.len()); |
| 675 | |
| 676 | for file in files { |
| 677 | if let Err(e) = self.parse_file(&file) { |
| 678 | warn!("Failed to parse {}: {}", file.display(), e); |
| 679 | } |
| 680 | } |
| 681 | |
| 682 | Ok(()) |
| 683 | } |
| 684 | |
| 685 | /// 构建完整的代码图(增量构建) |
| 686 | pub fn build_code_graph(&mut self, dir: &Path) -> Result<CodeGraph, String> { |
nothing calls this directly
no test coverage detected