summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorA404M <ahmadmahmoudiprogrammer@gmail.com>2025-04-24 19:37:45 +0330
committerA404M <ahmadmahmoudiprogrammer@gmail.com>2025-04-24 19:37:45 +0330
commitcaf6ecd9344b13c443435f94c3c5b8ccf717e853 (patch)
tree881708e5e0b49067fa8e43ee0c76df5a29431602 /src/main.c
parentcfc289f11c09aad28482204255934742e0f3f87f (diff)
some clean ups
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index fad415b..323b04b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -6,7 +6,7 @@
#include <time.h>
// #define PRINT_COMPILE_TREE
-#define PRINT_STATISTICS
+// #define PRINT_STATISTICS
#ifdef PRINT_STATISTICS
static struct timespec diff(struct timespec end, struct timespec start) {
@@ -53,7 +53,9 @@ static int run(const char *filePath) {
totalTime = add(totalTime, astTime);
#endif
#ifdef PRINT_COMPILE_TREE
- astTreeRootPrint(astTree);
+ for (size_t i = 0; i < astTrees.size; ++i) {
+ astTreeRootPrint(astTrees.data[i]);
+ }
#endif
#ifdef PRINT_STATISTICS
clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &start);