add eval_no_lint

This commit is contained in:
b1ek 2023-08-22 22:48:59 +10:00
parent cb17edc450
commit 6a608d7e48
Signed by: blek
GPG Key ID: 14546221E3595D0C
1 changed files with 13 additions and 1 deletions

View File

@ -181,3 +181,15 @@ pub fn eval(bf_str: &&str) -> Result<[u8; 30000], String> {
Ok(memory) Ok(memory)
} }
pub fn eval_no_lint(bf_str: &&str) -> Result<[u8; 30000], String> {
let mut memory: [u8; 30000] = core::array::from_fn(|_| 0);
let mut pointer = 0 as usize;
let e = eval_mem(bf_str, &mut memory, &mut pointer);
if e.is_err() {
return Err(e.unwrap_err());
}
Ok(memory)
}