Posibility to configure the editor to see in a graphic mode (different colours) the code areas that will be compiled and what will not.
I meant in 'c' code with sentences as #if (A==1)&&(B==0), #else, #endif.
In this case the editor has to recognise the constants A and B.
It will be very helpfull to design this kind of code when there are lots of sentences like this even nested.
Example:
#include "xxx.h";
#define A 1
#define B 0
#define C 1
#define D 0
void main(void)
{
#if (A==1)||(B==0) // In this case this is true
a=1; // This will be compiled, normal color
#if (C==1)&&(D==1) // In this case this is false
a=2; // This will not be compiled, comment color
#else // In this case this is true
a=3; // This will be compiled, normal color
#endif // End
a=4; // This will be compiled, normal color
#else // In this case this is false
a=5; // This will not be compiled, comment color
#endif // End
}
View in other colours (as comments) #if #endif optional code
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
As in "/*, */" for comments in 'c', almost all languages have conditional compilations directives.MudGuard wrote:For which programming languages?
Can you define a language-independant way to implement this?
Again, this needs a full parser for the programming language - Textpad is a language independant text editor.
It is not neccesary a parser it could be done with a definition file or something similar.