using double everywhere

This commit is contained in:
hugogogo
2026-05-01 10:42:45 +02:00
parent 2eeed8580f
commit 7519b8e615
7 changed files with 78 additions and 133 deletions

View File

@@ -7,14 +7,13 @@
typedef enum
{
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_VARIABLE, // x, y, etc.
TOKEN_NUMBER, // int or double -> all converted into double
TOKEN_POWER, // ^ or **
TOKEN_SIGN, // + or -
TOKEN_FACTOR, // * or /
TOKEN_EQUAL, // =
TOKEN_END // null (end of input)
} token_type;
typedef struct
@@ -23,7 +22,6 @@ typedef struct
union
{
char value_char;
int value_int;
double value_double;
};
} token;