feat: final firsts initialization

This commit is contained in:
Guillem George 2026-01-29 19:47:59 +01:00
parent 98d18eef7d
commit 3601c3136f
5 changed files with 104 additions and 50 deletions

View file

@ -160,13 +160,15 @@ struct ast *parse_command(struct lexer_context *ctx)
}
else if (is_first(*token, RULE_SHELL_COMMAND))
{
parse_shell_command(ctx);
result = parse_shell_command(ctx);
}
else
{
perror("Syntax error: unexpected token");
return NULL;
}
return result;
}
/* @brief: frees command_elements and redirections lists (helper func)