The two files are the preprocessor and toker (aka lexer). Both work in conjunction with each other.Could you explain, what the but is causing and in which files to look for the problem .
As it stands, it cannot handle nested preprocessor directives correctly within remark blocks.
You wouldn't be able to do something like.
Cerberus:
#Rem
You can use the preprocessor directive below to start selective compilation. You must terminate any conditional blocks with #End
#If CONFIG="debug"
The CONFIG preprocessor variable can be either debug or release.
#End
Function Main()
Print "END"
End
You would get the Error: Function 'Main' not found as the preprocess is still pulling in the #If conditional.
The current method I was trying was just through the lexer only as this is called first, but I have an idea that may work that I will try tomorrow with a fresh mind and set of eyes.
If you are asking can you do this:Would it still be possible to nest rem blocks, if you change #end to #endRem?
#rem
#rem
#endrem
#endrem
Then yes, all you have to do is on the first #rem set a flag to ignore everything and count the nesting's of the rems/endrem blocks only.
When the count is zero then turn the flag off.