aboutsummaryrefslogtreecommitdiff
path: root/src/parse/parse.c
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2020-07-14 10:04:44 +0200
committerCharles <sircharlesaze@gmail.com>2020-07-14 10:05:57 +0200
commit29e1af2b65d097e533189db4e7d5e20534c17b35 (patch)
treec3f3033d18cab22e6715e2e57817d72028ae4627 /src/parse/parse.c
parent3ea9f3e7e9b40c8e0b17ab394576c82f7b92c0b4 (diff)
downloadminishell-29e1af2b65d097e533189db4e7d5e20534c17b35.tar.gz
minishell-29e1af2b65d097e533189db4e7d5e20534c17b35.tar.bz2
minishell-29e1af2b65d097e533189db4e7d5e20534c17b35.zip
Refactoring error handling during parsing
Diffstat (limited to 'src/parse/parse.c')
-rw-r--r--src/parse/parse.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/parse/parse.c b/src/parse/parse.c
index 6e4721a..b2532ac 100644
--- a/src/parse/parse.c
+++ b/src/parse/parse.c
@@ -6,7 +6,7 @@
/* By: nahaddac <nahaddac@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/06/17 18:09:04 by nahaddac #+# #+# */
-/* Updated: 2020/07/14 09:43:41 by nahaddac ### ########.fr */
+/* Updated: 2020/07/14 10:03:00 by charles ### ########.fr */
/* */
/* ************************************************************************** */
@@ -34,7 +34,7 @@ t_ret *ret_wrap_ast(t_ast *ast, t_ftlst *rest)
if ((ret = malloc(sizeof(t_ret))) == NULL)
return (NULL);
- ret->unexpected = NULL;
+ ret->syntax_error = false;
ret->rest = rest;
ret->ast = ast;
return ret;
@@ -165,17 +165,15 @@ t_ret *parse_expr(t_ftlst *input)
t_ret *parse(t_ftlst *input)
{
t_ret *ret;
- t_ftlst *in_f;
- in_f = input;
if (input == NULL)
return NULL;
if (!(ret = malloc(sizeof(t_ret) * 1)))
return (NULL);
ret->ast = NULL;
ret->rest = NULL;
- if((ret->unexpected = error_syntax_simple(input)))
- return (ret);
+ /* if((ret->unexpected = error_syntax_simple(input))) */
+ /* return (ret); */
ret = parse_op(input);
return (ret);
}