fix: add classname value for structs and handles
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
#include <common/fzl_types.h>
|
||||||
#include <compiler/fzl_analyzer.h>
|
#include <compiler/fzl_analyzer.h>
|
||||||
#include <compiler/fzl_parser.h>
|
#include <compiler/fzl_parser.h>
|
||||||
#include <compiler/internals/analyzer.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};
|
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};
|
return (fzl_an_res_t){.error = false, .type = res.type, .classname = NULL};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user