aboutsummaryrefslogtreecommitdiff
path: root/asm
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2023-10-26 10:23:00 +0100
committerAryadev Chavali <aryadev@aryadevchavali.com>2023-10-26 10:23:00 +0100
commitc70a9d9879ceb5f370a90c20202b8be651437493 (patch)
tree7b4716c8de3536edb64ec53c4ad70af92e20e21c /asm
parentb1523655614f91e765b674b4b7db6adf79ff403b (diff)
downloadovm-c70a9d9879ceb5f370a90c20202b8be651437493.tar.gz
ovm-c70a9d9879ceb5f370a90c20202b8be651437493.tar.bz2
ovm-c70a9d9879ceb5f370a90c20202b8be651437493.zip
asm/main now uses TOKEN_STREAM_AT
Diffstat (limited to 'asm')
-rw-r--r--asm/main.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/asm/main.c b/asm/main.c
index c6e7782..5b8c4ec 100644
--- a/asm/main.c
+++ b/asm/main.c
@@ -25,13 +25,14 @@ int main(void)
free(buffer.data);
for (size_t i = 0; i < tokens.available; ++i)
- printf("%s(%.*s)\n", token_type_as_cstr(((token_t *)tokens.data)[i].type),
- (int)((token_t *)tokens.data)[i].str_size,
- ((token_t *)tokens.data)[i].str);
+ printf("%s(%.*s)\n",
+ token_type_as_cstr((TOKEN_STREAM_AT(tokens.data, i)).type),
+ (int)(TOKEN_STREAM_AT(tokens.data, i).str_size),
+ (TOKEN_STREAM_AT(tokens.data, i).str));
// Free the tokens
for (size_t i = 0; i < tokens.available; ++i)
- free(((token_t *)tokens.data)[i].str);
+ free(TOKEN_STREAM_AT(tokens.data, i).str);
free(tokens.data);
return 0;
}