[cfe-dev] patch for auto show/hide macro expansion in CSS

Ted Kremenek kremenek at apple.com
Thu Apr 17 11:45:05 PDT 2008


On Apr 17, 2008, at 11:17 AM, Cédric Venet wrote:

> Hi,
>
> Instead of using javascript, it can be done in css like this. Tested  
> in IE7
> et FF3b4 (I don't have IE6, for it, it would probably need to  
> transform the
> <span class="macro"> into a <a class="macro">). It depend on which  
> browser
> you want to support...
>
> I put an XHTML doctype in order to get the browser to be in standard  
> mode
> (instead of quirk mode).

Great!  I'll test the patch today.

>
>
> Regards,
>
> Cédric
>
> Ps: Does the color match those of Xcode? Because I don't really care  
> for
> them :|

Feel free to change them so that they are more aesthetically inclined.

>
> Ps2: VS highlight code 'discarded' by the preprocessor in a special  
> color.
> Like this:
>
> #if 0
> something in a special color
> #endif

Chris and I talked about doing this.  I think we are going for a more  
general solution where we show what actual blocks are disabled by  
using knowledge from the Preprocessor object (we actually *know* which  
code is not discarded).



More information about the cfe-dev mailing list