From 9229bc08997bc3539a8e186e399acd4f55dc64a3 Mon Sep 17 00:00:00 2001 From: "K. Lange" Date: Mon, 8 Mar 2021 11:08:33 +0900 Subject: [PATCH] Attach a dummy __doc__ for -c option so strings don't throw syntax error --- src/kuroko.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/kuroko.c b/src/kuroko.c index 3fe9788..4cbdb77 100644 --- a/src/kuroko.c +++ b/src/kuroko.c @@ -566,6 +566,7 @@ static int runString(char * argv[], int flags, char * string) { findInterpreter(argv); krk_initVM(flags); krk_startModule("__main__"); + krk_attachNamedValue(&krk_currentThread.module->fields,"__doc__", NONE_VAL()); krk_interpret(string, ""); krk_freeVM(); return 0;