feat: added parent modules to function name
This commit is contained in:
parent
af83cb4f4e
commit
d133a8a0f0
|
@ -1,3 +1,4 @@
|
|||
#include "cfg/opt.h"
|
||||
#include <assert.h>
|
||||
#include <ast/ast.h>
|
||||
#include <glib.h>
|
||||
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue