add eval_no_lint
This commit is contained in:
parent
cb17edc450
commit
6a608d7e48
14
src/lib.rs
14
src/lib.rs
|
@ -180,4 +180,16 @@ 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)
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue