lexer types equal and factor

This commit is contained in:
hugogogo
2026-04-30 22:48:51 +02:00
parent 26fa8025ef
commit 7a30dcc345
5 changed files with 37 additions and 58 deletions

View File

@@ -1,4 +1,5 @@
#include "computorv1.h"
#include "libft.h"
#include "lexer.h"
#include "errors.h"
#include <stdio.h> // tmp for float debug
@@ -79,14 +80,12 @@ int main(int ac, char **av)
ft_printf("%20s", "TOKEN_NUMBER_DOUBLE");
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_SIGN)
ft_printf("%20s", "TOKEN_SIGN");
if (tokens[i].type == TOKEN_FACTOR)
ft_printf("%20s", "TOKEN_FACTOR");
if (tokens[i].type == TOKEN_EQUAL)
ft_printf("%20s", "TOKEN_EQUAL");
if (tokens[i].type == TOKEN_END)
ft_printf("%20s", "TOKEN_END");