Updated the scanner to parse registers, assembly keywords and identifiers.

This commit is contained in:
2022-05-04 20:07:47 +00:00
parent 2c9478d311
commit 859035da2a
5 changed files with 83 additions and 89 deletions
-12
View File
@@ -4,7 +4,6 @@
#include <stdlib.h>
#include <string.h>
Token* CreateToken(TokenType, char*);
Token* GetNextToken(char *);
int TokenIsNumeric(const char*, int *);
@@ -74,17 +73,6 @@ Token* GetNextToken(char *string) {
return NULL;
}
Token* CreateToken(TokenType type, char* value) {
Token* token = calloc(1, sizeof(Token));
if (!token) return NULL;
token->type = type;
token->value = value;
return token;
}
int TokenIsNumeric(const char* token, int *base) {
*base = 0;