aboutsummaryrefslogtreecommitdiff
path: root/asm/lexer.h
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2023-10-26 07:15:52 +0100
committerAryadev Chavali <aryadev@aryadevchavali.com>2023-10-26 07:15:52 +0100
commit7bf6b53230868f419331bc7ef2044b02502aae76 (patch)
tree91e36d235a9f125f80a8bd388abffacfd766cf27 /asm/lexer.h
parent131d70a9a37bdbfacaea9cfe2f78867dd9e16942 (diff)
downloadovm-7bf6b53230868f419331bc7ef2044b02502aae76.tar.gz
ovm-7bf6b53230868f419331bc7ef2044b02502aae76.tar.bz2
ovm-7bf6b53230868f419331bc7ef2044b02502aae76.zip
Unified literal for numbers, main program now tokenises
Diffstat (limited to 'asm/lexer.h')
-rw-r--r--asm/lexer.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/asm/lexer.h b/asm/lexer.h
index 01badf4..bd9dfb2 100644
--- a/asm/lexer.h
+++ b/asm/lexer.h
@@ -16,10 +16,8 @@
typedef enum TokenType
{
- TOKEN_LITERAL_BYTE,
+ TOKEN_LITERAL_NUMBER,
TOKEN_LITERAL_CHAR,
- TOKEN_LITERAL_HWORD,
- TOKEN_LITERAL_WORD,
TOKEN_SYMBOL,
} token_type_t;
@@ -31,9 +29,9 @@ typedef struct
} token_t;
typedef darr_t buffer_t;
+typedef darr_t token_stream_t;
const char *token_type_as_cstr(token_type_t type);
-
-token_t *tokenise_buffer(buffer_t *, size_t *);
+token_stream_t tokenise_buffer(buffer_t *);
#endif