From 9addce5f30e063afa5f688af762481112f91b328 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?b=CA=B0edoh=E2=82=82=20sw=C3=A9?= Date: Tue, 11 Jun 2024 21:31:30 +0500 Subject: [PATCH] Add a debug switch --- src/main.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main.c b/src/main.c index 5aa3dba..487edd4 100644 --- a/src/main.c +++ b/src/main.c @@ -31,6 +31,15 @@ int main(int argc, char *argv[]) { return 1; } +#ifdef PROCESS_DEBUG + + printf("Parsed: \n"); + printtree(code, 0); + process(code, NULL); + printf("\nProcessed: \n"); + printtree(code, 0); + +#else process(code, NULL); char* compiled = compile(code); @@ -39,6 +48,8 @@ int main(int argc, char *argv[]) { free(compiled); compiled = NULL; +#endif + se_free(code); code = NULL;