"Comment processing conceptually happens before tokenization."

Unknown W. Brackets unknown at simplemachines.org
Sun Oct 22 17:52:49 PDT 2006

What if you want a string literal which contains the following characters?

/* comment */

For whatever reason?  Do you propose that you should have to do the 

char[] comment_example = "/" "* comment *" "/";

Or something?  I think it makes sense to not parse comments inside of 
strings, which is what every other programming language I've used does.


> Walter Bright wrote:
>> Bruno Medeiros wrote:
>>> Walter Bright wrote:
>>>> Yours is better. I'll make the change. Thanks.
>>> What's the reason for this behavior BTW? Does it make 
>>> parsing/tokenizing more easy? Because it seems to me the ideal 
>>> behaviour is otherwise.
>> I think the examples in www.digitalmars.com/d/lex.html should make it 
>> clear.
> Huh? They make clear what the behavior is, but that I already know. 
> Instead, I wanted to know the reasoning behind that.

More information about the Digitalmars-d-bugs mailing list