add eval_no_lint
This commit is contained in:
parent
cb17edc450
commit
6a608d7e48
12
src/lib.rs
12
src/lib.rs
|
@ -181,3 +181,15 @@ pub fn eval(bf_str: &&str) -> Result<[u8; 30000], String> {
|
|||
|
||||
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