D1 -> D2

Denis Koroskin 2korden at gmail.com
Fri Nov 19 18:09:12 PST 2010


On Sat, 20 Nov 2010 04:33:36 +0300, Walter Bright  
<newshound2 at digitalmars.com> wrote:

> Denis Koroskin wrote:
>> On Sat, 20 Nov 2010 04:14:05 +0300, Walter Bright
>>> How can it skip it without knowing the grammar?
>>  #ifdef D_Version2
>> ...
>> #else
>> ...
>> #endif
>>   D has a precedence of having preprocessor macros (e.g #line) even if  
>> it's not a full-fledged preprocessor, and I don't see why it couldn't  
>> adapt the same solution.
>>  FWIW, C# has #if blocks, too.
>
> Yes, I know it can be done with a text preprocessor.
>
> [[ Queue run away screaming ]]

Once again, it's NOT a text preprocessor. It's NOT a separate parsing  
phase (unlike C/C++). It's done at parsing level, similarly to comments.


More information about the Digitalmars-d mailing list