summaryrefslogtreecommitdiff
path: root/src/codegen/codegen_main.c
diff options
context:
space:
mode:
authorZuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian>2026-01-11 17:16:40 +0000
committerZuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian>2026-01-11 17:17:04 +0000
commitd2461482caf9e93d6e2bc7ff17567102f635211a (patch)
treec302d1a2e7cb829b6ed006c905db0b8bbf45f57a /src/codegen/codegen_main.c
parentf9b1992795142a073cd5dc1794350fc64e9aa695 (diff)
Fixed some things. Next thing will be tests.
Diffstat (limited to 'src/codegen/codegen_main.c')
-rw-r--r--src/codegen/codegen_main.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/codegen/codegen_main.c b/src/codegen/codegen_main.c
index 0e10869..c9c69f6 100644
--- a/src/codegen/codegen_main.c
+++ b/src/codegen/codegen_main.c
@@ -1,10 +1,10 @@
+#include "../ast/ast.h"
+#include "../zprep.h"
+#include "codegen.h"
#include <stdio.h>
-#include <string.h>
#include <stdlib.h>
-#include "codegen.h"
-#include "../zprep.h"
-#include "../ast/ast.h"
+#include <string.h>
// Helper: Check if a struct depends on another struct/enum by-value.
static int struct_depends_on(ASTNode *s1, const char *target_name)
@@ -191,7 +191,8 @@ void codegen_node(ParserContext *ctx, ASTNode *node, FILE *out)
if (node->type == NODE_ROOT)
{
ASTNode *kids = node->root.children;
- // Recursive Unwrap of Nested Roots (if accidentally wrapped multiple times).
+ // Recursive Unwrap of Nested Roots (if accidentally wrapped multiple
+ // times).
while (kids && kids->type == NODE_ROOT)
{
kids = kids->root.children;