From 2802c8e8bb987206da0991129e30f0c198cd8f37 Mon Sep 17 00:00:00 2001 From: physick Date: Tue, 28 Jul 2026 01:07:07 +0500 Subject: versioning fix --- src/wren_inter/wren_inter.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/wren_inter/wren_inter.h') 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 -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 -- cgit v1.3