diff options
| author | Christopher Uhlig | 2024-08-05 13:46:24 +0200 |
|---|---|---|
| committer | Christopher Uhlig | 2024-08-05 13:46:24 +0200 |
| commit | e9909e4159ab95f2d8faf9a92ff9a53dc0bd791a (patch) | |
| tree | 9eb57fc26c937c64394c9ae47504ecc3c16aa184 /src/tokenizer.c | |
| parent | b0cd3bb37124f19fcf285976d59ae8c0ae262b66 (diff) | |
| download | minishell-e9909e4159ab95f2d8faf9a92ff9a53dc0bd791a.tar.gz minishell-e9909e4159ab95f2d8faf9a92ff9a53dc0bd791a.zip | |
made the if debug around print token
Diffstat (limited to 'src/tokenizer.c')
| -rw-r--r-- | src/tokenizer.c | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/src/tokenizer.c b/src/tokenizer.c index bb76b9e..4babe52 100644 --- a/src/tokenizer.c +++ b/src/tokenizer.c @@ -6,7 +6,7 @@ /* By: chuhlig <chuhlig@student.42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/06/28 20:55:50 by chuhlig #+# #+# */ -/* Updated: 2024/08/05 13:43:39 by chuhlig ### ########.fr */ +/* Updated: 2024/08/05 13:45:55 by chuhlig ### ########.fr */ /* */ /* ************************************************************************** */ @@ -15,21 +15,24 @@ void print_token(t_token *token) { - if (token->type == STRING_TOKEN) + if (DEBUG) { - printf("STRING_TOKEN: %s\n", token->content.string); - } - else if (token->type == REDIR_TOKEN) - { - printf("REDIR_TOKEN: %d\n", token->content.redir_type); - } - else if (token->type == PIPE_TOKEN) - { - printf("PIPE_TOKEN\n"); - } - else if (token->type == NEWLINE_TOKEN) - { - printf("NEWLINE_TOKEN\n"); + if (token->type == STRING_TOKEN) + { + printf("STRING_TOKEN: %s\n", token->content.string); + } + else if (token->type == REDIR_TOKEN) + { + printf("REDIR_TOKEN: %d\n", token->content.redir_type); + } + else if (token->type == PIPE_TOKEN) + { + printf("PIPE_TOKEN\n"); + } + else if (token->type == NEWLINE_TOKEN) + { + printf("NEWLINE_TOKEN\n"); + } } } |
