Store function / operator types when they are registered.

This commit is contained in:
2018-03-15 19:41:11 -07:00
parent 429c0bde3e
commit ab2311def9
4 changed files with 75 additions and 19 deletions

View File

@@ -43,5 +43,9 @@ void libab_table_free(libab_table* table) {
ht_free(&table->table);
}
void libab_table_entry_free(libab_table_entry* entry) {
if(entry->variant == ENTRY_OP) {
libab_parsetype_free_recursive(entry->data_u.op.behavior.type);
} else if(entry->variant == ENTRY_FUN) {
libab_parsetype_free_recursive(entry->data_u.function.behavior.type);
}
}