all: fixed memleaks; compiler: closures work

This commit is contained in:
2017-09-07 17:41:27 +02:00
parent a37ec816e6
commit 682bc9db60
9 changed files with 180 additions and 44 deletions

7
main.c
View File

@@ -28,8 +28,13 @@ int main(int argc, char** argv) {
inp[size] = '\0';
sc_ast* ast = sc_parse(inp);
char* out = compile(ast);
printf("%s\n", compile(ast));
printf("%s\n", out);
free(inp);
free(out);
sc_ast_free(ast);
return 0;
}