aboutsummaryrefslogtreecommitdiff
path: root/src/debug.c
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2020-08-27 19:13:28 +0200
committerCharles Cabergs <me@cacharle.xyz>2020-08-27 21:13:39 +0200
commit95a16d2d88c8628ab0ae76f3ae04dfebee566950 (patch)
treefb8ca171c2ce4fa91a294526764f579f1a7343f3 /src/debug.c
parenta680cf09a3fa4b7c6adc38e4297ee5535172826b (diff)
downloadminishell-95a16d2d88c8628ab0ae76f3ae04dfebee566950.tar.gz
minishell-95a16d2d88c8628ab0ae76f3ae04dfebee566950.tar.bz2
minishell-95a16d2d88c8628ab0ae76f3ae04dfebee566950.zip
Fising tok_lst_new uninitialized next, Added tok_lst_debug, Fixing parse_cmd
Diffstat (limited to 'src/debug.c')
-rw-r--r--src/debug.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/debug.c b/src/debug.c
index 8255016..8759252 100644
--- a/src/debug.c
+++ b/src/debug.c
@@ -1,7 +1,15 @@
#include <stdio.h>
#include "lexer.h"
-#include "ast.h"
+
+void tok_lst_debug(t_tok_lst *tokens)
+{
+ while (tokens != NULL)
+ {
+ printf("[%#06x] |%s|%s\n", tokens->tag, tokens->content, tokens->tag & TAG_STICK ? " STICK" : "");
+ tokens = tokens->next;
+ }
+}
/* void token_debug(void *v) */
/* { */