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:
+1
-1
@@ -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");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user