blob: 4d2566293bbf4d485b3020abad2e77f00ff604b4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* lexer.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cacharle <me@cacharle.xyz> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/10/10 07:51:39 by cacharle #+# #+# */
/* Updated: 2020/10/10 07:56:44 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
#include "minishell.h"
#include "lexer.h"
#ifdef MINISHELL_TEST
int debug_lexer(char *input)
{
int status;
t_tok_lst *out;
status = lexer(input, &out);
if (status != 0)
return (status);
while (out != NULL)
{
ft_putnbr(out->tag);
ft_putchar(' ');
ft_putstr(out->content);
ft_putendl(out->tag & TAG_STICK ? " STICK" : "");
out = out->next;
}
return (status);
}
#endif
|