From c8e1a4ed4885c25ffa3893afe967867852769452 Mon Sep 17 00:00:00 2001 From: A404M Date: Fri, 30 May 2025 14:56:47 +0330 Subject: better operator overload --- src/compiler/ast-tree.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/compiler/ast-tree.h') diff --git a/src/compiler/ast-tree.h b/src/compiler/ast-tree.h index abe38c2..8e3b9e7 100644 --- a/src/compiler/ast-tree.h +++ b/src/compiler/ast-tree.h @@ -257,7 +257,7 @@ typedef struct AstTreeUnary { typedef struct AstTreeInfix { AstTree *left; AstTree *right; - AstTreeVariable *function; + AstTreeFunctionCall *functionCall; } AstTreeInfix; typedef struct AstTreeReturn { @@ -353,6 +353,7 @@ void astTreeRootPrint(const AstTreeRoot *root); #endif void astTreeFunctionDestroy(AstTreeFunction function); +void astTreeDeleteFunctionCall(AstTreeFunctionCall *functionCall); void astTreeDestroy(AstTree tree); void astTreeVariableDestroy(AstTreeVariable variable); void astTreeVariableDelete(AstTreeVariable *variable); @@ -380,6 +381,11 @@ AstTreeFunction *copyAstTreeFunction(AstTreeFunction *function, AstTreeVariables oldVariables[], AstTreeVariables newVariables[], size_t variables_size, bool safetyCheck); +AstTreeFunctionCall *copyAstTreeFunctionCall(AstTreeFunctionCall *functionCall, + AstTreeVariables oldVariables[], + AstTreeVariables newVariables[], + size_t variables_size, + bool safetyCheck); AstTreeRoots makeAstTree(const char *filePath #ifdef PRINT_STATISTICS @@ -504,6 +510,9 @@ bool setTypesBuiltinHeapAlloc(AstTree *tree, AstTreeSetTypesHelper helper, AstTreeFunctionCall *functionCall); bool setTypesBuiltinUnary(AstTree *tree, AstTreeSetTypesHelper helper, AstTreeFunctionCall *functionCall); +bool setTypesBuiltinBinaryAlsoPointer(AstTree *tree, + AstTreeSetTypesHelper helper, + AstTreeFunctionCall *functionCall); bool setTypesBuiltinBinary(AstTree *tree, AstTreeSetTypesHelper helper, AstTreeFunctionCall *functionCall); bool setTypesBuiltinBinaryWithRet(AstTree *tree, AstTreeSetTypesHelper helper, @@ -528,6 +537,8 @@ AstTreeVariable *setTypesFindVariable(const char *name_begin, const char *name_end, AstTreeSetTypesHelper helper, AstTreeFunctionCall *functionCall); +AstTree *getShapeShifterElement(AstTreeFunctionCall *metadata, + AstTreeSetTypesHelper helper); char *u8ArrayToCString(AstTree *tree); -- cgit v1.2.3