aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDominik Kaiser2024-08-11 12:27:02 +0200
committerDominik Kaiser2024-08-11 12:27:02 +0200
commit99e8655aaf9827c7d5248c7f3d0913fcb1377cfb (patch)
treefcfc4288ea38348d707ad549cd4fa04c49a446b7 /include
parentf53acc629b1b3e7f4097eef1e26841ef0b9b24c6 (diff)
downloadminishell-99e8655aaf9827c7d5248c7f3d0913fcb1377cfb.tar.gz
minishell-99e8655aaf9827c7d5248c7f3d0913fcb1377cfb.zip
Remove assigns
I found out that there's a difference between shell variables and env variables. We don't have to implement shell variables, so I removed all code that handles them.
Diffstat (limited to 'include')
-rw-r--r--include/ast.h12
-rw-r--r--include/minishell.h3
2 files changed, 3 insertions, 12 deletions
diff --git a/include/ast.h b/include/ast.h
index bf19083..cd2f9c9 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/10 12:31:39 by dkaiser ### ########.fr */
+/* Updated: 2024/08/11 12:20:56 by dkaiser ### ########.fr */
/* */
/* ************************************************************************** */
@@ -20,12 +20,6 @@ enum e_node_type
STRING_NODE
};
-typedef struct s_assign
-{
- char *var;
- char *value;
-} t_assign;
-
typedef struct s_pipe
{
struct s_node *left;
@@ -49,7 +43,6 @@ typedef struct s_redirection
typedef struct s_cmd
{
char **args;
- struct s_assign **assigns;
struct s_redirection redirs[2];
} t_cmd;
@@ -68,8 +61,7 @@ typedef struct s_node
t_node *new_node(int type);
t_node *new_pipe_node(t_node *left, t_node *right);
-t_node *new_cmd_node(char **args, t_assign **assigns,
- t_redirection redirs[2]);
+t_node *new_cmd_node(char **args, t_redirection redirs[2]);
t_node *new_string_node(char *string);
void free_node(t_node *node);
diff --git a/include/minishell.h b/include/minishell.h
index 4f04682..6997b15 100644
--- a/include/minishell.h
+++ b/include/minishell.h
@@ -6,7 +6,7 @@
/* By: dkaiser <dkaiser@student.42heilbronn.de +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/06/22 17:14:49 by dkaiser #+# #+# */
-/* Updated: 2024/08/11 10:59:16 by dkaiser ### ########.fr */
+/* Updated: 2024/08/11 12:22:07 by dkaiser ### ########.fr */
/* */
/* ************************************************************************** */
@@ -34,7 +34,6 @@ void repl(const char *prompt);
t_list *parse(t_token *tokens);
t_node *parse_cmd(t_token *tokens);
t_redirection *collect_redirs(t_token **tokens);
-t_assign **collect_assigns(t_token **tokens);
void print_ast(t_node *ast);
#endif