summaryrefslogtreecommitdiff
path: root/src/compiler/ast-tree.h
diff options
context:
space:
mode:
authorA404M <ahmadmahmoudiprogrammer@gmail.com>2025-04-24 02:30:09 +0330
committerA404M <ahmadmahmoudiprogrammer@gmail.com>2025-04-24 02:30:09 +0330
commit07e5fc400493093cd03493ef469b9b97fa1fe87a (patch)
treecd9aff588630fab8bfb98e30f0f1c72080a2946f /src/compiler/ast-tree.h
parentf91fc3bac670a8c775c7ea7b8ba8789dba9559ad (diff)
add @import
Diffstat (limited to 'src/compiler/ast-tree.h')
-rw-r--r--src/compiler/ast-tree.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/compiler/ast-tree.h b/src/compiler/ast-tree.h
index 300be41..ce24f6d 100644
--- a/src/compiler/ast-tree.h
+++ b/src/compiler/ast-tree.h
@@ -126,10 +126,11 @@ typedef struct AstTrees {
} AstTrees;
typedef struct AstTreeRoot {
+ char *filePath;
AstTreeVariables variables;
AstTrees trees;
- char **imported;
- size_t imported_size;
+ struct AstTreeRoot **imports;
+ size_t imports_size;
} AstTreeRoot;
typedef struct AstTreeRoots {
@@ -280,7 +281,9 @@ AstTreeVariables copyAstTreeVariables(AstTreeVariables variables,
size_t variables_size);
AstTreeRoots makeAstTree(const char *filePath);
-AstTreeRoot *makeAstRoot(ParserNode *parsedRoot);
+AstTreeRoot *getAstTreeRoot(char *filePath, AstTreeRoots *roots,
+ char ***filePathes);
+AstTreeRoot *makeAstRoot(ParserNode *parsedRoot, char *filePath);
bool pushVariable(AstTreeHelper *helper, AstTreeVariables *variables,
AstTreeVariable *variable);
@@ -331,6 +334,8 @@ bool isIntType(AstTree *type);
bool isEqual(AstTree *left, AstTree *right);
bool isEqualVariable(AstTreeVariable *left, AstTreeVariable *right);
+void allOfVariablesWithImport(AstTreeVariables *variables, AstTreeRoot *root,
+ AstTreeRoots *checkedRoots);
bool setAllTypesRoot(AstTreeRoot *root);
bool setAllTypes(AstTree *tree, AstTreeSetTypesHelper helper,
AstTreeFunction *function, AstTreeFunctionCall *functionCall);
@@ -382,3 +387,5 @@ bool setTypesAstVariable(AstTreeVariable *variable,
bool setTypesAstInfix(AstTreeInfix *infix, AstTreeSetTypesHelper helper);
char *u8ArrayToCString(AstTree *tree);
+
+AstTree *makeStringType();