return res;
}
-struct vardecl vardecl(char *ident, struct expr *expr)
-{
- return (struct vardecl) {.ident=ident, .expr=expr};
-}
-
struct decl *decl_fun(char *ident, struct list *args, struct list *body)
{
struct decl *res = safe_malloc(sizeof(struct decl));
return;
for (int i = 0; i<ast->ndecls; i++)
decl_free(ast->decls[i]);
+ free(ast->decls);
free(ast);
}