Support tree; Do not enforce LBA source for Overlays

This commit is contained in:
2024-01-03 17:45:57 -06:00
parent c142f3b0d6
commit cb304ff9bb
5 changed files with 23 additions and 7 deletions

View File

@@ -8,9 +8,9 @@ panic = "abort"
[dependencies]
cdtypes = {path = "../cdtypes"}
clap = {version = "*", features = ["derive"]}
colored = "*"
no-comment = "*"
paste = "*"
roxmltree = "*"
clap = {version = "4.4.11", features = ["derive"]}
colored = "2.1.0"
no-comment = "0.0.3"
paste = "1.0.14"
roxmltree = "0.19.0"
tool_helper = {path = "../tool_helper"}

View File

@@ -120,7 +120,13 @@ fn load_lba_names(lba_source: PathBuf) -> Result<LBANameVec, Error> {
Ok(file[start..end].to_owned())
}
let file = read_file_to_string(&lba_source)?.chars().without_comments(languages::c()).collect::<String>();
let file_content = {
match read_file_to_string(&lba_source) {
Ok(data) => data,
Err(_) => return Ok(LBANameVec::new())
}
};
let file = file_content.chars().without_comments(languages::c()).collect::<String>();
let file = get_part_of_interest(file, &lba_source)?;
let mut lba_names = Vec::new();