Add import parsing

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-04-25 14:30:11 +02:00
parent 116bdecafe
commit 7c7e0c3272
6 changed files with 100 additions and 0 deletions
+13
View File
@@ -4,6 +4,13 @@
#ifndef AST_H
#define AST_H
#include <stddef.h>
typedef struct {
/// @brief The name of the module being imported.
char* module_name;
} ImportDeclaration;
/**
* The top-level model.
* Every file matches an entire Module.
@@ -11,6 +18,12 @@
typedef struct {
/// @brief The name of the module.
char* name;
/// @brief The list of imports in the module.
ImportDeclaration* imports;
/// @brief The number of imports in the module.
size_t import_count;
} Module;
#endif