~jacksonchen666/brainfuck_interpreter

0b017ba6807f76278d22d15f4c8de2d4b3a18035 — Jackson Chen 1 year, 1 month ago 8374e67
another todo comment
1 files changed, 1 insertions(+), 1 deletions(-)

M brainfuck.go
M brainfuck.go => brainfuck.go +1 -1
@@ 98,7 98,7 @@ func (ps *ProgramState) Step() error {
		if currentMemory == 0 {
			// TODO: debug check for sanity
			code_after := (*ps.code)[ps.codePointer:]
			location := strings.Index(code_after, "]") + ps.codePointer
			location := strings.Index(code_after, "]") + ps.codePointer // TODO: consider pre-processing [ and ]
			if location == -1 {
				panic("next ] not found") // TODO: something more graceful
			}