lang: lex: implement lexing of decimal numbers

This commit is contained in:
2024-11-19 16:57:20 +00:00
parent a54a232428
commit 6e642b3c19
2 changed files with 60 additions and 13 deletions

View File

@@ -10,7 +10,8 @@ enum ivy_token_type {
IVY_TOK_KEYWORD,
IVY_TOK_SYMBOL,
IVY_TOK_ATOM,
IVY_TOK_NUMBER,
IVY_TOK_INT,
IVY_TOK_DOUBLE,
IVY_TOK_LABEL,
IVY_TOK_IDENT,
IVY_TOK_STRING,
@@ -104,7 +105,8 @@ struct ivy_token {
union {
enum ivy_keyword t_keyword;
enum ivy_symbol t_symbol;
unsigned long long t_number;
unsigned long long t_int;
double t_double;
char *t_str;
};
};