rrthomas / mit

A simple stack-based VM
Other
10 stars 3 forks source link

`MIT_ERROR_BREAK` vs `MIT_ERROR_OK` #372

Closed apt1002 closed 4 years ago

apt1002 commented 4 years ago

Consistently use MIT_ERROR_OK for normal termination and MIT_ERROR_BREAK to signal that a break_fn wants to stop execution. If a caller receives the former code, it will continue execution (e.g. if a subroutine returns normally), but if it receives the latter it will propagate the error.

Known violations of this:

Update documentation in mit.h for mit_run_break.