token dumping

This commit is contained in:
anon 2024-07-16 04:45:57 +02:00
parent a2f60be69f
commit 0b540622b1
3 changed files with 11 additions and 0 deletions

1
.gitignore vendored
View File

@ -5,6 +5,7 @@
eaxhla
eaxcc
.gdb_history
gdb.txt
*.pp
library/tommyds/
tmp-*

View File

@ -337,6 +337,7 @@ int was_instruction_array_empty = 0;
void assemble (next count,
next * array) {
debug_token_dump();
/* */
next index;

View File

@ -41,6 +41,15 @@ void debug_dump_variables(void) {
tommy_hashtable_foreach(&variable_table, dump_variable);
}
static
void debug_token_dump(void) {
extern unsigned int * t_array;
extern unsigned int t_count;
FILE * o = fopen("token_dump", "wb");
fwrite(t_array, sizeof(int), t_count, o);
fclose(o);
}
#else
# define debug_puts(msg)