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,6 +1,4 @@
#ifndef COMPUTORV1_H
#define COMPUTORV1_H
#include "libft.h"
#endif

View File

@@ -1,19 +1,16 @@
#ifndef LEXER_H
#define LEXER_H
#include "../libft/includes/libft.h"
typedef enum
{
TOKEN_VARIABLE, // x, y, etc.
TOKEN_NUMBER_INT, // int
TOKEN_NUMBER_DOUBLE, // double
TOKEN_POWER, // ^ or **
TOKEN_PLUS, // +
TOKEN_MINUS, // -
TOKEN_MULTIPLICATION, // *
TOKEN_DIVISION, // /
TOKEN_END // null (end of input)
TOKEN_VARIABLE, // x, y, etc.
TOKEN_NUMBER_INT, // int
TOKEN_NUMBER_DOUBLE, // double
TOKEN_POWER, // ^ or **
TOKEN_SIGN, // + or -
TOKEN_FACTOR, // * or /
TOKEN_EQUAL, // =
TOKEN_END // null (end of input)
} token_type;
typedef struct