added argument type annotations and runtime checks. To do that new opcodes were created (PUSHTYP, PUSHTYPTYP, ERROR)

This commit is contained in:
cozis
2022-08-14 16:25:47 +02:00
parent bc516f470a
commit 6bd60bc84a
18 changed files with 571 additions and 68 deletions
+8 -2
View File
@@ -139,7 +139,10 @@ static _Bool interpret_file(const char *file)
}
Executable *exe = compile_source_and_print_error_on_failure(src);
if(exe == NULL) return 0;
if(exe == NULL) {
Source_Free(src);
return 0;
}
_Bool r = interpret(exe);
@@ -164,7 +167,10 @@ static _Bool interpret_code(const char *code)
}
Executable *exe = compile_source_and_print_error_on_failure(src);
if(exe == NULL) return 0;
if(exe == NULL) {
Source_Free(src);
return 0;
}
_Bool r = interpret(exe);