Example #1
0
void freeSyntaxTree(SyntaxTree *root)
{
	if (root == NULL) return;
	
	freeSyntaxTree(root->next);
	freeSyntaxTree(root->firstChild);
	
	free(root);
}
Example #2
0
program_node *parse(token_list *tlist){
    (void) asdads; //for not causing warning about unused variable
    global_tlist = tlist;
    /*
     * this is for passing error pointer value to memory.o 
     */
    freeSyntaxTree(NULL, error);

    return program();
}