Conversation
|
@davidpiuva That leads me to believe you want to make some system that only keeps the version blocks that fit the target at compile time (instead of generating all ifdefs in the C backend). |
|
We have to compile a new version from ooc each time as it already is since we use alternative implementations for different hardware. I am thinking about using the same pre-compiler that C is using but without includes. A single String to String function should be able to apply any macros found in a module. Any defines other than version flags will be local to the same module to avoid having to recompile everything. |
|
@Shamanas Do you know how easy/hard it would be to make ooc support having |
|
Probably not that difficult aside form maybe creating a bit of a mess in the grammar. Not 100% sure without trying to do it though :P by the way, sorry for the slow updates and little work on rock right now, I should be back in full force in a week or two. |
This is an attempt to implement version blocks that works for everything in the same way.
The first commit is parsing from a string to allow attaching a precompiler.
If no existing pre-compiler is good enough then I will try to make a minimal pre-compiler.
Criterias for the pre-compiler: