Dangling if

Bernard Helyer b.helyer at gmail.com
Thu Sep 27 21:03:41 PDT 2012


On Friday, 28 September 2012 at 02:12:20 UTC, Andrej Mitrovic 
wrote:
> This is a very specific situation that could be handled unless 
> it is
> too complex to mess with the lexer. If there's an if statement 
> which
> isn't followed by a block but is followed by a blank line emit a
> warning. Sounds simple enough to me.

By the time the compiler even has a concept of an 'if statement'
or a 'block' the whitespace is long gone. Not to say you
couldn't change the lexing model to detect such things,
but it's not a simple as you make it sound.



More information about the Digitalmars-d mailing list