all lexer except atoi
This commit is contained in:
@@ -32,7 +32,27 @@ int main(int ac, char **av)
|
||||
i = 0;
|
||||
while (tokens[i].type != TOKEN_END)
|
||||
{
|
||||
ft_printf("token %i :\n type : %i\n value : ", i, tokens[i].type);
|
||||
ft_printf("token %2i - type : ", i);
|
||||
|
||||
if (tokens[i].type == TOKEN_VARIABLE)
|
||||
ft_printf("%20s", "TOKEN_VARIABLE");
|
||||
if (tokens[i].type == TOKEN_NUMBER)
|
||||
ft_printf("%20s", "TOKEN_NUMBER");
|
||||
if (tokens[i].type == TOKEN_POWER)
|
||||
ft_printf("%20s", "TOKEN_POWER");
|
||||
if (tokens[i].type == TOKEN_PLUS)
|
||||
ft_printf("%20s", "TOKEN_PLUS");
|
||||
if (tokens[i].type == TOKEN_MINUS)
|
||||
ft_printf("%20s", "TOKEN_MINUS");
|
||||
if (tokens[i].type == TOKEN_MULTIPLICATION)
|
||||
ft_printf("%20s", "TOKEN_MULTIPLICATION");
|
||||
if (tokens[i].type == TOKEN_DIVISION)
|
||||
ft_printf("%20s", "TOKEN_DIVISION");
|
||||
if (tokens[i].type == TOKEN_END)
|
||||
ft_printf("%20s", "TOKEN_END");
|
||||
|
||||
ft_putstr(" - value : ");
|
||||
|
||||
if (tokens[i].type == TOKEN_NUMBER)
|
||||
{
|
||||
ft_printf("%d\n", i, tokens[i].num_value);
|
||||
|
||||
Reference in New Issue
Block a user