@x2nie
Stop infesting this thread with smartass comments, if you have some constructive ideas you're welcome, if not please go somewhere else.
Ha ha ha!
Well, it seem, first, I must apologize if I hurt you. I really don't like to do that.
Next, I need to explain why i did that.
You know from the first post of this thread that what you want is about impossible.
But my "smartass" motto was : Impossible = I don't know the way.
So, AFAIK I am in your side in though of : there is must be a way to do.
Then, the solution should be in detail = case by case, there is no general solution for all problem.
Well, okay, it is fine if you can't show the code. please don't be emotional, AFAIK it is going to pure technical.
ACtually I have already had similar problem during
development some part of SynEdit.
I added a longword (32 bit) member to the synedit-codeinfo, where each bit is one level flag of whether a line is in neck of procedure.
It was going harder when there is a need to sum of created procedure between $ifdef ... $else.
This situation, longword / word is not an option, because what the really needed is integer (or byte, at least).
So I added an dynamic array of byte.
But it failed when there is another need to quick compare of two codeinfo, array cant be direct comparing.
My latest choice is string: string can be just compared, string is array of char (another byte).
But it wouldn't be enough, because in some real code, the amount of procedure created between $ifdef .. $else may beyond the byte range ( > 255).
So, you know, the solution is probably very depends on the actual code. case by case.
(evil is in detail

)
Now, I don't want to see the code.
I you can accept an advice, please don't think too bad about people, we might lost a chance to know whether people still think good about you.