def_enum(defp) definition *defp;
def_enum(definition *defp)
def_enum(defp)	definition *defp;{	token tok;	enumval_list *elist;	enumval_list **tailp;	defp->def_kind = DEF_ENUM;	scan(TOK_IDENT, &tok);	defp->def_name = tok.str;	scan(TOK_LBRACE, &tok);	tailp = &defp->def.en.vals;	do {		scan(TOK_IDENT, &tok);		elist = ALLOC(enumval_list);		elist->name = tok.str;		elist->assignment = NULL;		scan3(TOK_COMMA, TOK_RBRACE, TOK_EQUAL, &tok);		if (tok.kind == TOK_EQUAL) {			scan_num(&tok);			elist->assignment = tok.str;			scan2(TOK_COMMA, TOK_RBRACE, &tok);		}		*tailp = elist;		tailp = &elist->next;	} while (tok.kind != TOK_RBRACE);	*tailp = NULL;}