Updated the scanner to parse registers, assembly keywords and identifiers.
This commit is contained in:
-12
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user