case statements

Ellery Newcomer ellery-newcomer at
Sat Oct 10 22:03:39 PDT 2009

Christopher Wright wrote:
> Ellery Newcomer wrote:
>> Jarrett Billingsley wrote:
>>> On Sat, Oct 10, 2009 at 8:45 PM, Ellery Newcomer
>>> <ellery-newcomer at> wrote:
>>>> This is probably a bad idea
>>> A single string mixin must consist of an entire, fully-formed
>>> statement, expression, or declaration (depending on where it's used).
>>> Case labels do not, on their own, count as a statement.
>> Yeah they do. Ever wonder why you can do things like duff's device? Or
> No, you can put multiple case labels together. A case "statement" is
> just a special category of label.

We're probably thinking on different levels. I'm down on the syntactic
level. parseStatement(flag) can parse 'case x:' and nothing more if
there's nothing more.

More information about the Digitalmars-d-learn mailing list