2018-03-06 16:44:56 -08:00
|
|
|
#include "parsetype.h"
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
void libab_parsetype_free(libab_parsetype* type) {
|
2018-04-21 14:09:01 -07:00
|
|
|
if (!(type->variant & LIBABACUS_TYPE_F_RESOLVED)) {
|
2018-04-17 15:49:09 -07:00
|
|
|
free(type->data_u.name);
|
|
|
|
}
|
2018-04-21 14:09:01 -07:00
|
|
|
if (type->variant & LIBABACUS_TYPE_F_PARENT) {
|
2018-04-17 22:14:07 -07:00
|
|
|
libab_ref_vec_free(&(type->children));
|
2018-03-06 16:44:56 -08:00
|
|
|
}
|
|
|
|
}
|