Some of the supiest error one ahve to find in a C-like language is a forgotten ';' after an 'if' like this
if (bla); ...
I would bet such a code is in 99,9 percent of all cases simply wrong but sometimes really hard to find. Simply underline such constructs (maybe add an option to switch this on). When adding an option you could also add an option to underline while(); and for(); although these construct do happen but sometimes are as bad as the if...
I'm sorry to say that it is not possible to detect this kind of errors using regular expressions. Context free grammars would be needed to detect all possible if's. But this is not the point:
This kind of errors are often difficult to detect but depending on the parse tree that is generated by VA easily to underline.
mmb which IDE are you using? i know that VS2005 can produce some fairly reasonable warnings / errors when i make a typo.
some of the time you can tell you have made a typo because local variables or function calls are not coloured correctly.
it would be reasonable to think VA could detect this, i am just concerned about entering the world of static code analysis, since that is a whole new product.
feline: It's true that VC2005 produces the right warning C4390. The VC6 compiler is silent here. We use both IDE's (VC6 used less resources in a virtual machine). Sorryly I'm sometimes called by students that typically ignore all warnings to "look, I do it all right but it did not work". So, this feature would save me some walking
An the other hand, how would you call "enhanced coloring" if not static analysis?