From 30210fac06a6719a1f547a8cd1e24c159d7e7ee7 Mon Sep 17 00:00:00 2001
From: A404M <ahmadmahmoudiprogrammer@gmail.com>
Date: Fri, 21 Feb 2025 23:53:32 +0330
Subject: add a lot of goodies in types

---
 src/compiler/ast-tree.h | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

(limited to 'src/compiler/ast-tree.h')

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);
-- 
cgit v1.2.3