GNOME Bugzilla – Bug 115614
wrong highlight for #if 1 in c
Last modified: 2014-11-09 18:32:01 UTC
if I have #if 0 foo #else bar #endif foo is blue (color meaning commented out) and bar is black as expected; but if I have #if 1 foo #else bar #endif both foo and bar are black, while I would expect bar to be blue since in this case it is commented out.
Current highlighting algorithm is quite limited and cannot handle the case you have described. Changing severity to enh.
*** This bug has been marked as a duplicate of 137587 ***
It goes out of the scope of regex. We would need at least context-free grammars to understand #if 1 // #else situation.
Hey, this bug was marked as duplicate 10 years ago, why do you comment here? And it seems that the problem is fixed.