summaryrefslogtreecommitdiff
path: root/src/compiler/ast-tree.h
diff options
context:
space:
mode:
authorA404M <ahmadmahmoudiprogrammer@gmail.com>2025-02-09 07:53:44 +0330
committerA404M <ahmadmahmoudiprogrammer@gmail.com>2025-02-09 07:53:44 +0330
commitcf66b5e2db4424cf1947f47b95d7a02344eb315c (patch)
treee81194f71992caf6dc3d0f7098b6789cc97420b1 /src/compiler/ast-tree.h
parent6a38b0247cff3be5ce2d0f725d559253357b4dc6 (diff)
fixed running functions twoice
Diffstat (limited to 'src/compiler/ast-tree.h')
-rw-r--r--src/compiler/ast-tree.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/compiler/ast-tree.h b/src/compiler/ast-tree.h
index 83b77ef..d67560f 100644
--- a/src/compiler/ast-tree.h
+++ b/src/compiler/ast-tree.h
@@ -19,6 +19,7 @@ typedef enum AstTreeToken {
AST_TREE_TOKEN_FUNCTION_CALL,
AST_TREE_TOKEN_VARIABLE,
AST_TREE_TOKEN_VARIABLE_DEFINE,
+ AST_TREE_TOKEN_VALUE_VOID,
AST_TREE_TOKEN_VALUE_U64,
AST_TREE_TOKEN_VALUE_BOOL,
@@ -34,6 +35,8 @@ typedef struct AstTree {
AstTreeToken token;
void *metadata;
struct AstTree *type;
+ char *str_begin;
+ char *str_end;
} AstTree;
extern AstTree AST_TREE_TYPE_TYPE;
@@ -60,7 +63,7 @@ typedef struct AstTreeRoot {
typedef struct AstTreeScope {
AstTreeVariables variables;
- AstTree *expressions;
+ AstTree **expressions;
size_t expressions_size;
} AstTreeScope;
@@ -106,8 +109,9 @@ void astTreeVariableDelete(AstTreeVariable *variable);
void astTreeDelete(AstTree *tree);
void astTreeRootDelete(AstTreeRoot *root);
-AstTree *newAstTree(AstTreeToken token, void *metadata, AstTree *type);
+AstTree *newAstTree(AstTreeToken token, void *metadata, AstTree *type,char *str_begin,char *str_end);
AstTree *copyAstTree(AstTree *tree);
+AstTreeVariables copyAstTreeVariables(AstTreeVariables variables);
AstTreeRoot *makeAstTree(ParserNode *parsedRoot);