Code cleanup. Converting a number lexeme to a proper integer setup but not done yet. So number tokens don't have a valid value.

This commit is contained in:
2022-05-05 16:12:33 +00:00
parent 9fa48520c7
commit 8ec0b9b216
11 changed files with 59 additions and 283 deletions
+7 -2
View File
@@ -2,6 +2,9 @@
#define TOKEN_H
#include "stdlib.h"
#include <string.h>
#include <errno.h>
#include <stdio.h>
typedef enum {
PLUS,
@@ -30,10 +33,12 @@ typedef enum {
typedef struct {
TokenType type;
char* value;
char* lexeme;
void* value;
int line;
} Token;
Token* CreateToken(TokenType type, char* value);
Token* CreateToken(char*, void*, int, TokenType);
void FreeToken(Token*);
#endif