feat: implement extern block analyzer

This commit is contained in:
samsonium
2026-10-31 01:58:10 +03:00
parent 5c96f96220
commit a4aa220cfa
16 changed files with 197 additions and 27 deletions
+11 -1
View File
@@ -38,8 +38,18 @@ fzl_an_res_t analyze_function(fzl_analyzer_t *analyzer, fzl_node_t *fn_node)
ctx = ctx->parent;
}
fzl_type_t rettype = an_toktotype(fn_node->fn.type);
bool type_found = false;
fzl_type_t rettype = an_toktotype(analyzer, fn_node->fn.type, &type_found);
char *classname = NULL;
if (!type_found)
{
snprintf(an_problem, sizeof(an_problem), "symbol '%s' not found",
(char *)fn_node->fn.type->value);
an_push_error(analyzer, fn_node->fn.type, an_problem);
return (fzl_an_res_t){.error = true};
}
if (rettype == FZL_TYPE_OBJECT)
classname = (char *)fn_node->fn.type->value;