fix: small bugs to make it compile

This commit is contained in:
Matteo Flebus 2026-01-27 18:00:59 +01:00
parent c48d86c8de
commit 13018e0a03
10 changed files with 33 additions and 4 deletions

View file

@ -4,7 +4,7 @@
bool ast_is_neg(struct ast *node)
{
return node != NULL && node->type == AST_REDIR;
return node != NULL && node->type == AST_NEG;
}
struct ast_neg *ast_get_neg(struct ast *node)
@ -20,6 +20,8 @@ struct ast *ast_create_neg(bool negation, struct ast *child)
if (!node)
return NULL;
node->negation = negation;
node->child = child;
return ast_create(AST_NEG, node);
}