Fixed up the code a bit and fixed a memory leak bug (of course, there's still no good way to free Tokens but that'll be sorted out later).

This commit is contained in:
2022-05-05 20:10:10 +00:00
parent 8ec0b9b216
commit fc47bf2143
2 changed files with 15 additions and 6 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ int main(int argc, char* args[]) {
Token* t = (Token*) list->content[i];
printf("[%i] '%s'", t->type, t->lexeme);
if (t->type == NUMBER || t->type == HEX) printf(" NUM: %ld", (long) t->value);
if (t->type == NUMBER || t->type == HEX) printf(" NUM: %ld", *((long *) t->value));
printf("\n");
}