From 8f122d35232c9a72b85f7ace2715ce11593852cd Mon Sep 17 00:00:00 2001
From: night0721 <night@night0721.xyz>
Date: Thu, 16 Jan 2025 23:01:37 +0000
Subject: [PATCH] Remove debug printf and fix stmt_t forward declaration

---
 include/stmt.h | 6 +++---
 src/parser.c   | 6 ------
 2 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/include/stmt.h b/include/stmt.h
index b32aa7b..efd1e23 100644
--- a/include/stmt.h
+++ b/include/stmt.h
@@ -25,12 +25,12 @@ typedef enum {
 typedef struct stmt_t stmt_t;
 
 typedef struct {
-	struct stmt_t *statements;
+	stmt_t *statements;
 	int length;
 	int capacity;
 } stmt_array_t;
 
-typedef struct stmt_t {
+struct stmt_t {
 	stmt_type_t type;
 	union {
 		struct {
@@ -70,6 +70,6 @@ typedef struct stmt_t {
 			struct stmt_t *body;
 		} _while;
 	} as;
-} stmt_t;
+};
 
 #endif 
diff --git a/src/parser.c b/src/parser.c
index 87474c3..3a34605 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -58,14 +58,12 @@ void free_expr(expr_t *expr)
 			break;
 	
 		case EXPR_VARIABLE:
-			printf("hereR?\n");
 			free(expr->as.variable.name.value);
 			free(expr);
 			break;
 
 		case EXPR_ASSIGN:
 			free_expr(expr->as.assign.name);
-			printf("hiiii\n");
 			free_expr(expr->as.assign.value);
 			free(expr);
 			break;
@@ -243,20 +241,16 @@ void free_statements(stmt_array_t *array)
 {
 	for (int i = 0; i < array->length; i++) {
 		if (array->statements[i].type == STMT_PRINT) {
-			printf("this should go fifth\n");
 			free_expr(array->statements[i].as.print.expression);
 		}
 		if (array->statements[i].type == STMT_EXPR) {
-			printf("third\n");
 			free_expr(array->statements[i].as.expr.expression);
 		}
 		if (array->statements[i].type == STMT_VAR) {
-			printf("this should go second/forth\n");
 			free(array->statements[i].as.variable.name.value);
 			free_expr(array->statements[i].as.variable.initializer);
 		}
 		if (array->statements[i].type == STMT_BLOCK) {
-			printf("this should go first/third\n");
 			free_statements(array->statements[i].as.block.statements);
 		}
 	}