don't fail the build script if we couldn't parse a file
this way we get to the actual compilation in which rustc shouldl fail with a more helpfull error message
This commit is contained in:
@@ -133,7 +133,12 @@ pub fn index_static_strings(instruction_rs_path: &std::path::Path) -> TokenStrea
|
||||
let syntax = match syn::parse_file(&src) {
|
||||
Ok(s) => s,
|
||||
Err(e) => {
|
||||
panic!("parse error: {e} in file {path:?}");
|
||||
println!("cargo::warning=parse error: {e} in file {path:?}");
|
||||
syn::File{
|
||||
shebang: None,
|
||||
attrs: vec![],
|
||||
items: vec![],
|
||||
}
|
||||
}
|
||||
};
|
||||
Ok(syntax)
|
||||
|
||||
Reference in New Issue
Block a user