feat: implement extern block analyzer
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user