diff --git a/mers_lib/Cargo.toml b/mers_lib/Cargo.toml index b58c567..b647982 100755 --- a/mers_lib/Cargo.toml +++ b/mers_lib/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mers_lib" -version = "0.7.1" +version = "0.7.2" edition = "2021" license = "MIT OR Apache-2.0" description = "library to use the mers language in other projects" diff --git a/mers_lib/src/parsing/mod.rs b/mers_lib/src/parsing/mod.rs index dd96571..710d108 100755 --- a/mers_lib/src/parsing/mod.rs +++ b/mers_lib/src/parsing/mod.rs @@ -30,13 +30,25 @@ pub fn compile( statement: &(impl program::parsed::MersStatement + ?Sized), mut info: crate::program::parsed::Info, ) -> Result, CheckError> { - statement.compile(&mut info, CompInfo::default()) + compile_mut(statement, &mut info) +} +pub fn compile_mut( + statement: &(impl program::parsed::MersStatement + ?Sized), + info: &mut crate::program::parsed::Info, +) -> Result, CheckError> { + statement.compile(info, CompInfo::default()) } pub fn check( statement: &(impl program::run::MersStatement + ?Sized), mut info: crate::program::run::CheckInfo, ) -> Result { - let o = statement.check(&mut info, None)?; + check_mut(statement, &mut info) +} +pub fn check_mut( + statement: &(impl program::run::MersStatement + ?Sized), + info: &mut crate::program::run::CheckInfo, +) -> Result { + let o = statement.check(info, None)?; let mut err = None; for (try_stmt, used) in info.global.unused_try_statements.lock().unwrap().iter() { if used.iter().any(|v| v.is_some()) {