feat(parser): negation handled

This commit is contained in:
Matteo Flebus 2026-01-27 16:35:30 +01:00
parent 7614370d00
commit c48d86c8de

View file

@ -119,9 +119,11 @@ struct ast *parse_pipeline(struct lexer_context *ctx)
token = PEEK_TOKEN();
}
// TODO handle negation (new AST type)
struct ast *left = parse_command(ctx);
if (negation)
{
left = ast_create_neg(negation, left);
}
token = PEEK_TOKEN();
while (token->type == TOKEN_PIPE)