aboutsummaryrefslogtreecommitdiff
path: root/src/parse
diff options
context:
space:
mode:
authornass1pro <nass1pro@gmail.com>2020-07-14 13:12:55 +0200
committernass1pro <nass1pro@gmail.com>2020-07-14 13:12:55 +0200
commit2025376e43a174586f087ff284d1f65798f555b2 (patch)
tree7621906fd15b8075a147fe298ead79c4053a2b28 /src/parse
parent29e1af2b65d097e533189db4e7d5e20534c17b35 (diff)
downloadminishell-2025376e43a174586f087ff284d1f65798f555b2.tar.gz
minishell-2025376e43a174586f087ff284d1f65798f555b2.tar.bz2
minishell-2025376e43a174586f087ff284d1f65798f555b2.zip
update lexer
Diffstat (limited to 'src/parse')
-rw-r--r--src/parse/parse.c10
-rw-r--r--src/parse/parse_error.c2
2 files changed, 7 insertions, 5 deletions
diff --git a/src/parse/parse.c b/src/parse/parse.c
index b2532ac..5633a23 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 10:03:00 by charles ### ########.fr */
+/* Updated: 2020/07/14 11:48:42 by nahaddac ### ########.fr */
/* */
/* ************************************************************************** */
@@ -103,6 +103,7 @@ t_ret *parse_op(t_ftlst *input)
return ret_wrap_ast(left_ret->ast, input);
tag = ((t_token*)input->data)->tag;
+ /* les sep */
input = input->next;
right_ret = parse_op(input);
@@ -135,7 +136,6 @@ t_ret *parse_expr(t_ftlst *input)
tmp->ast = new_ast;
if (input == NULL)
return tmp;
-
// could reuse parse_redir instead
tag = ((t_token*)input->data)->tag;
while (tag & TAG_IS_REDIR)
@@ -172,8 +172,10 @@ t_ret *parse(t_ftlst *input)
return (NULL);
ret->ast = NULL;
ret->rest = NULL;
- /* if((ret->unexpected = error_syntax_simple(input))) */
- /* return (ret); */
+ ret->syntax_error = false;
+ // ret = error_syntax_simple(input, ret);
+ // if (ret->syntax_error == TRUE)
+ // return ret;
ret = parse_op(input);
return (ret);
}
diff --git a/src/parse/parse_error.c b/src/parse/parse_error.c
index 3d988ae..1116a88 100644
--- a/src/parse/parse_error.c
+++ b/src/parse/parse_error.c
@@ -6,7 +6,7 @@
/* By: nahaddac <nahaddac@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/06/18 15:09:48 by nahaddac #+# #+# */
-/* Updated: 2020/07/14 10:01:43 by charles ### ########.fr */
+/* Updated: 2020/07/14 11:49:48 by nahaddac ### ########.fr */
/* */
/* ************************************************************************** */