#pragma once #include enum type_tag { T_INT, T_VOID, T_PTR }; struct type { enum type_tag tag; union { struct { // T_INT int size; }; struct {}; // T_VOID struct { // T_PTR struct type *target; }; }; }; void type_cache_cleanup(void); struct type* type_int(int size); struct type* type_void(void); struct type* type_ptr(struct type *type); void type_print(struct type *type, FILE *f);