libucl icon indicating copy to clipboard operation
libucl copied to clipboard

Conditional Includes

Open allanjude opened this issue 10 years ago • 2 comments

Would it be possible to create conditional includes, based on a variable, or even better, a key

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

allanjude avatar Feb 07 '15 05:02 allanjude

That is possible to do by modifying macro API to pass a pointer to the top UCL object in the parser. However, that would work merely if you define the conditions prior to the macro invocation which might be not very convenient. Also that would break the API compatibility unfortunately.

vstakhov avatar Feb 07 '15 17:02 vstakhov

After some thinking, I've found that it's possible to get a top object from the parser structure. So no API incompatibility will be applied. But I have no idea about the clear syntax for such logic.

vstakhov avatar Mar 11 '15 11:03 vstakhov