AST::~AST()
{
    flist.erase(this);
    if (type == TAG) {
        delete tag.name;
    } else if (type == REF) {
        delete ref.name;
    } else if (type == STR) {
        delete str.chars;
    } else if (type == CLS) {
        delete cls.ranges;
    }
}
AST::~AST()
{
    flist.erase(this);
    if (type == TAG) {
        delete tag.name;
    } else if (type == REF) {
        delete ref.name;
    } else if (type == STR) {
        delete str.chars;
    } else if (type == CLS) {
        delete cls.ranges;
    }
}