fix: review problems

This commit is contained in:
samsonium
2026-10-27 15:40:25 +03:00
parent c61322718d
commit dc80de66e4
21 changed files with 197 additions and 179 deletions
+3 -5
View File
@@ -3,8 +3,6 @@
#include <compiler/utils/fzl_symtable.h>
#include <stdio.h>
char id_problem[256];
// Analyze identifier
fzl_an_res_t analyze_identifier(fzl_analyzer_t *analyzer, fzl_node_t *id)
{
@@ -13,7 +11,7 @@ fzl_an_res_t analyze_identifier(fzl_analyzer_t *analyzer, fzl_node_t *id)
if (!id || id->type != FZL_NODETYPE_IDENTIFIER)
{
an_push_error(analyzer, NULL, "provided node is not typeof IDENTIFIER");
an_push_error(analyzer, NULL, "node is not an identifier");
return (fzl_an_res_t){.error = true};
}
@@ -28,9 +26,9 @@ fzl_an_res_t analyze_identifier(fzl_analyzer_t *analyzer, fzl_node_t *id)
if (!sym_found)
{
snprintf(id_problem, sizeof(id_problem), "cannot find symbol '%s'",
snprintf(an_problem, sizeof(an_problem), "cannot find symbol '%s'",
symname);
an_push_error(analyzer, id->token, id_problem);
an_push_error(analyzer, id->token, an_problem);
return (fzl_an_res_t){.error = true};
}