ea55dedd07
- Split ast.h into granular headers in v0/ast/ - Split parser.c into modular implementation files in v0/parser/ - Move and rename parser tests to v0/parser/test_*.c - Update build system (include.mk) with modular sub-makefiles - Maintain v0/ast.h and v0/parser.h as umbrella headers
35 lines
763 B
C
35 lines
763 B
C
#ifndef AST_MODULE_H
|
|
#define AST_MODULE_H
|
|
|
|
#include "declaration.h"
|
|
#include <stddef.h>
|
|
|
|
/**
|
|
* The top-level model.
|
|
* Every file matches an entire Module.
|
|
*/
|
|
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;
|
|
|
|
/** @brief The list of aliases in the module. */
|
|
AliasDeclaration* aliases;
|
|
|
|
/** @brief The number of aliases in the module. */
|
|
size_t alias_count;
|
|
|
|
/** @brief The list of variables in the module. */
|
|
VariableDeclaration* variables;
|
|
|
|
/** @brief The number of variables in the module. */
|
|
size_t variable_count;
|
|
} Module;
|
|
|
|
#endif
|