/* define a function */ void dodef(struct symbol *name, struct symlist *syms, struct ast *func) { if(name->syms) symlistfree(name->syms); if(name->func) treefree(name->func); name->syms = syms; name->func = func; }
void dodef(struct symbol *name, struct symlist *syms, struct ast *func) { /* Delete current definition if exists */ if(name->syms) symlistfree(name->syms); if(name->func) treefree(name->func); name->syms = syms; name->func = func; }