titzer / virgil

A fast and lightweight native programming language
1.13k stars 40 forks source link

Exclude code from compilation #236

Closed kalwalt closed 2 months ago

kalwalt commented 2 months ago

Does exist a sort of preprocess definitions to exclude source code to be compiled ? As in C/C++ with #ifdef #endif? How can i handle code constructs can may work with a host system and not in others?

titzer commented 2 months ago

Currently you have to split them into separate files and then include some files for some targets and other files for other targets. It's not ideal but avoids the need for #ifdef for now.

kalwalt commented 2 months ago

Currently you have to split them into separate files and then include some files for some targets and other files for other targets. It's not ideal but avoids the need for #ifdef for now.

Ok, that's clear, i will do in this way.