fix: changed puts to perror + redirections in parser

This commit is contained in:
Matteo Flebus 2026-01-27 16:05:11 +01:00
parent 96626d9850
commit d52f603eec
5 changed files with 26 additions and 24 deletions

View file

@ -11,7 +11,7 @@ void ast_free(struct ast **node)
{
if (node == NULL || *node == NULL)
{
puts(
perror(
"WARNING: Internal error: failed to free AST node (NULL argument)");
return;
}
@ -45,7 +45,7 @@ void ast_free(struct ast **node)
break;
default:
puts("WARNING: Internal error: failed to free an AST node (Unknown "
perror("WARNING: Internal error: failed to free an AST node (Unknown "
"type)");
return;
}