diff options
| author | A404M <ahmadmahmoudiprogrammer@gmail.com> | 2025-06-09 12:10:55 +0330 |
|---|---|---|
| committer | A404M <ahmadmahmoudiprogrammer@gmail.com> | 2025-06-09 12:10:55 +0330 |
| commit | e711e6e55e9c83563db9bb04af7516632f27b91d (patch) | |
| tree | 9ca3022438edab3540b2d5bffacf59558f48db3e /src/compiler/ast-tree.h | |
| parent | 24eb811a33a54714a193c775569b668eef78a6d8 (diff) | |
add macro
update README.md
Diffstat (limited to 'src/compiler/ast-tree.h')
| -rw-r--r-- | src/compiler/ast-tree.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/compiler/ast-tree.h b/src/compiler/ast-tree.h index 0d63252..2d96983 100644 --- a/src/compiler/ast-tree.h +++ b/src/compiler/ast-tree.h @@ -71,6 +71,7 @@ typedef enum AstTreeToken { AST_TREE_TOKEN_TYPE_SHAPE_SHIFTER, AST_TREE_TOKEN_TYPE_C_LIBRARY, AST_TREE_TOKEN_TYPE_C_FUNCTION, + AST_TREE_TOKEN_TYPE_MACRO, AST_TREE_TOKEN_TYPE_BOOL, AST_TREE_TOKEN_VALUE_VOID, AST_TREE_TOKEN_STATIC_VARS_END = AST_TREE_TOKEN_VALUE_VOID, @@ -84,6 +85,7 @@ typedef enum AstTreeToken { AST_TREE_TOKEN_VALUE_SHAPE_SHIFTER, AST_TREE_TOKEN_VALUE_C_LIBRARY, AST_TREE_TOKEN_VALUE_C_FUNCTION, + AST_TREE_TOKEN_VALUE_MACRO, AST_TREE_TOKEN_VALUE_INT, AST_TREE_TOKEN_VALUE_FLOAT, AST_TREE_TOKEN_VALUE_BOOL, @@ -161,6 +163,7 @@ extern AstTree AST_TREE_CODE_TYPE; extern AstTree AST_TREE_NAMESPACE_TYPE; extern AstTree AST_TREE_SHAPE_SHIFTER_TYPE; extern AstTree AST_TREE_C_LIBRARY_TYPE; +extern AstTree AST_TREE_MACRO_TYPE; extern AstTree AST_TREE_VOID_VALUE; typedef struct AstTreeVariable { @@ -354,12 +357,17 @@ typedef struct AstTreeCFunction { AstTree *funcType; } AstTreeCFunction; +typedef struct AstTreeMacro { + AstTreeFunction *function; +} AstTreeMacro; + #ifdef PRINT_COMPILE_TREE void astTreePrint(const AstTree *tree, int indent); void astTreeVariablePrint(const AstTreeVariable *variable, int indent); void astTreeRootPrint(const AstTreeRoot *root); #endif +void astTreeTypeFunctionDestroy(AstTreeTypeFunction functionType); void astTreeScopeDestroy(AstTreeScope scope); void astTreeFunctionDestroy(AstTreeFunction function); void astTreeDeleteFunctionCall(AstTreeFunctionCall *functionCall); |