fix: review problems
This commit is contained in:
@@ -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};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user