void release_node(node *o) {
    if ( nullp(o) ) {
        return;
    }
    if (symp(o)) {
        name_free(o->name);
    }
    else if (subrp(o) or fsubrp(o)) {
        name_free(o->fname);
    }
    node_free(o);
}
Beispiel #2
0
V3ParseImp::~V3ParseImp() {
    for (deque<string*>::iterator it = m_stringps.begin(); it != m_stringps.end(); ++it) {
	delete (*it);
    }
    m_stringps.clear();
    for (deque<V3Number*>::iterator it = m_numberps.begin(); it != m_numberps.end(); ++it) {
	delete (*it);
    }
    m_numberps.clear();
    lexDestroy();
    parserClear();

    if (debug()>=9) { UINFO(0,"~V3ParseImp\n"); symp()->dump(cout, "-vpi: "); }
}
char *name(node *o) {
    if (not symp(o)) {
        return "";
    }
    return o->name->s;
}