parse sign
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user