Some programmers like to use #if 0 ... #endif to
comment things out, especially since it nests. I
propose that such #if blocks be highlighted as comments.
Specifically, suppose that all normal comments are
conceptually removed first (since preprocessor
directives can be commented out). Next, where #if 0 is
encountered, check for the corresponding #else and/or
directives) would then be given the syntax highlighting
normally applied to comments. If there is an #else,
then normal syntax highlighting would occur between the
Note that it is possible for whitespace to occur at the
beginning of the line before the #; as well as between
the # and the "if", or "else", or whatever.
I also suggest that an analogous rule be applied to the