Multi-stage preprocessing.
Sometimes you would like to preprocess:
a) only some of the preprocessors on the current source;
b) preprocessor tasks in sequence - subpreprocessing.
This could be done by introducing additional 'global preprocessor markers' that then will be defined based on which preprocessors is requested to be run on the current source:
//#if PREPROCESSOR_1 && VALUE_1
...
//#endif
//#if PREPROCESSOR_2 && VALUE_1
...
//#elif PREPROCESSOR_2
...
//#endif
This is not very convenient as you WILL probably miss some of these global preprocessor markers when writing the code. And also, it be quite tedious to follow them correctly. So, quite unthinkable solution.
You could also use separate source-processing before using Antenna preprocessing again. For example, lets say you introduce //@ as your separate preprocessor tasks you want to run:
1. rename current //# as //_not_to_be_processed_
2. rename //@ -> //#
3. run Antenna preprocessing
4. rename //# back to //@
5. rename //_not_to_be_processed_ back to //#
This is not nice as requires separate utils (regexp, for example could do).
So, the idea would be that you can define custom preprocessor anchors or you either have a fixed amount of preprocessing anchors to use (3 for example). Lets say these are:
1. //# - as it is now.
2. //@ - second one.
3. //% - third one.
4. ... etc. if defining of custom ones is supported. This could be done by configuring the Antenna, or something.
So, now you could somehow define, that:
a) run only //#
b) or, run all of them (the ones that are configured as preprocessing anchors)
c) or, run only //# and //@
d) or, run in sequence //# then //@
d) or, run in sequence //# then (//@ and //%)
e) etc.
You can this way selectively run the preprocessor tasks on the existing source with (already) preprocessed code.
Cheers,
Sven Kirsimäe
www.kirsimae.com