added basic functionalities to the debugger mode

This commit is contained in:
cozis
2021-11-02 09:17:03 +00:00
parent 7e04b0fc6d
commit 022610bb71
7 changed files with 267 additions and 22 deletions
+7 -2
View File
@@ -267,13 +267,18 @@ Executable *compile(AST *ast, BPAlloc *alloc, Error *error)
Executable *exe = NULL;
ExeBuilder *exeb = ExeBuilder_New(alloc2);
if(exeb)
if(exeb != NULL)
{
if(!emit_instr_for_node(exeb, ast->root, error))
return 0;
if(ExeBuilder_Append(exeb, error, OPCODE_RETURN, NULL, 0, Source_GetSize(ast->src), 0))
exe = ExeBuilder_Finalize(exeb, error);
{
exe = ExeBuilder_Finalize(exeb, error);
if(exe != NULL)
Executable_SetSource(exe, ast->src);
}
}
if(alloc == NULL)