aboutsummaryrefslogtreecommitdiff
path: root/asm/lexer.c
diff options
context:
space:
mode:
Diffstat (limited to 'asm/lexer.c')
-rw-r--r--asm/lexer.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/asm/lexer.c b/asm/lexer.c
index 525deb2..7f37ce7 100644
--- a/asm/lexer.c
+++ b/asm/lexer.c
@@ -24,6 +24,8 @@ const char *token_type_as_cstr(token_type_t type)
{
switch (type)
{
+ case TOKEN_GLOBAL:
+ return "GLOBAL";
case TOKEN_STAR:
return "STAR";
case TOKEN_LITERAL_NUMBER:
@@ -331,6 +333,11 @@ token_t tokenise_symbol(buffer_t *buffer, size_t *column)
offset = 3;
type = TOKEN_RET;
}
+ else if (sym_size == 6 && strncmp(opcode, "GLOBAL", 6) == 0)
+ {
+ offset = 6;
+ type = TOKEN_GLOBAL;
+ }
else
is_opcode = false;