summaryrefslogtreecommitdiff
path: root/src/compiler/ast-tree.h
diff options
context:
space:
mode:
authorA404M <ahmadmahmoudiprogrammer@gmail.com>2025-02-21 23:53:32 +0330
committerA404M <ahmadmahmoudiprogrammer@gmail.com>2025-02-21 23:53:32 +0330
commit30210fac06a6719a1f547a8cd1e24c159d7e7ee7 (patch)
tree90900f516383f26d8ffd74aed4b800ac62e685a9 /src/compiler/ast-tree.h
parent13156d99a29ba927f64d344cf4d385414bcf61e1 (diff)
add a lot of goodies in types
Diffstat (limited to 'src/compiler/ast-tree.h')
-rw-r--r--src/compiler/ast-tree.h19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/compiler/ast-tree.h b/src/compiler/ast-tree.h
index c8f5f75..18703c8 100644
--- a/src/compiler/ast-tree.h
+++ b/src/compiler/ast-tree.h
@@ -162,8 +162,12 @@ typedef struct AstTreeHelper {
AstTreeVariables *globalDeps;
} AstTreeHelper;
+struct RunnerVariablePages;
+
typedef struct AstTreeSetTypesHelper {
AstTree *lookingType;
+ AstTreeHelper *treeHelper;
+ struct RunnerVariablePages *pages;
} AstTreeSetTypesHelper;
void astTreePrint(const AstTree *tree, int indent);
@@ -210,10 +214,10 @@ AstTree *astTreeParseCurlyBracket(ParserNode *parserNode,
AstTree *astTreeParseParenthesis(ParserNode *parserNode, AstTreeHelper *helper);
AstTreeFunction *getFunction(AstTree *value);
-bool isConst(AstTree *value);
+bool isConst(AstTree *tree, AstTreeHelper *helper);
AstTree *makeTypeOf(AstTree *value);
bool typeIsEqual(const AstTree *type0, const AstTree *type1);
-AstTree *getValue(AstTree *tree);
+AstTree *getValue(AstTree *tree, AstTreeSetTypesHelper helper);
bool isCircularDependencies(AstTreeHelper *helper, AstTreeVariable *variable,
AstTree *tree);
@@ -247,10 +251,11 @@ bool setTypesAstVariable(AstTreeVariable *variable,
AstTreeSetTypesHelper helper);
bool setTypesAstInfix(AstTreeInfix *infix, AstTreeSetTypesHelper helper);
-bool astTreeCleanRoot(AstTreeRoot *root);
-bool astTreeClean(AstTree *tree);
-bool astTreeCleanFunction(AstTree *tree);
-bool astTreeCleanVariable(AstTree *tree);
-bool astTreeCleanAstVariable(AstTreeVariable *variable);
+bool astTreeCleanRoot(AstTreeRoot *root, AstTreeHelper *helper);
+bool astTreeClean(AstTree *tree, AstTreeSetTypesHelper helper);
+bool astTreeCleanFunction(AstTree *tree, AstTreeSetTypesHelper helper);
+bool astTreeCleanVariable(AstTree *tree, AstTreeSetTypesHelper helper);
+bool astTreeCleanAstVariable(AstTreeVariable *variable,
+ AstTreeSetTypesHelper helper);
size_t astTreeTypeSize(AstTree tree);