fix: add classname value for structs and handles

This commit is contained in:
samsonium
2026-11-04 17:04:09 +03:00
parent 26decf2626
commit c0bd0d95b2
+5
View File
@@ -1,3 +1,4 @@
#include <common/fzl_types.h>
#include <compiler/fzl_analyzer.h>
#include <compiler/fzl_parser.h>
#include <compiler/internals/analyzer.h>
@@ -48,5 +49,9 @@ fzl_an_res_t analyze_typedef(fzl_analyzer_t *analyzer, fzl_node_t *td_node)
return (fzl_an_res_t){.error = true};
}
if (res.type == FZL_TYPE_STRUCT || res.type == FZL_TYPE_HANDLE)
fzl_symt_setobjclass(analyzer->symbols[0], td_node->typedefinition.typename,
td_node->typedefinition.typename);
return (fzl_an_res_t){.error = false, .type = res.type, .classname = NULL};
}