I'm trundling along with these and the framework seems to be working good, but suprisingly the one I'm having the most problems with isn't a macro, and I can't figure out why it won't compile.
If anybody wants to see if they can figure it out,
here's the code, and this illustrates the problem
Code: Select all
F:\Dev-Cpp\Projects\FB\containers\bug>..\fbc -i ..\.. -c bitcontainertest.bas
Containers: Generating-IIteratorBoolean
Containers: Generating-IContainerBoolean
F:\Dev-Cpp\Projects\FB\containers\bug>..\fbc -d REAL_HEADERS -i ..\.. -c bitcontainertest.bas
Containers: Generating-IIteratorBoolean
Containers: Generating-IContainerBoolean
F:\Dev-Cpp\Projects\FB\containers\bug>..\fbc -d REAL_CODE -i ..\.. -c bitcontainertest.bas
Containers: Generating-IIteratorBoolean
Containers: Generating-IContainerBoolean
F:\Dev-Cpp\Projects\FB\containers\bug>..\fbc -d REAL_CODE -d REAL_HEADERS -i ..\.. -c bitcontainertest.bas
Containers: Generating-IIteratorBoolean
Containers: Generating-IContainerBoolean
F:\Dev-Cpp\Projects\FB\containers\bug\BitContainer.bi(272) error 290: Expected '#ENDIF' in 'dim mask As UByte'
bitcontainertest.bas(17) error 290: Expected '#ENDIF' in 'bits.SetAll()'
Essentially:
the full code BitContainer.bi with the real IContainer and IIterator bi doesn't compile
The full BitContainer with the non-macro bi files (the _mock bi's) does compile
Except, the BitContainerStub (which doesn't have any code in its subs) compiles fine with the real headers, as do all the other macro containers I've written so far
The weird thing is that if you move the function order around in the full file, the error is always between lines 260-280, and that's where the -pp output stops dead - so it's a good bet that the compiler thinks its expanding a macro and hitting a roughly 10,000-ish character limit, maybe? It's going to be something dumb like a single extra or missed bracket but I've been looking for it all day and still have no idea what or where