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
+13 -2
View File
@@ -69,8 +69,19 @@ fzl_an_res_t analyze_field(fzl_analyzer_t *analyzer, fzl_node_t *field)
return (fzl_an_res_t){.error = true};
}
fzl_type_t field_type = an_toktotype(field_node->var.type);
char *classname = NULL;
bool type_found = false;
fzl_type_t field_type =
an_toktotype(analyzer, field_node->var.type, &type_found);
if (!type_found)
{
snprintf(an_problem, sizeof(an_problem), "symbol '%s' not found",
(char *)field_node->var.type->value);
an_push_error(analyzer, field_node->var.type, an_problem);
return (fzl_an_res_t){.error = true};
}
char *classname = NULL;
if (field_type == FZL_TYPE_OBJECT)
classname = field_node->var.type->value;