parse sign

This commit is contained in:
hugogogo
2026-05-01 22:39:15 +02:00
parent 416d170ed2
commit bcbd3b2abb
6 changed files with 117 additions and 31 deletions

View File

@@ -88,8 +88,10 @@ int main(int ac, char **av)
if (tokens[i].type == TOKEN_VARIABLE)
ft_printf("%20s", "TOKEN_VARIABLE");
else if (tokens[i].type == TOKEN_NUMBER)
ft_printf("%20s", "TOKEN_NUMBER");
else if (tokens[i].type == TOKEN_NUMBER_INT)
ft_printf("%20s", "TOKEN_NUMBER_INT");
else if (tokens[i].type == TOKEN_NUMBER_DOUBLE)
ft_printf("%20s", "TOKEN_NUMBER_DOUBLE");
else if (tokens[i].type == TOKEN_POWER)
ft_printf("%20s", "TOKEN_POWER");
else if (tokens[i].type == TOKEN_SIGN)
@@ -103,7 +105,11 @@ int main(int ac, char **av)
ft_putstr(" - value : ");
if (tokens[i].type == TOKEN_NUMBER)
if (tokens[i].type == TOKEN_NUMBER_INT)
{
printf("%i\n", tokens[i].value_int);
}
else if (tokens[i].type == TOKEN_NUMBER_DOUBLE)
{
printf("%g\n", tokens[i].value_double);
}