nixpulvis / brainfuck

A simple brainfuck interpreter in Rust.
http://nixpulvis.com/brainfuck
23 stars 3 forks source link

Differentiate Program Counter Hitting End from Out of Bounds #22

Open nixpulvis opened 8 years ago

nixpulvis commented 8 years ago

Right now we simply return an Option for a program's get method. This allows us to tell when we have an instruction, but it doesn't let us determine if the requested value is out of bounds because we are done with the program, or out of bounds because we did something bad in the interpreter. We should be able to distinguish between these from the perspective of the program's API.