summaryrefslogtreecommitdiff
path: root/src/compiler/ast-tree.h
diff options
context:
space:
mode:
authorA404M <ahmadmahmoudiprogrammer@gmail.com>2025-04-11 14:49:00 +0330
committerA404M <ahmadmahmoudiprogrammer@gmail.com>2025-04-11 14:49:00 +0330
commitcb92cc5df12a77be438801bc5f80bcdea853fce7 (patch)
treeb8147edf7a37a526d309b44bdf25c7bc1d9edc9c /src/compiler/ast-tree.h
parent399256ab6f75b364773c299847ad2c57a96a7c41 (diff)
fix bugs in function overloading
Diffstat (limited to 'src/compiler/ast-tree.h')
-rw-r--r--src/compiler/ast-tree.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/compiler/ast-tree.h b/src/compiler/ast-tree.h
index 0ae48f5..85bd44e 100644
--- a/src/compiler/ast-tree.h
+++ b/src/compiler/ast-tree.h
@@ -117,6 +117,16 @@ typedef struct AstTreeVariables {
size_t size;
} AstTreeVariables;
+typedef struct AstTreeVariableCandidate {
+ AstTreeVariable *variable;
+ size_t index;
+} AstTreeVariableCandidate;
+
+typedef struct AstTreeVariableCandidates {
+ AstTreeVariableCandidate *data;
+ size_t size;
+} AstTreeVariableCandidates;
+
typedef struct AstTrees {
AstTree **data;
size_t size;
@@ -263,7 +273,7 @@ AstTreeRoot *makeAstTree(ParserNode *parsedRoot);
bool pushVariable(AstTreeHelper *helper, AstTreeVariables *variables,
AstTreeVariable *variable);
-AstTreeVariables *getAllVariables(AstTreeHelper *helper, char *name_begin,
+AstTreeVariableCandidates *getAllVariables(AstTreeHelper *helper, char *name_begin,
char *name_end);
AstTree *astTreeParse(ParserNode *parserNode, AstTreeHelper *helper);