brainfuck interpreter
brainfuck cli rust
5

Configure Feed

Select the types of activity you want to include in your feed.

evaluator: created relevant error for input overflow during runtim

digi.rip (Jun 10, 2026, 4:15 PM EDT) ffa07b63 ffcfe7ef

+18 -16
+18 -16
src/evaluator.rs
··· 54 54 }, 55 55 56 56 #[diagnostic( 57 + code(tachyon::runtime::read_overflow), 58 + help("change cell overflow behavior to wrap") 59 + )] 60 + ReadOverflow { 61 + #[source_code] 62 + src: NamedSource<Arc<str>>, 63 + #[label("read overflowed here")] 64 + span: SourceSpan, 65 + }, 66 + 67 + #[diagnostic( 57 68 code(tachyon::runtime::invalid_token), 58 69 help("this is a bug with the tokenizer. please report it!"), 59 70 url("https://tangled.org/digi.rip/tachyon/issues") ··· 87 98 RuntimeError::DataPointerNegative { .. } => { 88 99 write!(f, "data pointer moved past start of tape") 89 100 } 90 - RuntimeError::CellUnderflow { .. } => { 91 - write!(f, "cell value went below 0") 92 - } 93 - RuntimeError::CellOverflow { .. } => { 94 - write!(f, "cell value went over 255") 95 - } 96 - RuntimeError::InvalidToken { .. } => { 97 - write!(f, "invalid token found") 98 - } 99 - RuntimeError::IoReadError { err, .. } => { 100 - write!(f, "failed to read input: {}", err) 101 - } 102 - RuntimeError::IoWriteError { err, .. } => { 103 - write!(f, "failed to write output: {}", err) 104 - } 101 + RuntimeError::CellUnderflow { .. } => write!(f, "cell value went below 0"), 102 + RuntimeError::CellOverflow { .. } => write!(f, "cell value went over 255"), 103 + RuntimeError::ReadOverflow { .. } => write!(f, "user broke overflow rule during input"), 104 + RuntimeError::InvalidToken { .. } => write!(f, "invalid token found"), 105 + RuntimeError::IoReadError { err, .. } => write!(f, "failed to read input: {}", err), 106 + RuntimeError::IoWriteError { err, .. } => write!(f, "failed to write output: {}", err), 105 107 } 106 108 } 107 109 } ··· 368 370 369 371 match buffer.parse::<u16>() { 370 372 Ok(val) if val > 255 && self.cell_oob == OOBBehavior::Error => { 371 - return Err(RuntimeError::CellOverflow { 373 + return Err(RuntimeError::ReadOverflow { 372 374 src: NamedSource::new(Arc::clone(&self.filename), Arc::clone(&self.source)), 373 375 span: (current.offset, 1).into(), 374 376 });