diff --git a/src/dev.h b/src/dev.h new file mode 100644 index 0000000..fe997d5 --- /dev/null +++ b/src/dev.h @@ -0,0 +1,24 @@ +#ifndef _TODO_H +#define _TODO_H + + +#ifdef __cplusplus +#include +[[noreturn]] +#else +#include + +__attribute__((noreturn)) +#endif +inline static void _dev__unimplemented(const char* msg) +{ + fputs("unimplemented", stderr); + if(msg) fputs(msg, stderr); + fputc('\n', stderr); + + abort(); +} + +#define TODO(msg) _dev__unimplemented(": TODO: " msg) + +#endif /* _TODO_H */ diff --git a/src/state.cpp b/src/state.cpp index 882aaa6..e86c7da 100644 --- a/src/state.cpp +++ b/src/state.cpp @@ -1,6 +1,13 @@ #include +#include "dev.h" + +void _sm_pop_stack(sm_state* state) +{ + TODO("Free the current stack frame in `state` and replace it with the previous one"); +} sm_yield _sm_noop(sm_state*) { return (sm_yield)nullptr; } +