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:
+7
-2
@@ -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
|
||||
Reference in New Issue
Block a user