Add initial variable work
This commit is contained in:
@@ -62,6 +62,26 @@ typedef struct {
|
||||
bool is_public;
|
||||
} AliasDeclaration;
|
||||
|
||||
/**
|
||||
* A declaration of a variable, which may be a constant or not, and may be static or not.
|
||||
*/
|
||||
typedef struct {
|
||||
/** @brief The name of the variable. */
|
||||
char* name;
|
||||
|
||||
/** @brief The type of the variable. */
|
||||
TypeExpression type;
|
||||
|
||||
/** @brief Whether the variable is public or not. */
|
||||
bool is_public;
|
||||
|
||||
/** @brief Whether the variable is static or not. */
|
||||
bool is_static;
|
||||
|
||||
/** @brief Whether the variable is a constant or not. */
|
||||
bool is_const;
|
||||
} VariableDeclaration;
|
||||
|
||||
/**
|
||||
* The top-level model.
|
||||
* Every file matches an entire Module.
|
||||
@@ -81,6 +101,12 @@ typedef struct {
|
||||
|
||||
/** @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
|
||||
|
||||
Reference in New Issue
Block a user