From e085451ec45c0551c80989a7d49b0e0deb4b9586 Mon Sep 17 00:00:00 2001 From: Charles Date: Fri, 19 Jun 2020 14:38:15 +0200 Subject: Parenthesis working, Added getline loop in main --- src/debug.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/debug.c') diff --git a/src/debug.c b/src/debug.c index b23fe51..c2b416e 100644 --- a/src/debug.c +++ b/src/debug.c @@ -34,9 +34,8 @@ void ast_print(int level, t_ast *ast) ft_lstiter(ast->redirs, token_put); printf(" ]\n"); ast_print(level + 1, ast->parent_ast); - } - if (ast->tag == AST_CMD) + else if (ast->tag == AST_CMD) { print_level(level); printf("cmd: [ "); @@ -45,8 +44,7 @@ void ast_print(int level, t_ast *ast) ft_lstiter(ast->redirs, token_put); printf(" ]"); } - else - { + else if (ast->tag == AST_OP) { /* printf("SEP: %d\n", ast->op.sep); */ print_level(level); /* printf("redirs: ["); */ -- cgit