aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDominik Kaiser2024-07-08 16:15:32 +0200
committerDominik Kaiser2024-07-08 16:15:32 +0200
commit5316c9880416b77b4b97b07fd6ae47f171a0ba23 (patch)
tree45d3a48b156895d5a9101d8aca293daabb69c4bb /include
parentbc5e39df2154abfdf308b6cbe644b8953586be2d (diff)
downloadminishell-5316c9880416b77b4b97b07fd6ae47f171a0ba23.tar.gz
minishell-5316c9880416b77b4b97b07fd6ae47f171a0ba23.zip
Move assign into cmd node
Diffstat (limited to 'include')
-rw-r--r--include/ast.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/include/ast.h b/include/ast.h
index 356ccdd..6479272 100644
--- a/include/ast.h
+++ b/include/ast.h
@@ -6,7 +6,7 @@
/* By: dkaiser <dkaiser@student.42heilbronn.de +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/06/27 11:48:27 by dkaiser #+# #+# */
-/* Updated: 2024/07/01 11:43:59 by dkaiser ### ########.fr */
+/* Updated: 2024/07/08 16:09:32 by dkaiser ### ########.fr */
/* */
/* ************************************************************************** */
@@ -15,7 +15,6 @@
enum e_node_type
{
- ASSIGN_NODE,
PIPE_NODE,
CMD_NODE,
STRING_NODE
@@ -50,12 +49,12 @@ typedef struct s_redirection
typedef struct s_cmd
{
char **args;
+ struct s_assign **assigns;
struct s_redirection redirs[2];
} t_cmd;
union u_node_content
{
- struct s_assign assign;
struct s_pipe pipe;
struct s_cmd cmd;
char *string;
@@ -68,7 +67,6 @@ typedef struct s_node
} t_node;
t_node *new_node(int type);
-t_node *new_assign_node(char *var, char *value);
t_node *new_pipe_node(t_node *left, t_node *right);
-t_node *new_cmd_node(char **args, t_redirection redirs[2]);
+t_node *new_cmd_node(char **args, t_assign **assigns, t_redirection redirs[2]);
t_node *new_string_node(char *string);