diff options
| author | physick <mynameisgennadiy@vk.com> | 2026-07-28 01:07:07 +0500 |
|---|---|---|
| committer | physick <mynameisgennadiy@vk.com> | 2026-07-28 01:07:07 +0500 |
| commit | 2802c8e8bb987206da0991129e30f0c198cd8f37 (patch) | |
| tree | ea24e597346e986039dde716f73d97f42d636056 /src/wren_inter/wren_inter.h | |
| parent | 26957338e8b42df4ad18ab38f08c70fba4c14bb4 (diff) | |
versioning fix
Diffstat (limited to 'src/wren_inter/wren_inter.h')
| -rw-r--r-- | src/wren_inter/wren_inter.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/wren_inter/wren_inter.h b/src/wren_inter/wren_inter.h index 100f946..a84323f 100644 --- a/src/wren_inter/wren_inter.h +++ b/src/wren_inter/wren_inter.h @@ -3,10 +3,22 @@ #include <wren.h> -char *EvaluateScript(char *script); +enum PUZZLE_TEST_RESULT { + RESULT_OK = 0, + RESULT_WRONG_ANSWER, + RESULT_COMPTIME_NO_ENTRY, + RESULT_COMPTIME_ERR, + RESULT_RUNTIME_ERR, + // TODO: add async evaluation to prevent `while (true)` situation + RESULT_TIMEOUT, + RESULT_INIT_ERROR, +}; WrenVM *InterpreterPrepareMachine(); char *GetMachineOutput(WrenVM *vm); void InterpreterFreeMachine(WrenVM *vm); +// Runs the machine and returns +enum PUZZLE_TEST_RESULT wrenInterpretLimited(WrenVM *vm, const char *module, + const char *script, int sMax); #endif // WREN_INTER_H |
