<div>Hi</div><div><br></div><div>The page for enums specification <a href="http://www.digitalmars.com/d/2.0/enum.html">http://www.digitalmars.com/d/2.0/enum.html</a> defines enum body syntax as follows:</div><div><br></div>
<div>EnumBody:</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>{ EnumMembers }</div><div><br></div><div>Should it not be</div>
<div><br></div><div>EnumBody:</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>EnumMember ;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>{ EnumMembers }</div><div><br></div>
<div>or perhaps</div><div><br></div><div>EnumBody:</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>EnumMembers ;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>{ EnumMembers }</div>
<div><br></div><div>Otherwise, I can't quite grasp how following enums definitions are legal:</div><div><br></div><div>enum X = 4;</div><div><br></div><div>enum</div><div> mega = 1024 * 1024,</div><div> pi = 3.14,</div>
<div> euler = 2.72,</div><div> greet = "Hello";</div><div><br></div><div>(Both of the above enums are accepted by dmd v2.050).</div><div><br></div><div>Regards,</div><div>Lennart</div>