aboutsummaryrefslogtreecommitdiff
path: root/src/parse
diff options
context:
space:
mode:
Diffstat (limited to 'src/parse')
-rwxr-xr-xsrc/parse/parse.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/parse/parse.c b/src/parse/parse.c
index cc4d56d..02357da 100755
--- 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/06/19 13:28:12 by nahaddac ### ########.fr */
+/* Updated: 2020/06/19 13:38:23 by charles ### ########.fr */
/* */
/* ************************************************************************** */
@@ -118,7 +118,7 @@ t_ret *parse_expr(t_ftlst *input)
return (NULL);
input = input->next;
t_ast *new_ast = ast_new(AST_PARENT);
- new_ast = tmp->ast;
+ new_ast->parent_ast = tmp->ast;
tmp->ast = new_ast;
if (tag & TAG_IS_REDIR)
{
@@ -145,17 +145,17 @@ 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)) != NULL)
- printf("%s\n", ret->unexpected->content);
- ret = parse_op(in_f);
- ast_destroy(ret->ast);
- ft_lstdestroy(&ret->rest, (void (*)(void*))token_destroy);
- return (NULL);
+ /* 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)) != NULL) */
+ /* printf("%s\n", ret->unexpected->content); */
+ ret = parse_op(input);
+ /* ast_destroy(ret->ast); */
+ /* ft_lstdestroy(&ret->rest, (void (*)(void*))token_destroy); */
+ return (ret);
}