Rename AST structures to Tree and relocate freeing logic

This commit is contained in:
2026-04-30 21:46:15 +02:00
parent ea55dedd07
commit 177fb971e4
17 changed files with 162 additions and 153 deletions
+6 -6
View File
@@ -10,7 +10,7 @@ typedef struct {
/** @brief Whether the import is public or not. */
bool is_public;
} ImportDeclaration;
} ImportTree;
/**
* A declaration that aliases one type to another.
@@ -20,8 +20,8 @@ typedef struct {
const char* name;
/** @brief The value of the alias. */
TypeExpression value;
} AliasDeclaration;
TypeTree value;
} AliasTree;
/**
* A declaration of a variable, which may be a constant or not, and may be static or not.
@@ -31,10 +31,10 @@ typedef struct {
char* name;
/** @brief The type of the variable. */
TypeExpression type;
TypeTree type;
/** @brief The optional initializer expression. */
Expression* initializer;
ExpressionTree* initializer;
/** @brief Whether the variable is public or not. */
bool is_public;
@@ -44,6 +44,6 @@ typedef struct {
/** @brief Whether the variable is a constant or not. */
bool is_const;
} VariableDeclaration;
} VariableTree;
#endif