From: Skgland Date: Fri, 8 Aug 2025 23:59:18 +0000 (+0200) Subject: don't fail the build script if we couldn't parse a file X-Git-Tag: v0.10.0~11^2~23 X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=35d34231f2bfe5788e6785fec5ca59344262758c;p=scryer-prolog.git 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 --- diff --git a/build/static_string_indexing.rs b/build/static_string_indexing.rs index 7309f1cf..1a00e17b 100644 --- a/build/static_string_indexing.rs +++ b/build/static_string_indexing.rs @@ -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)