Rename AST structures to Tree and relocate freeing logic
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user