exercise - find invalid D tokens (Impossible ?)
Johan Engelen via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu Oct 27 23:21:38 PDT 2016
On Friday, 28 October 2016 at 05:16:45 UTC, Basile B. wrote:
> Here are the specifications of token strings:
>
> "Token strings open with the characters q{ and close with the
> token }. In between must be valid D tokens. The { and }"
>
> So we can deduce that any invalid D token inside a token string
> will lead to a compilation error. Indeed:
>
> void main()
> {
> enum s = q{#}; // malformed special token sequence
> }
>
> produces an error.
>
> So are you able to find more invalid token ?
Try '}'
More information about the Digitalmars-d-learn
mailing list