#include "free_stuff.h"
#include "symbol_table.h"
#include "queue.h"
#include "dbug.h"

node* FRSTdoFreeStuff(node* syntaxtree)
{
    DBUG_ENTER("FRSTdoFreeStuff");

    struct symbol_table* st = PROGRAM_SYMBOLTABLE(syntaxtree);
    st_free(st);

    struct queue* cp = PROGRAM_CONSTANTPOOL(syntaxtree);
    q_clean(cp);

    struct queue* ie = PROGRAM_IMPORTSEXPORTS(syntaxtree);
    q_clean(ie);

    DBUG_RETURN(syntaxtree);
}