EnumDef MkEnumDef(object name, object elems) { FastToken ft = (FastToken)name; Check(char.IsUpper(ft.text[0]), ft.Location, "Invalid Enum type name '{0}', must start with upper case letter", ft.text); Cons <FastToken> members = (Cons <FastToken>)elems; EnumDef enumdef = new EnumDef(ft); foreach (var token in members) { enumdef.Add(token); } return(enumdef); }