feat(parser): implementing all redirection types -- WIP

This commit is contained in:
Matteo Flebus 2026-01-26 19:00:20 +01:00
parent d707c6180b
commit 666517e3c1
3 changed files with 29 additions and 1 deletions

View file

@ -1,3 +1,5 @@
#define _POSIX_C_SOURCE 200809L
#include "grammar_basic.h"
#include <stdio.h>
@ -198,7 +200,7 @@ struct ast *parse_element(struct lexer_context *ctx)
token = POP_TOKEN();
return ast_create_word(token->data);
}
else if (token->type == TOKEN_IONUMBER || token->type == TOKEN_REDIRECTION)
else if (token->type == TOKEN_IONUMBER || is_token_redir(token))
{
return parse_redirection(ctx);
}