token dumping
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,6 +5,7 @@
|
|||||||
eaxhla
|
eaxhla
|
||||||
eaxcc
|
eaxcc
|
||||||
.gdb_history
|
.gdb_history
|
||||||
|
gdb.txt
|
||||||
*.pp
|
*.pp
|
||||||
library/tommyds/
|
library/tommyds/
|
||||||
tmp-*
|
tmp-*
|
||||||
|
@ -337,6 +337,7 @@ int was_instruction_array_empty = 0;
|
|||||||
|
|
||||||
void assemble (next count,
|
void assemble (next count,
|
||||||
next * array) {
|
next * array) {
|
||||||
|
debug_token_dump();
|
||||||
/* */
|
/* */
|
||||||
next index;
|
next index;
|
||||||
|
|
||||||
|
@ -41,6 +41,15 @@ void debug_dump_variables(void) {
|
|||||||
tommy_hashtable_foreach(&variable_table, dump_variable);
|
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
|
#else
|
||||||
|
|
||||||
# define debug_puts(msg)
|
# define debug_puts(msg)
|
||||||
|
Reference in New Issue
Block a user