From d133a8a0f024e0f4ce0f97c60f0f252dd821b795 Mon Sep 17 00:00:00 2001 From: servostar Date: Thu, 10 Oct 2024 10:03:41 +0200 Subject: [PATCH] feat: added parent modules to function name --- src/set/set.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/set/set.c b/src/set/set.c index e752299..c2714e3 100644 --- a/src/set/set.c +++ b/src/set/set.c @@ -1,3 +1,4 @@ +#include "cfg/opt.h" #include #include #include @@ -2626,6 +2627,12 @@ int createFunction(Function* function, AST_NODE_PTR currentNode) { return SEMANTIC_ERROR; } + // compose function name by appending parent modules + char* modules = module_ref_to_str(currentNode->location.module_ref); + char* composed_name = g_strjoin("", modules, ":", function->name, NULL); + g_free(modules); + function->name = composed_name; + mem_free(functionParameter); functionParameter = NULL;