From d2461482caf9e93d6e2bc7ff17567102f635211a Mon Sep 17 00:00:00 2001 From: Zuhaitz Méndez Fernández de Aránguiz Date: Sun, 11 Jan 2026 17:16:40 +0000 Subject: Fixed some things. Next thing will be tests. --- src/ast/ast.c | 6 +++--- src/ast/ast.h | 16 +++++++++------- 2 files changed, 12 insertions(+), 10 deletions(-) (limited to 'src/ast') diff --git a/src/ast/ast.c b/src/ast/ast.c index 4688bf7..f34370e 100644 --- a/src/ast/ast.c +++ b/src/ast/ast.c @@ -1,9 +1,9 @@ -#include -#include #include "ast.h" -#include "zprep.h" #include "../parser/parser.h" +#include "zprep.h" +#include +#include typedef struct TraitReg { diff --git a/src/ast/ast.h b/src/ast/ast.h index 67dc2f3..0da2c0d 100644 --- a/src/ast/ast.h +++ b/src/ast/ast.h @@ -2,8 +2,8 @@ #ifndef AST_H #define AST_H -#include #include "zprep.h" +#include // Forward declarations. struct ASTNode; @@ -129,12 +129,13 @@ struct ASTNode int line; // Source line number for debugging. // Type information. - char *resolved_type; // Legacy string representation (for example: "int", "User*"). - // > Yes, 'legacy' is a thing, this is the third iteration - // > of this project (for now). + char *resolved_type; // Legacy string representation (for example: "int", + // "User*"). > Yes, 'legacy' is a thing, this is the + // third iteration > of this project (for now). Type *type_info; // Formal type object (for inference/generics). Token token; - Token definition_token; // For LSP: Location where the symbol used in this node was defined. + Token definition_token; // For LSP: Location where the symbol used in this + // node was defined. union { @@ -375,8 +376,9 @@ struct ASTNode char *generic_param; char *parent; int is_union; - int is_packed; // @packed attribute. - int align; // @align(N) attribute, 0 = default. + int is_packed; // @packed attribute. + int align; // @align(N) attribute, 0 = default. + int is_incomplete; // Forward declaration (prototype) } strct; struct -- cgit v1.2.3