Add a debug switch
This commit is contained in:
parent
07402a6b42
commit
9addce5f30
11
src/main.c
11
src/main.c
@ -31,6 +31,15 @@ int main(int argc, char *argv[]) {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef PROCESS_DEBUG
|
||||||
|
|
||||||
|
printf("Parsed: \n");
|
||||||
|
printtree(code, 0);
|
||||||
|
process(code, NULL);
|
||||||
|
printf("\nProcessed: \n");
|
||||||
|
printtree(code, 0);
|
||||||
|
|
||||||
|
#else
|
||||||
process(code, NULL);
|
process(code, NULL);
|
||||||
|
|
||||||
char* compiled = compile(code);
|
char* compiled = compile(code);
|
||||||
@ -39,6 +48,8 @@ int main(int argc, char *argv[]) {
|
|||||||
free(compiled);
|
free(compiled);
|
||||||
compiled = NULL;
|
compiled = NULL;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
se_free(code);
|
se_free(code);
|
||||||
code = NULL;
|
code = NULL;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user